Elements and materials
Elements, substances, and material composition.
Note
MAT is experimental and unfinished; interfaces and behavior may change.
-
static constexpr std::array<std::string_view, 2> snt::mat::PT_HEADER
This file was generated using the following Python script
devtools/build_periodic_table.pyfrom data provided at the website of NIST Atomic Weights and Isotopic Compositions for All Elements
-
static constexpr std::array<Isotope, 354> snt::mat::PT_DATA
-
static constexpr size_t snt::mat::PT_NUM_DATA
-
class Element : public snt::mat::Part<int>, public snt::mat::Matter
- #include <element.h>
An element is a pure substance that consists entirely of one type of atom
Public Functions
-
Element(const std::string &expr, int prop = 1, bool nat = true)
Element class constructor
- Parameters:
expr – Element string representation
prop – Component proportion in a Composite
nat – Indicate if element is a natural isotope
-
std::string to_string()
String representation of an element instance
- Returns:
String representation
Public Members
-
struct snt::mat::Element::ElementProperties elementProps
set of basic element properties
-
bool natural
true if element is naturally abundant
-
std::string element
element symbol
-
unsigned int isotope
isotope type
-
unsigned int ionisation
ionisation state
Public Static Functions
-
Element(const std::string &expr, int prop = 1, bool nat = true)
-
struct Isotope
- #include <periodic_table.h>
-
class Material : public snt::mat::Set<Substance, double>, public snt::mat::Matter
- #include <material.h>
A material represented as a set of substances and their composition.
The set stores substance amounts as
doublevalues; the interpretation of those amounts (mass, fraction, or another quantity) follows the material construction and solver context.
-
class Matter
- #include <matter.h>
Matter is anything that has mass and occupies space
Subclassed by snt::mat::Element, snt::mat::Material, snt::mat::Substance
Public Members
-
struct snt::mat::Matter::MatterProperties matterProps
set of basic matter properties
-
puq::Quantity mass_density
Mass density.
-
puq::Quantity number_density
Number density.
-
struct snt::mat::Matter::MatterProperties matterProps
-
template<typename PROPORTION>
class Part - #include <part.h>
A part is an individual substance or part that combines with others to form a larger whole
- Template Parameters:
PROPORTION – proportion coefficient type (double or integer)
Public Functions
-
inline Part(PROPORTION prop, const std::string &expr = "")
Create a part
- Parameters:
prop – Proportion of this part in a Composite
expr – String representation of a part
-
template<typename MEMBER, typename PROPORTION>
class Set - #include <set.h>
A set is a material or object made up of two or more distinct members that remain physically separate and identifiable within the final structure
- Template Parameters:
MEMBER – Type of set members
PROPORTION – Proportion data type
Public Types
-
using PartMap = std::map<std::string, PROPORTION>
Map of parts and their proportions.
Public Functions
Public Members
-
std::map<std::string, Part<PROPORTION>> parts
Map of parts.
-
std::string expression
String representation of a set.
-
bool natural
true if set is using natural abundances
-
class Substance : public snt::mat::Set<Element, int>, public snt::mat::Part<double>, public snt::mat::Matter
- #include <substance.h>
A form of matter with uniform and definite composition and distinct physical and chemical properties.
Public Functions
-
Substance(const ElementMap &comp, double prop = 1, bool nat = true)
Substance class constructor from a map of components and their proportions
- Parameters:
comp – Map of components and their proportions
prop – Component proportion in a Composite
nat – Indicate if substance atoms should use natural abundance
-
Substance(const std::string &expr, double prop = 1, bool nat = true)
Substance class constructor from an expression
- Parameters:
expr – Element string representation
prop – Component proportion in a Composite
nat – Indicate if substance atoms should use natural abundance
-
std::string to_string() const
Convert element to a string
- Returns:
String representation of a substance
-
Substance(const ElementMap &comp, double prop = 1, bool nat = true)