Skip to content

More namespace standards for physics and engineering variables #3410

@chris-ashe

Description

@chris-ashe

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.

Metadata

Metadata

Assignees

Labels

DocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions