![]() |
OGS
|
This class is for material objects on the Medium scale.
A Medium consists of an arbitrarily long vector of phases and an array of properties.
#include <Medium.h>
Public Member Functions | |
Medium (std::vector< std::unique_ptr< Phase >> &&phases, std::unique_ptr< PropertyArray > &&properties) | |
Phase const & | phase (std::size_t index) const |
Phase const & | phase (std::string const &phase_name) const |
A get-function for a particular phase by phase name. More... | |
bool | hasPhase (std::string const &phase_name) const |
A query for a named phase. More... | |
Property const & | property (PropertyType const &p) const |
Property const & | operator[] (PropertyType const &p) const |
bool | hasProperty (PropertyType const &p) const |
std::size_t | numberOfPhases () const |
template<typename T > | |
T | value (PropertyType const p) const |
template<typename T > | |
T | value (PropertyType const p, VariableArray const &variable_array) const |
template<typename T > | |
T | dValue (PropertyType const p, VariableArray const &variable_array, Variable const variable) const |
template<typename T > | |
T | d2Value (PropertyType const p, VariableArray const &variable_array, Variable const variable1, Variable const variable2) const |
Static Public Member Functions | |
static std::string | description () |
Short description of the medium. More... | |
Private Attributes | |
std::vector< std::unique_ptr< Phase > > const | phases_ |
The vector that holds the phases. More... | |
PropertyArray | properties_ |
MaterialPropertyLib::Medium::Medium | ( | std::vector< std::unique_ptr< Phase >> && | phases, |
std::unique_ptr< PropertyArray > && | properties | ||
) |
Definition at line 20 of file Medium.cpp.
References MaterialPropertyLib::overwriteExistingProperties(), and properties_.
|
inline |
Definition at line 82 of file Medium.h.
References property().
|
static |
Short description of the medium.
Definition at line 77 of file Medium.cpp.
Referenced by property().
|
inline |
Definition at line 74 of file Medium.h.
References property().
bool MaterialPropertyLib::Medium::hasPhase | ( | std::string const & | phase_name | ) | const |
A query for a named phase.
Definition at line 44 of file Medium.cpp.
References MaterialPropertyLib::Phase::name, phase(), and phases_.
Referenced by MaterialPropertyLib::fluidPhase().
bool MaterialPropertyLib::Medium::hasProperty | ( | PropertyType const & | p | ) | const |
Definition at line 67 of file Medium.cpp.
References properties_.
Referenced by MaterialPropertyLib::checkRequiredProperties(), and ProcessLib::RichardsMechanics::updateSwellingStressAndVolumetricStrain().
std::size_t MaterialPropertyLib::Medium::numberOfPhases | ( | ) | const |
A simple get-function for retrieving the number of phases the medium consists of.
Definition at line 72 of file Medium.cpp.
References phases_.
Property const & MaterialPropertyLib::Medium::operator[] | ( | PropertyType const & | p | ) | const |
Phase const & MaterialPropertyLib::Medium::phase | ( | std::size_t | index | ) | const |
A get-function for a particular phase. The ul argument specifies the index within the phases_ vector.
Definition at line 30 of file Medium.cpp.
References phases_.
Referenced by MaterialPropertyLib::fluidPhase(), hasPhase(), ChemistryLib::PhreeqcIOData::PhreeqcIO::initializeChemicalSystemConcrete(), phase(), ChemistryLib::PhreeqcIOData::PhreeqcIO::setChemicalSystemConcrete(), ChemistryLib::PhreeqcIOData::anonymous_namespace{PhreeqcIO.cpp}::setPorosityPostReaction(), ProcessLib::TH2M::PhaseTransitionEvaporation::updateConstitutiveVariables(), ProcessLib::TH2M::PhaseTransitionNone::updateConstitutiveVariables(), and ChemistryLib::PhreeqcIOData::anonymous_namespace{PhreeqcIO.cpp}::updateReactantVolumeFraction().
Phase const & MaterialPropertyLib::Medium::phase | ( | std::string const & | phase_name | ) | const |
A get-function for a particular phase by phase name.
Definition at line 35 of file Medium.cpp.
References BaseLib::findElementOrError(), phase(), and phases_.
Property const & MaterialPropertyLib::Medium::property | ( | PropertyType const & | p | ) | const |
A get-function for a property. The argument refers to the name of the property.
Definition at line 51 of file Medium.cpp.
References description(), OGS_FATAL, properties_, and MaterialPropertyLib::property_enum_to_string.
Referenced by d2Value(), dValue(), operator[](), ProcessLib::RichardsMechanics::updateSwellingStressAndVolumetricStrain(), and value().
|
inline |
Definition at line 62 of file Medium.h.
References property().
|
inline |
Definition at line 68 of file Medium.h.
References property().
|
private |
The vector that holds the phases.
Definition at line 93 of file Medium.h.
Referenced by hasPhase(), numberOfPhases(), and phase().
|
private |
The array that holds the medium properties.
Currently, these defaults is the volume fraction average.
Most properties are fine with the volume fraction average, but special-defaults are allowed as well...
Definition at line 100 of file Medium.h.
Referenced by Medium(), hasProperty(), and property().