picmi-standard / picmi

Standard input format for Particle-In-Cell codes
https://picmi.readthedocs.io
Other
35 stars 25 forks source link

Normalized units ? #3

Open mccoys opened 5 years ago

mccoys commented 5 years ago

From what the standard looks like right now, I believe units are in SI, or at least in usual explicit units (e.g. microns).

Is there a plan to switch to the natural set of units for Maxwell/Vlasov codes ? See for instance Smilei's doc.

jlvay commented 5 years ago

The default of PICMI is SI for now. For application to a code that supports other units, I can see two possibilities: a) the layer that converts a PICMI input script to a code native script does the conversion, b) we implement a way in the PICMI standard to define the unit system, proposing a few defaults (SI, natural, ...) and with additional option of user to define its own. I would vote for b if others agree. Then one would need to design and implement it.

mccoys commented 5 years ago

I see one problem about both solutions. There is no unique way to convert from natural units (which are arbitrary) to any other absolute system of units (like SI). If an input file is defined in natural units, then codes which use SI won't work, which is very significant IMO.

In Smilei we chose to keep natural units to ensure generality (typically, astrophysical simulations hate microns).

jlvay commented 5 years ago

If there is an infinite possibility for converting from a natural units system to SI, then the layer that does the conversion just picks one. In the end, either the simulation studies some physics and it does not matter what the actual dimensions of quantities are, either it is related to say an experimental setup and the input script should actually use the actual dimensions (whether it is in SI, cgs or other).

mccoys commented 5 years ago

If there is a layer that does the conversion, then should the outputs be converted back ? Would that be a requirement for all codes to support all conversions ?

jlvay commented 5 years ago

This would be taken care of with the OpenPMD format, assuming that the code used supports it for its data output.