Open mccoys opened 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.
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).
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).
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 ?
This would be taken care of with the OpenPMD format, assuming that the code used supports it for its data output.
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.