picongpu.pypicongpu.species.util.element
This file is part of the PIConGPU. Copyright 2021-2023 PIConGPU contributors Authors: Hannes Troepgen, Brian Edward Marre License: GPLv3+
Module Contents
Classes
Denotes an element from the periodic table of elements |
- class picongpu.pypicongpu.species.util.element.Element(*args, **kwds)
Bases:
picongpu.pypicongpu.rendering.RenderedObject
,enum.Enum
Denotes an element from the periodic table of elements
Used to provide fundamental constants for elements, and to map them in a type-safe way to PIConGPU.
The number associated is the number of protons. Note: Spelling follows periodic table, e.g. “Na”, “C”, “He”
Note that these denote Elements, but when initialized in a species only represent the core, i.e. there are no electrons. To make an atom also initialize an appropriate ionization.
- H = 1
hydrogen
- He = 2
helium
- N = 7
nitrogen
- static get_by_openpmd_name(openpmd_name: str) Element
get the correct substance implementation from a openPMD type name
Names are (case-sensitive) element symbols (e.g. “H”, “He”, “N”).
- Parameters:
openpmd_name – single species following openPMD species extension
- Returns:
object representing the given species
- get_picongpu_name() str
get name as used in PIConGPU
Used for type name lookups
- get_mass_si() float
Get mass of an individual particle
Calculated based of “conventional atomic weight” from the periodic table of elements
- Returns:
mass in kg
- get_charge_si() float
Get charge of an individual particle without electrons
Calculated from atomic number, applies with no electrons present.
- Returns:
charge in C
- get_rendering_context() dict
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 violiation :raise RuntimeError: on schema not found :return: self as rendering context
- 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 violiation
RuntimeError – on schema not found
- __repr__()
Return repr(self).
- __str__()
Return str(self).
- __dir__()
Returns all members and all public methods
- __format__(format_spec)
Default object formatter.
- __hash__()
Return hash(self).
- __reduce_ex__(proto)
Helper for pickle.
- __deepcopy__(memo)
- __copy__()
- name()
The name of the Enum member.
- value()
The value of the Enum member.