field line tracing opposite to the magnetic field direction.
I think it would be a simple but useful feature to add the ability to perform/plot poincare trace in a direction opposite to the magnetic field. This can help users better understand the fieldline structure outside the stellarator boundary.
With modular coils, can be easily achieved by reversing the coil current in all the coils. This would reverse the magnetic field without changing the flux surface shape.
@dpanici ftw!
"just use field_reversed = ScaleMagneticField(scale=-1.0, field)"
@dpanici add comment in documentation for the field line tracing integrate function to mention this
can't this already be done by just giving phi = -phi?
Depends on what you mean by that. How do you transform B_r, B_phi, B_z when phi - > -phi? Safer way is what Dario suggests. Also, I have tested it for modular coils.
its not transforming B at all? it's just literally tracing in the opposite direction. Phi is our time variable, so we run that backwards. Eg, starting at phi=0, going to phi=-pi
The vector B_R, B_phi, B_z is pointing in one direction but you integrate in the opposite direction? So your dphi is -dphi. It's something to try.
i prefer that option, as it means phi=const planes are the same. If you flip B like you talked about I don't think that holds
i prefer that option, as it means phi=const planes are the same. If you flip B like you talked about I don't think that holds
How does that work for multiple field periods? Does it guarantee phi = const. planes are the same?
yes, it doesn't care about field periods at all. What the poincare section looks like will depend on the choice of phi, as it does in the forward direction.