The COCOS Convention

Coordinate COnvetionS for 3D current and magnetic fields

 

A current in a ring in a usual cylindrical coordinate system yields a magnetic field in the negative direction in a "usual" coordinate local to the ring. This helix can appear "right-handed" again by changing the choice of >0 or of >0.

 

This has led to several different choices in codes related to magnetized plasmas. We have therefore defined a unique index to specify the COCOS convention as described in :

 

 

O. Sauter and S. Y Medvedev, "Tokamak Coordinate Conventions: COCOS", Comput. Phys. Commun. 184 (2013) 293.

 

 

 

Useful transformations files:

 

       COCOStransform set of tools, ask for a copy from spcsvn COCOStransform repository: Code_transfer_COCOStransform_generic.pdf

 

       matlab: readeqdsk_simple.m, writeeqdsk.m, eqdsk_cocos_transform.m, cocos.m.
In this way you can:
>> eqdsk_in = readeqdsk_simple('EQDSKfilename',cocos_in);
>> [eqdsk_cocosout]=eqdsk_cocos_transform(eqdsk_in,[cocos_in cocos_out]);
>> writeeqdsk(EQDSKfilename_out,eqdsk_cocosout,cocos_out);

 

       f90: see COCOStransform routines/tools (used within CHEASE for example)

 

 

The Appendix of the paper contains two useful Tables concerning the known COCOS convention for various codes and tokamaks. They are kept up-to-date here below:

 

 

Updated report form, after publication, to include above modified Appendices and respective references.