For initializing density (gas) profiles via pre-discretized HDF5 files, we should provide a small tool-set with primitives so one can create such profiles easily via scripts.
Example
import picongpu.density_profiles
# create container for atoms/volume in m^-3
rho = density_profiles.new()
# create general [0.:1] objects with density
s = density_profiles.sphere(r=5.e-6, c=[1.e-4, 1.e-4, 1.e-4])
g = density_profiles.gaussianSphere(r=5.e-6, sig=1e-6, c=[1.e-4, 1.e-4, 1.e-4])
# additional constructor arguments:
# - gradient list (max-"or" combined):
# 1D: line (linear, cubic, exponential, etc.),
# 2D: box-linear, sphere-linear, etc.
# - rotations
# append to container
# example: reduce a gaussian "blob" by a central solid sphere "imprint"
rho = 1.e27 * g - 1.e26 * s
# discretize to cells
rho.discretize(dCells=[1.e-9, 1.e-9, 1.e-9], min=[0., 0., 0.])
rho.write(file="density.h5", name="e_gasProfile") # in openPMD base standard
This might be great for a picongpu-python repository with toolkits and scripts. Same should be possible for discretized laser field initialization.
For initializing density (gas) profiles via pre-discretized HDF5 files, we should provide a small tool-set with primitives so one can create such profiles easily via scripts.
Example
This might be great for a
picongpu-python
repository with toolkits and scripts. Same should be possible for discretized laser field initialization.