Parameterising the velocity space for an ion population - fmihpc/vlasiator GitHub Wiki

So you have identified a suitable project and setup and you are not sure about velocity-space resolution, block counts and sparsity thresholds. To help you out, we have written a script that shows the 1D cross-section of a Maxwellian velocity distribution function with the relevant technical parameters.

The physical parameters you have to set are

  • ion mass (in kg)
  • number density (in m^-3)
  • temperature (in K)
  • mean (drift) velocity (in m/s)

and the technical parameters are matching those in a run configuration file:

  • extents of the velocity space (min and max in m/s)
  • number of velocity blocks spanning the extents
  • width of a block (number of velocity cells per dimension, 4 usually, no other option prior to spring 2025)
  • sparsity threshold (s^3/m^6)

Run the script with python3 vdf_params.py and it will print the parameters and derived value such as the thermal velocity to the command line, and generate a plot showing how well resolved the Maxwellian is, and how close to the maximum extents and the threshold it is.

Parameters:
mass: 1.673e-27 kg or 1.0 proton masses
temperature: 5.000e+05 K or 4.309e+01 eV
density: 1.000e+06 m^-3
thermal speed: 1.113e+05 m/s
dv: 4.000e+04 m/s
VDF max, sparsity threshold 2.28e-10, 1.0e-15

image