picongpu.pypicongpu.species.operation.densityprofile
Submodules
- 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 |
Package Contents
- class picongpu.pypicongpu.species.operation.densityprofile.DensityProfile
Bases:
picongpu.pypicongpu.rendering.RenderedObject
(abstract) parent class of all density profiles
A density profile describes the density in space.
- abstract check() None
check self, overwritten by child class
Perform checks if own parameters are valid. On error raise, if everything is okay pass silently.
- get_generic_profile_rendering_context() dict
retrieve a context valid for “any profile”
Problem: Every profile 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 profiles get_rendering_context() provides only their parameters, i.e. there is no meta information on types etc.
If a generic profile is requested one can use the schema for “DensityProfile” (this class), for which this method returns the correct content, which includes metainformation and the data on the schema itself.
E.g.:
{ "type": { "uniform": true, "gaussian": false, ... }, "data": DATA }
where DATA is the serialization as returned by get_rendering_context().
There are two context serialization methods for density profiles:
get_rendering_context()
provided by RenderedObject parent class, serialization (“context building”) performed by _get_serialized()
_get_serialized() implemented in every profile
checks against schema of respective profile
returned context is a representation of exactly this profile
(left empty == not implemented in parent ProfileDensity)
get_generic_profile_rendering_context()
implemented in parent densityprofile
returned representation is generic for any profile (i.e. contains meta information which type is actually used)
passes information from get_rendering_context() through
returned representation is designed for easy use with templating engine mustache
- __hash__()
custom hash function for indexing in dicts
- get_rendering_context() dict | None
get rendering context representation of this object
delegates work to _get_serialized and invokes checks performed by check_context_for_type(). :raise ValidationError: on schema violation :raise RuntimeError: on schema not found :return: self as rendering context
- static check_context_for_type(type_to_check: type, context: dict | None) 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
check self, overwritten by child class
Perform checks if own parameters are valid. On error raise, if everything is okay pass silently.
- get_generic_profile_rendering_context() dict
retrieve a context valid for “any profile”
Problem: Every profile 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 profiles get_rendering_context() provides only their parameters, i.e. there is no meta information on types etc.
If a generic profile is requested one can use the schema for “DensityProfile” (this class), for which this method returns the correct content, which includes metainformation and the data on the schema itself.
E.g.:
{ "type": { "uniform": true, "gaussian": false, ... }, "data": DATA }
where DATA is the serialization as returned by get_rendering_context().
There are two context serialization methods for density profiles:
get_rendering_context()
provided by RenderedObject parent class, serialization (“context building”) performed by _get_serialized()
_get_serialized() implemented in every profile
checks against schema of respective profile
returned context is a representation of exactly this profile
(left empty == not implemented in parent ProfileDensity)
get_generic_profile_rendering_context()
implemented in parent densityprofile
returned representation is generic for any profile (i.e. contains meta information which type is actually used)
passes information from get_rendering_context() through
returned representation is designed for easy use with templating engine mustache
- __hash__()
custom hash function for indexing in dicts
- get_rendering_context() dict | None
get rendering context representation of this object
delegates work to _get_serialized and invokes checks performed by check_context_for_type(). :raise ValidationError: on schema violation :raise RuntimeError: on schema not found :return: self as rendering context
- static check_context_for_type(type_to_check: type, context: dict | None) 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
check self, overwritten by child class
Perform checks if own parameters are valid. On error raise, if everything is okay pass silently.
- get_generic_profile_rendering_context() dict
retrieve a context valid for “any profile”
Problem: Every profile 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 profiles get_rendering_context() provides only their parameters, i.e. there is no meta information on types etc.
If a generic profile is requested one can use the schema for “DensityProfile” (this class), for which this method returns the correct content, which includes metainformation and the data on the schema itself.
E.g.:
{ "type": { "uniform": true, "gaussian": false, ... }, "data": DATA }
where DATA is the serialization as returned by get_rendering_context().
There are two context serialization methods for density profiles:
get_rendering_context()
provided by RenderedObject parent class, serialization (“context building”) performed by _get_serialized()
_get_serialized() implemented in every profile
checks against schema of respective profile
returned context is a representation of exactly this profile
(left empty == not implemented in parent ProfileDensity)
get_generic_profile_rendering_context()
implemented in parent densityprofile
returned representation is generic for any profile (i.e. contains meta information which type is actually used)
passes information from get_rendering_context() through
returned representation is designed for easy use with templating engine mustache
- __hash__()
custom hash function for indexing in dicts
- get_rendering_context() dict | None
get rendering context representation of this object
delegates work to _get_serialized and invokes checks performed by check_context_for_type(). :raise ValidationError: on schema violation :raise RuntimeError: on schema not found :return: self as rendering context
- static check_context_for_type(type_to_check: type, context: dict | None) 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
check self, overwritten by child class
Perform checks if own parameters are valid. On error raise, if everything is okay pass silently.
- get_generic_profile_rendering_context() dict
retrieve a context valid for “any profile”
Problem: Every profile 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 profiles get_rendering_context() provides only their parameters, i.e. there is no meta information on types etc.
If a generic profile is requested one can use the schema for “DensityProfile” (this class), for which this method returns the correct content, which includes metainformation and the data on the schema itself.
E.g.:
{ "type": { "uniform": true, "gaussian": false, ... }, "data": DATA }
where DATA is the serialization as returned by get_rendering_context().
There are two context serialization methods for density profiles:
get_rendering_context()
provided by RenderedObject parent class, serialization (“context building”) performed by _get_serialized()
_get_serialized() implemented in every profile
checks against schema of respective profile
returned context is a representation of exactly this profile
(left empty == not implemented in parent ProfileDensity)
get_generic_profile_rendering_context()
implemented in parent densityprofile
returned representation is generic for any profile (i.e. contains meta information which type is actually used)
passes information from get_rendering_context() through
returned representation is designed for easy use with templating engine mustache
- __hash__()
custom hash function for indexing in dicts
- get_rendering_context() dict | None
get rendering context representation of this object
delegates work to _get_serialized and invokes checks performed by check_context_for_type(). :raise ValidationError: on schema violation :raise RuntimeError: on schema not found :return: self as rendering context
- static check_context_for_type(type_to_check: type, context: dict | None) 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