pyg4ometry.geant4._Material¶
Attributes¶
Classes¶
This class provides an interface to GDML material definitions. |
|
This class provides an interface to GDML material definitions. Because of the different options |
|
This class that handles isotopes as components of composite materials. An element can be |
Functions¶
|
|
|
|
|
This returns and instance of either ElementSimple or ElementIsotopeMixture. |
|
|
|
Proxy method to construct a NIST compound material - this is just a handle as nothing |
|
Just a name of a material. WARNING: It is left to the |
|
Proxy method to construct a simple material - full description of the element contained is contained in one definition |
|
Proxy method to construct a composite material - can be any mixture of Elements and/or Materials |
|
Proxy method to construct a simple element - full description of the element contained is contained in one definition |
|
Proxy method to construct a composite element - a mixture of predefined isotopes |
Module Contents¶
- pyg4ometry.geant4._Material._nistMaterialDict = None¶
- pyg4ometry.geant4._Material._nistMaterialList = None¶
- pyg4ometry.geant4._Material._nistElementZToName = None¶
- pyg4ometry.geant4._Material.getNistMaterialDict()¶
- pyg4ometry.geant4._Material.getNistMaterialList()¶
- pyg4ometry.geant4._Material.getNistElementZToName()¶
- pyg4ometry.geant4._Material._getClassVariables(obj)¶
- pyg4ometry.geant4._Material._makeNISTCompoundList()¶
- pyg4ometry.geant4._Material._safeName(name)¶
- pyg4ometry.geant4._Material.loadNISTMaterialDict()¶
- pyg4ometry.geant4._Material.nist_materials_name_lookup(name)¶
- pyg4ometry.geant4._Material.nist_materials_z_lookup(z)¶
- pyg4ometry.geant4._Material.nist_element_2geant4Element(name, reg=None)¶
This returns and instance of either ElementSimple or ElementIsotopeMixture.
- pyg4ometry.geant4._Material.nist_material_2geant4Material(name, reg=None)¶
- pyg4ometry.geant4._Material.MaterialPredefined(name, registry=None)¶
Proxy method to construct a NIST compound material - this is just a handle as nothing needs to be additionally defined for a NIST compound. A check is performed on the name to ensure it is a valid NIST specifier.
- Inputs:
name - string
- pyg4ometry.geant4._Material.MaterialArbitrary(name, registry=None)¶
Just a name of a material. WARNING: It is left to the user to ensure that the name is valid.
- Inputs:
name - string
- pyg4ometry.geant4._Material.MaterialSingleElement(name, atomic_number, atomic_weight, density, registry=None, tolerateZeroDensity=False)¶
Proxy method to construct a simple material - full description of the element contained is contained in one definition
- Inputs:
name - string atomic_number - int, number of protons, commonly known as ‘Z’ atomic_weight - molar weight in g/mole, commonly known as ‘A’ density - float, material density in g/cm3
- pyg4ometry.geant4._Material.MaterialCompound(name, density, number_of_components, registry=None, tolerateZeroDensity=False, state=None)¶
Proxy method to construct a composite material - can be any mixture of Elements and/or Materials
- Inputs:
name - string density - float, material density in g/cm3 number_of_components - int, number of components in the mixture
- pyg4ometry.geant4._Material.ElementSimple(name, symbol, Z, A, registry=None)¶
Proxy method to construct a simple element - full description of the element contained is contained in one definition
- Inputs:
name - string symbol - string, chemical formula of the compound Z - int, Atomic number A - float, mass number
- pyg4ometry.geant4._Material.ElementIsotopeMixture(name, symbol, n_comp, registry=None, state=None)¶
Proxy method to construct a composite element - a mixture of predefined isotopes
- Inputs:
name - string symbol - string, chemical formula of the compound n_comp - int, number of isotope components
- class pyg4ometry.geant4._Material.MaterialBase(name, state=None, registry=None)¶
- name¶
- state¶
- registry¶
- _addToRegistry()¶
- get_material_oject(material)¶
- set_registry(registry, dontWarnIfAlreadyAdded=False)¶
- set_state(state)¶
- __repr__()¶
- class pyg4ometry.geant4._Material.Material(**kwargs)¶
Bases:
MaterialBaseThis class provides an interface to GDML material definitions.
Because of the different options for constructing a material instance the constructor is kwarg only. Proxy methods are provided to instantiate particular types of material. Those proxy methods are:
MaterialSingleElement MaterialCompound MaterialPredefined
It is possible to instantiate a material directly through kwargs. The possible kwargs are (but note some are mutually exclusive): name - string density - float atomic_number - int atomic_weight - float number_of_components - int state - string pressure - float pressure_unit - string temperature - float temperature_unit - string
- density¶
- atomic_number¶
- atomic_weight¶
- number_of_components¶
- components = []¶
- properties¶
- _state_variables¶
- _NIST_compounds¶
- add_element_massfraction(element, massfraction)¶
Add an element as a component to a material as a fraction of the material mass. Can only add elements to materials defined as composite.
- Inputs:
element - pyg4ometry.geant4.Material.Element instance massfraction - float, 0.0 < massfraction <= 1.0
- add_element_natoms(element, natoms)¶
Add an element as a component to a material as a number of atoms in the material molecule. Can only add elements to materials defined as composite.
- Inputs:
element - pyg4ometry.geant4.Material.Element instance natoms - int, number of atoms in the compound molecule
- add_material(material, fractionmass)¶
Add a material as a component to another material (mixture) as a fraction of the mixture mass. Can only add new materials to materials defined as composite.
- Inputs:
material - pyg4ometry.geant4.Material.Material instance massfraction - float, 0.0 < massfraction <= 1.0
- set_pressure(value, unit='pascal')¶
- set_temperature(value, unit='K')¶
- property state_variables¶
- __str__()¶
- addProperty(name, matrix)¶
Add a material property from a matrix.
- addVecProperty(name, e, v, eunit='eV', vunit='')¶
Add a property from an energy and a value vector to this object.
- Parameters:
- class pyg4ometry.geant4._Material.Element(**kwargs)¶
Bases:
MaterialBaseThis class provides an interface to GDML material definitions. Because of the different options for constructing a material instance the constructor is kwarg only. Proxy methods are provided to instantiate particular types of material. Those proxy methods are:
ElementSimple ElementIsotopeMixture
It is possible to instantiate a material directly through kwargs. The possible kwargs are (but note some are mutually exclusive): name - string symbol - string Z - int A - int n_comp - int
- symbol¶
- n_comp¶
- Z¶
- A¶
- components = []¶
- add_isotope(isotope, abundance)¶
Add an isotope as a component to an element as an abundance fraction in the element.
- Inputs:
element - pyg4ometry.geant4.Material.Isotope instance abundance - float, 0.0 < abundance <= 1.0
- class pyg4ometry.geant4._Material.Isotope(name, Z, N, a, registry=None)¶
Bases:
MaterialBaseThis class that handles isotopes as components of composite materials. An element can be defined as a mixture of isotopes.
- Inputs:
name - string Z - int, atomic number N - int, mass number a - float, molar weight in g/mole
- Z¶
- N¶
- a¶
- type = 'isotope'¶