freegs-plasma / freegs

Free boundary Grad-Shafranov solver

Home Page:http://freegs.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FreeGS COCOS

kripnerl opened this issue · comments

To address the question, which COCOS is used by FreeGS I have prepared the attached PDF python notebook. There is discussion as well as cross-validation so I suppose it is right.

The consequence that FreeGS is using COCOS 3 or 7.

FreeGS-cocos.pdf

From the conclusion:

Both COCOS 3 and 7 are applicable for FreeGS; the difference is in the orientation of the poloidal angle (see PLEQUE figure for COCOS 7 and 3). However, poloidal angle $\theta$ is never used in FreeGS. The only practical consequence can be seen in the definition of safety factor $q$, which should be negative for COCOS 3 and positive for COCOS 7. That said COCOS 7 is favourable over 3. On the other hand, this notation is not always forced. For example, EFIT is COCOS 3 with $q$ value always positive.

Maintaining correct sign of $q$ may be important if poloidal angle is introduced. Esp. if streight fieldline $\theta^$ is used. Due to the the relationship of the $\theta^$ and toroidal angle $\phi$, since $\theta^_
\mathrm{end} = \theta^
_\mathrm{start} + (1/q) \Delta \phi$.

To sum it up:

  • COCOS = 3 - cnt-clockwise orientation of $\theta$, $q$ should be positive, is used by EFIT, and this orientation seems to be quite intuitive.
  • COCOS = 7 - clockwise orientation of $\theta$, $q$ is positive as calculated by FreeGS, is generally used by the community.

Thank you @kripnerl this is very useful! I'm going to archive this repository but don't want this to be lost in the move to the new repository (https://github.com/freegs-plasma/freegs). Would you be willing to share this in LaTeX or RST or similar format, to be merged into the manual? Thanks!

Yop, if you do not see any mistake in the documents. I can formulate it into docs.