mabarnes / moment_kinetics

Other
2 stars 4 forks source link

Factors of 2 in normalisation of pressure and definition of the thermal speed. #136

Open mrhardman opened 9 months ago

mrhardman commented 9 months ago

In the initial development of the 1D1V moment_kinetics models, the (parallel) pressure ppar was defined such that the thermal speed vth was calculated in the code like

vth = sqrt(2*ppar/density)

with density the species density. At the same time, the velocities were normalised to a reference speed cref = sqrt(2 Tref /mref). Whilst self-consistent for a certain normalisation of the pressure, the above convention leads to a pressure that is 1/2 of the conventionally normalised pressure. Typically, we would normalise the pressure to nref Tref = (1/2) mref nref cref^2, where nref is a reference density. In this normalisation

vth = sqrt(ppar/density)

The branch https://github.com/mabarnes/moment_kinetics/tree/radial-vperp-standard-DKE-Julia-1.7.2-mpi currently has all pressures defined in the latter convention, where is the master branch currently uses the former convention. Developers beware!

N.B. This discussion assumes that all masses are unity.

To Do: agree to a standard normalisation convention that are natural for both 1V and 2V simulations (where pperp and ppar are present).

mrhardman commented 2 months ago

I think we may have settled on a convention for the normalisation of the pressure (nref mref cref^2), but the units in the HDF5 output are not consistent with this (nref Tref). Is it possible to close this issue by documenting this clearly and cleaning up the diagnostic units? @johnomotani

johnomotani commented 2 months ago

@mrhardman I think that's true.