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 (int const material_id, 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. | |
bool | hasPhase (std::string const &phase_name) const |
A query for a named phase. | |
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 |
std::string | description () const |
Short description of the medium. | |
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 |
Private Attributes | |
std::vector< std::unique_ptr< Phase > > const | phases_ |
The vector that holds the phases. | |
PropertyArray | properties_ |
int const | material_id_ |
MaterialPropertyLib::Medium::Medium | ( | int const | material_id, |
std::vector< std::unique_ptr< Phase > > && | phases, | ||
std::unique_ptr< PropertyArray > && | properties ) |
Definition at line 21 of file Medium.cpp.
References MaterialPropertyLib::overwriteExistingProperties(), phases_, properties_, and MaterialPropertyLib::updatePropertiesForAllPhases().
|
inline |
Definition at line 83 of file Medium.h.
References d2Value(), and property().
Referenced by d2Value().
std::string MaterialPropertyLib::Medium::description | ( | ) | const |
Short description of the medium.
Definition at line 80 of file Medium.cpp.
References material_id_.
Referenced by property().
|
inline |
Definition at line 75 of file Medium.h.
References dValue(), and property().
Referenced by dValue().
bool MaterialPropertyLib::Medium::hasPhase | ( | std::string const & | phase_name | ) | const |
A query for a named phase.
Definition at line 47 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 70 of file Medium.cpp.
References properties_.
Referenced by ProcessLib::RichardsMechanics::RichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assembleWithJacobianEvalConstitutiveSetting(), 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 75 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 33 of file Medium.cpp.
References phases_.
Referenced by ProcessLib::WellboreSimulator::WellboreSimulatorFEM< ShapeFunction, GlobalDim >::WellboreSimulatorFEM(), ProcessLib::RichardsFlow::LocalAssemblerData< ShapeFunction, GlobalDim >::assemble(), ProcessLib::StokesFlow::LocalAssemblerData< ShapeFunctionLiquidVelocity, ShapeFunctionPressure, GlobalDim >::assemble(), ProcessLib::WellboreCompensateNeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::assemble(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleBlockMatrices(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleComponentTransportEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleHeatTransportEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleHydraulicEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleKCmCn(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianComponentTransportEquation(), ProcessLib::RichardsMechanics::RichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assembleWithJacobianEvalConstitutiveSetting(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianHydraulicEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::calculateIntPtDarcyVelocity(), ProcessLib::StokesFlow::anonymous_namespace{CreateStokesFlowProcess.cpp}::checkMPLProperties(), MaterialPropertyLib::fluidPhase(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getFlux(), ProcessLib::HT::HTFEM< ShapeFunction, GlobalDim >::getFlux(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getHeatEnergyCoefficient(), ProcessLib::HT::HTFEM< ShapeFunction, GlobalDim >::getHeatEnergyCoefficient(), ProcessLib::RichardsFlow::LocalAssemblerData< ShapeFunction, GlobalDim >::getIntPtDarcyVelocity(), ProcessLib::HT::HTFEM< ShapeFunction, GlobalDim >::getIntPtDarcyVelocityLocal(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getIntPtMolarFlux(), hasPhase(), ChemistryLib::PhreeqcIOData::PhreeqcIO::initializeChemicalSystemConcrete(), phase(), ChemistryLib::PhreeqcIOData::PhreeqcIO::setChemicalSystemConcrete(), ChemistryLib::PhreeqcIOData::anonymous_namespace{PhreeqcIO.cpp}::setPorosityPostReaction(), 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 38 of file Medium.cpp.
References BaseLib::findElementOrError(), MaterialPropertyLib::Phase::name, OGS_FATAL, 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 54 of file Medium.cpp.
References description(), OGS_FATAL, properties_, property(), and MaterialPropertyLib::property_enum_to_string.
Referenced by ProcessLib::RichardsMechanics::RichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assembleWithJacobianEvalConstitutiveSetting(), ProcessLib::ThermoRichardsMechanics::ThermoRichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunction, DisplacementDim, ConstitutiveTraits >::convertInitialStressType(), d2Value(), dValue(), ProcessLib::TH2M::ConstitutiveRelations::BiotModel::eval(), ProcessLib::TH2M::ConstitutiveRelations::PhaseTransition::eval(), ProcessLib::ThermoRichardsMechanics::BiotModel::eval(), ProcessLib::ThermoRichardsMechanics::PorosityModel< DisplacementDim >::eval(), ProcessLib::ThermoRichardsMechanics::TRMHeatStorageAndFluxModel< DisplacementDim >::eval(), operator[](), property(), ProcessLib::RichardsMechanics::updateSwellingStressAndVolumetricStrain(), value(), and value().
|
inline |
|
inline |
|
private |
The first material id for which the medium was created. Used in the description.
Definition at line 105 of file Medium.h.
Referenced by description().
|
private |
The vector that holds the phases.
Definition at line 94 of file Medium.h.
Referenced by Medium(), hasPhase(), numberOfPhases(), phase(), 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 101 of file Medium.h.
Referenced by Medium(), hasProperty(), and property().