Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fieldlines starting from a VMEC wout file #313

Open
s-sharpe01 opened this issue Nov 29, 2024 · 3 comments
Open

Fieldlines starting from a VMEC wout file #313

s-sharpe01 opened this issue Nov 29, 2024 · 3 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@s-sharpe01
Copy link

Hi all,

I would like to get a poincare plot out of the code using FIELDLINES. For one of the cases I want to run I have been given an existing VMEC wout file, but no input. I wanted to ask if there was a way to run the FIELDLINES code and get the poincare plot from this wout file? The two tutorial cases in the documentation ( found here: https://princetonuniversity.github.io/STELLOPT/FIELDLINES) use vmec.input files and modify them.

Any advice on how to deal with this would be greatly appreciated

Thanks,
Sophie

@lazersos
Copy link
Collaborator

@s-sharpe01 So the FIELDLINES code only reads the EXTCUR array from the &INDATA namelist. In your case you can simply create an input file which matches you wout file. For example if you have wout_example.nc then you'd want your input file to be called input.example. The input file can simply have a blank &INDATA namelist in it. For example

&INDATA
/
&FIELDLINES_INPUT
<Put whatever your parameters are here.>
/

Then when you run FIELDLINES you simply need to pass the -plasma flag so the code knows not to calculate any field beyond the equilibrium.

But can I ask why do you want to make Poincare plots of a VMEC equilibrium instead of just directly plotting the flux surfaces?

@lazersos lazersos self-assigned this Nov 29, 2024
@lazersos lazersos added the help wanted Extra attention is needed label Nov 29, 2024
@s-sharpe01
Copy link
Author

Thank you for your help!

I am trying out different coil optimisation codes and wanted to do a comparison between the plots produced by each code and the VMEC equilibrium, though I suppose plotting the flux surfaces would achieve a similar result

@lazersos
Copy link
Collaborator

@s-sharpe01, Ahh then you're much better off plotting the VMEC equilibria. FIELDLINES will not give a machine precision accurate representation of the VMEC magnetic field near the edge of the equilibrium domain. This is becasue we must do an inverse lookup to place the magnetic field from VMEC on the cylindrical R,phi,Z grid of FIELDLINES. This tends to create edge stochasticity inside the VMEC domain which is due to numerics, not reality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants