Following on from #3353 a few more ideas have come up about standardising the namespace and increasing readability.
A general rule for naming could be of the form:
var = <data type>_<system>_<description>
For physics based variables it could just be:
var = <physics variable>_<description> Eg: beta_poloidal
Example for a switch that controls the different types of TF coil winding pack shapes:
i_tf_wp_shape
A few ideas that have come to mind are:
-
r_ for radial positions
-
z_ for vertical positions
-
dr_ for radial thicknesses Example: ohcth -> dr_cs
-
dz_ for vertical thicknesses
-
n_ for integer countable items Example: The total number of TF coils = n_tf_coils
-
b_ to represent magnetic field strengths
-
a_ to represent areas? Example: TF winding pack area = a_tf_wp
-
dt_ to represent time intervals
-
dtor_ to represent toroidal thicknesses?
-
p_ for powers
-
t_ for times?
-
l_ for generic lengths. This may cause confusion between a lower case L and a capital i. Maybe len_ would be better in this case
-
c_ for currents?
-
w_ for generic widths?
-
m_ for masses`
-
j_ for current densities
-
res_ for resistances.
-
temp_ for temperatures
-
den_ or rho_ for densities
Alot of the above may be overdoing it or could be combined.
@stuartmuldrew @mkovari @jonmaddock @geograham @j-a-foster @timothy-nunn Please add your comments and opinions. Hopefully this can start moving us to a more readable and verbose code.
Following on from #3353 a few more ideas have come up about standardising the namespace and increasing readability.
A general rule for naming could be of the form:
var = <data type>_<system>_<description>For physics based variables it could just be:
var = <physics variable>_<description>Eg:beta_poloidalExample for a switch that controls the different types of TF coil winding pack shapes:
i_tf_wp_shapeA few ideas that have come to mind are:
r_for radial positionsz_for vertical positionsdr_for radial thicknesses Example:ohcth -> dr_csdz_for vertical thicknessesn_for integer countable items Example: The total number of TF coils =n_tf_coilsb_to represent magnetic field strengthsa_to represent areas? Example: TF winding pack area =a_tf_wpdt_to represent time intervalsdtor_to represent toroidal thicknesses?p_for powerst_for times?l_for generic lengths. This may cause confusion between a lower case L and a capital i. Maybelen_would be better in this casec_for currents?w_for generic widths?m_for masses`j_for current densitiesres_for resistances.temp_for temperaturesden_orrho_for densitiesAlot of the above may be overdoing it or could be combined.
@stuartmuldrew @mkovari @jonmaddock @geograham @j-a-foster @timothy-nunn Please add your comments and opinions. Hopefully this can start moving us to a more readable and verbose code.