Celeritas
0.5.0-56+6b053cd
|
Access material properties. More...
#include <MaterialView.hh>
Public Types | |
Type aliases | |
using | MaterialParamsRef = NativeCRef< MaterialParamsData > |
Public Member Functions | |
CELER_FUNCTION | MaterialView (MaterialParamsRef const ¶ms, MaterialId id) |
Construct from dynamic and static particle properties. | |
CELER_FORCEINLINE_FUNCTION MaterialId | material_id () const |
Get the material id being viewed. | |
CELER_FORCEINLINE_FUNCTION real_type | number_density () const |
Get atomic number density [1/len^3]. | |
CELER_FORCEINLINE_FUNCTION real_type | temperature () const |
Get material temperature [K]. | |
CELER_FORCEINLINE_FUNCTION MatterState | matter_state () const |
Get material's state of matter (gas, liquid, solid). | |
CELER_FORCEINLINE_FUNCTION OpticalMaterialId | optical_material_id () const |
Get the index in the optical properties for this material. More... | |
CELER_FUNCTION ElementComponentId::size_type | num_elements () const |
Number of elements present in this material. | |
CELER_FUNCTION ElementView | make_element_view (ElementComponentId id) const |
Get element properties from a material-specific index. | |
CELER_FUNCTION ElementId | element_id (ElementComponentId id) const |
ID of a component element in this material. | |
CELER_FUNCTION real_type | get_element_density (ElementComponentId id) const |
Number density of an element in this material [1/len^3]. | |
CELER_FUNCTION Span< MatElementComponent const > | elements () const |
View the elemental components (id/fraction) of this material. | |
CELER_FUNCTION real_type | zeff () const |
Weighted atomic number. More... | |
CELER_FUNCTION real_type | density () const |
Material's density [mass/len^3]. | |
CELER_FUNCTION real_type | electron_density () const |
Electrons per unit volume [1/len^3]. | |
CELER_FUNCTION real_type | radiation_length () const |
Radiation length for high-energy electron Bremsstrahlung [len]. | |
CELER_FUNCTION units::MevEnergy | mean_excitation_energy () const |
Mean excitation energy [MeV]. | |
CELER_FUNCTION units::LogMevEnergy | log_mean_excitation_energy () const |
Log mean excitation energy. | |
Access material properties.
A material is a combination of nuclides/elements at a particular state (e.g. density, temperature). The proportions and identities of a material's constitutents are encoded in the elements
accessor, where each index of the returned span corresponds to an ElementComponentId
for this material. The get_element_density
and element_view
helper functions can be used to calculate elemental densities and properties.
CELER_FUNCTION OpticalMaterialId celeritas::MaterialView::optical_material_id | ( | ) | const |
Get the index in the optical properties for this material.
This will return an invalid ID if the material has no optical properties attached.
|
inline |
Weighted atomic number.
This is Z weighted by the atomic fraction of each element in the material.