picongpu.pypicongpu.species.operation.densityprofile
This file is part of PIConGPU. Copyright 2025 PIConGPU contributors Authors: Julian Lenz License: GPLv3+
Submodules
- picongpu.pypicongpu.species.operation.densityprofile.cylinder
- picongpu.pypicongpu.species.operation.densityprofile.densityprofile
- picongpu.pypicongpu.species.operation.densityprofile.foil
- picongpu.pypicongpu.species.operation.densityprofile.gaussian
- picongpu.pypicongpu.species.operation.densityprofile.plasmaramp
- picongpu.pypicongpu.species.operation.densityprofile.uniform
Classes
(abstract) parent class of all density profiles |
|
globally constant density |
|
Directional density profile with thickness and pre- and |
|
gaussian density profile |
|
Describes a cylindrical density distribution of particles with gaussian up-ramp |
Package Contents
- class picongpu.pypicongpu.species.operation.densityprofile.DensityProfile
Bases:
picongpu.pypicongpu.rendering.SelfRegisteringRenderedObject
(abstract) parent class of all density profiles
A density profile describes the density in space.
- classmethod __init_subclass__()
- get_rendering_context()
retrieve a generic context containing type information specifying a subclass
Problem: Every self-registered subclass has its respective schema, and it is difficult in JSON (particularly in a mustache-compatible way) to get the type of the schema.
Solution: The normal rendering of self-registered subclasses via get_rendering_context() provides only their parameters, i.e. there is no meta information on types etc.
If a generic context is requested one can use the schema for parent class, for which this method returns the correct content. It includes metainformation and the data on the schema itself.
E.g.:
{ "type": { "phasespace": true, "auto": false, ... }, "data": DATA }
where DATA is the serialization as returned by get_rendering_context().
- __hash__()
custom hash function for indexing in dicts
- static check_context_for_type(type_to_check: type, context: dict | None)
check if the given context is valid for the given type
Raises on error, passes silently if okay.
- Raises:
ValidationError – on schema violation
RuntimeError – on schema not found
- class picongpu.pypicongpu.species.operation.densityprofile.Uniform
Bases:
picongpu.pypicongpu.species.operation.densityprofile.densityprofile.DensityProfile
globally constant density
PIConGPU equivalent is the homogenous profile, but due to spelling ambiguities the PICMI name uniform is followed here.
- density_si
density at every point in space (kg * m^-3)
- check() None
- classmethod __init_subclass__()
- get_rendering_context()
retrieve a generic context containing type information specifying a subclass
Problem: Every self-registered subclass has its respective schema, and it is difficult in JSON (particularly in a mustache-compatible way) to get the type of the schema.
Solution: The normal rendering of self-registered subclasses via get_rendering_context() provides only their parameters, i.e. there is no meta information on types etc.
If a generic context is requested one can use the schema for parent class, for which this method returns the correct content. It includes metainformation and the data on the schema itself.
E.g.:
{ "type": { "phasespace": true, "auto": false, ... }, "data": DATA }
where DATA is the serialization as returned by get_rendering_context().
- __hash__()
custom hash function for indexing in dicts
- static check_context_for_type(type_to_check: type, context: dict | None)
check if the given context is valid for the given type
Raises on error, passes silently if okay.
- Raises:
ValidationError – on schema violation
RuntimeError – on schema not found
- class picongpu.pypicongpu.species.operation.densityprofile.Foil
Bases:
picongpu.pypicongpu.species.operation.densityprofile.densityprofile.DensityProfile
Directional density profile with thickness and pre- and post-plasma lengths and cutoffs
- density_si
particle number density at at the foil plateau (m^-3)
- y_value_front_foil_si
position of the front of the foil plateau (m)
- thickness_foil_si
thickness of the foil plateau (m)
- pre_foil_plasmaRamp
pre(lower y) foil-plateau ramp of density
- post_foil_plasmaRamp
post(higher y) foil-plateau ramp of density
- check() None
- classmethod __init_subclass__()
- get_rendering_context()
retrieve a generic context containing type information specifying a subclass
Problem: Every self-registered subclass has its respective schema, and it is difficult in JSON (particularly in a mustache-compatible way) to get the type of the schema.
Solution: The normal rendering of self-registered subclasses via get_rendering_context() provides only their parameters, i.e. there is no meta information on types etc.
If a generic context is requested one can use the schema for parent class, for which this method returns the correct content. It includes metainformation and the data on the schema itself.
E.g.:
{ "type": { "phasespace": true, "auto": false, ... }, "data": DATA }
where DATA is the serialization as returned by get_rendering_context().
- __hash__()
custom hash function for indexing in dicts
- static check_context_for_type(type_to_check: type, context: dict | None)
check if the given context is valid for the given type
Raises on error, passes silently if okay.
- Raises:
ValidationError – on schema violation
RuntimeError – on schema not found
- class picongpu.pypicongpu.species.operation.densityprofile.Gaussian
Bases:
picongpu.pypicongpu.species.operation.densityprofile.densityprofile.DensityProfile
gaussian density profile
density= - for y < gasCenterFront; density * exp(gasFactor * (abs( (y - gasCenterFront) / gasSigmaFront))^gasPower) - for gasCenterFront >= y >= gasCenterRear; density - for gasCenterRear < y; density * exp(gasFactor * (abs( (y - gasCenterRear) / gasSigmaRear))^gasPower)
- gas_center_front
position of the front edge of the constant middle of the density profile, [m]
- gas_center_rear
position of the rear edge of the constant middle of the density profile, [m]
- gas_sigma_front
distance from gasCenterFront until the gas density decreases to its 1/e-th part, [m]
- gas_sigma_rear
distance from gasCenterRear until the gas density decreases to its 1/e-th part, [m]
- gas_factor
exponential scaling factor, see formula above
- gas_power
power-exponent in exponent of density function
- vacuum_cells_front
number of vacuum cells in front of foil for laser init
- density
particle number density in m^-3
- check() None
- classmethod __init_subclass__()
- get_rendering_context()
retrieve a generic context containing type information specifying a subclass
Problem: Every self-registered subclass has its respective schema, and it is difficult in JSON (particularly in a mustache-compatible way) to get the type of the schema.
Solution: The normal rendering of self-registered subclasses via get_rendering_context() provides only their parameters, i.e. there is no meta information on types etc.
If a generic context is requested one can use the schema for parent class, for which this method returns the correct content. It includes metainformation and the data on the schema itself.
E.g.:
{ "type": { "phasespace": true, "auto": false, ... }, "data": DATA }
where DATA is the serialization as returned by get_rendering_context().
- __hash__()
custom hash function for indexing in dicts
- static check_context_for_type(type_to_check: type, context: dict | None)
check if the given context is valid for the given type
Raises on error, passes silently if okay.
- Raises:
ValidationError – on schema violation
RuntimeError – on schema not found
- class picongpu.pypicongpu.species.operation.densityprofile.Cylinder
Bases:
picongpu.pypicongpu.species.operation.densityprofile.densityprofile.DensityProfile
with a constant density region in between. It can have an arbitrary orientation and position in space.
- Will create the following profile:
n = density if r < reduced_radius n is 0 or follows the exponential ramp if r > reduced_radius n is 0 if r > reduced_radius + prePlasmaCutoff the reduced_radius is equal = @f[sqrt{R^2 -L^2} -L @f] with R - cylinder_radius and L - prePlasmaLength (scale length of the ramp) the reduced radius ensures mass conservation
- density_si
particle number density at at the foil plateau (m^-3)
- center_position_si
center of the cylinder [x, y, z], [m]
- radius_si
cylinder radius, [m]
- cylinder_axis
cylinder axis [x, y, z], [unitless]
- pre_plasma_ramp
pre plasma ramp
- check() None
- classmethod __init_subclass__()
- get_rendering_context()
retrieve a generic context containing type information specifying a subclass
Problem: Every self-registered subclass has its respective schema, and it is difficult in JSON (particularly in a mustache-compatible way) to get the type of the schema.
Solution: The normal rendering of self-registered subclasses via get_rendering_context() provides only their parameters, i.e. there is no meta information on types etc.
If a generic context is requested one can use the schema for parent class, for which this method returns the correct content. It includes metainformation and the data on the schema itself.
E.g.:
{ "type": { "phasespace": true, "auto": false, ... }, "data": DATA }
where DATA is the serialization as returned by get_rendering_context().
- __hash__()
custom hash function for indexing in dicts
- static check_context_for_type(type_to_check: type, context: dict | None)
check if the given context is valid for the given type
Raises on error, passes silently if okay.
- Raises:
ValidationError – on schema violation
RuntimeError – on schema not found