OGS
MaterialPropertyLib::Property Class Reference

Detailed Description

This class is the base class for any material property of any scale (i.e. components, phases, media, ...). The single value of that Property can hold scalars, vectors, tensors, strings, etc.

Definition at line 50 of file Property.h.

#include <Property.h>

Inherited by MaterialPropertyLib::AverageMolarMass, MaterialPropertyLib::BishopsPowerLaw, MaterialPropertyLib::BishopsSaturationCutoff, MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten, MaterialPropertyLib::CapillaryPressureVanGenuchten, MaterialPropertyLib::ClausiusClapeyron, MaterialPropertyLib::Constant, MaterialPropertyLib::CubicLawPermeability, MaterialPropertyLib::Curve, MaterialPropertyLib::DupuitPermeability, MaterialPropertyLib::EffectiveThermalConductivityPorosityMixing< GlobalDim >, MaterialPropertyLib::EmbeddedFracturePermeability< DisplacementDim >, MaterialPropertyLib::Exponential, MaterialPropertyLib::Function, MaterialPropertyLib::GasPressureDependentPermeability< DisplacementDim >, MaterialPropertyLib::IdealGasLaw, MaterialPropertyLib::IdealGasLawBinaryMixture, MaterialPropertyLib::KozenyCarmanModel, MaterialPropertyLib::Linear, MaterialPropertyLib::LinearSaturationSwellingStress, MaterialPropertyLib::LinearWaterVapourLatentHeat, MaterialPropertyLib::LiquidViscosityVogels< VogelsConstants >, MaterialPropertyLib::OrthotropicEmbeddedFracturePermeability< DisplacementDim >, MaterialPropertyLib::Parameter, MaterialPropertyLib::PengRobinson, MaterialPropertyLib::PermeabilityMohrCoulombFailureIndexModel< DisplacementDim >, MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >, MaterialPropertyLib::PorosityFromMassBalance, MaterialPropertyLib::RelPermBrooksCorey, MaterialPropertyLib::RelPermBrooksCoreyNonwettingPhase, MaterialPropertyLib::RelPermGeneralizedPower, MaterialPropertyLib::RelPermGeneralizedPowerNonwettingPhase, MaterialPropertyLib::RelPermLiakopoulos, MaterialPropertyLib::RelPermNonWettingPhaseVanGenuchtenMualem, MaterialPropertyLib::RelPermUdell, MaterialPropertyLib::RelPermUdellNonwettingPhase, MaterialPropertyLib::RelPermVanGenuchten, MaterialPropertyLib::SaturationBrooksCorey, MaterialPropertyLib::SaturationDependentSwelling, MaterialPropertyLib::SaturationExponential, MaterialPropertyLib::SaturationLiakopoulos, MaterialPropertyLib::SaturationVanGenuchten, MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain, MaterialPropertyLib::SaturationWeightedThermalConductivity< MeantType, GlobalDimension >, MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat, MaterialPropertyLib::StrainDependentPermeability< DisplacementDim >, MaterialPropertyLib::TemperatureDependentDiffusion, MaterialPropertyLib::TemperatureDependentFraction, MaterialPropertyLib::TransportPorosityFromMassBalance, MaterialPropertyLib::VapourDiffusionDeVries, MaterialPropertyLib::VapourDiffusionFEBEX, MaterialPropertyLib::VapourDiffusionPMQ, MaterialPropertyLib::VermaPruessModel, MaterialPropertyLib::VolumeFractionAverage, MaterialPropertyLib::WaterDensityIAPWSIF97Region1, MaterialPropertyLib::WaterEnthalpyIAPWSIF97Region1, MaterialPropertyLib::WaterLiquidDensityIAPWSIF97Region4, MaterialPropertyLib::WaterLiquidEnthalpyIAPWSIF97Region4, MaterialPropertyLib::WaterSaturationTemperatureIAPWSIF97Region4, MaterialPropertyLib::WaterTemperatureIAPWSIF97Region1, MaterialPropertyLib::WaterThermalConductivityIAPWS, MaterialPropertyLib::WaterVapourDensity, MaterialPropertyLib::WaterVapourDensityIAPWSIF97Region4, MaterialPropertyLib::WaterVapourEnthalpyIAPWSIF97Region4, MaterialPropertyLib::WaterVapourLatentHeatWithCriticalTemperature, and MaterialPropertyLib::WaterViscosityIAPWS.

Public Member Functions

virtual ~Property ()
 
virtual PropertyDataType initialValue (ParameterLib::SpatialPosition const &pos, double const t) const
 
virtual PropertyDataType value () const
 
virtual PropertyDataType value (VariableArray const &variable_array, VariableArray const &variable_array_prev, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
virtual PropertyDataType value (VariableArray const &variable_array, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
virtual PropertyDataType dValue (VariableArray const &variable_array, VariableArray const &variable_array_prev, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
virtual PropertyDataType dValue (VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
virtual PropertyDataType d2Value (VariableArray const &variable_array, Variable const variable1, Variable const variable2, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 Default implementation: 2nd derivative of any constant property is zero.
 
virtual void setProperties (std::vector< std::unique_ptr< Phase > > const &phases)
 Default implementation:
 
void setScale (std::variant< Medium *, Phase *, Component * > scale)
 
template<typename T >
initialValue (ParameterLib::SpatialPosition const &pos, double const t) const
 
template<typename T >
value () const
 
template<typename T >
value (VariableArray const &variable_array, VariableArray const &variable_array_prev, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
value (VariableArray const &variable_array, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
dValue (VariableArray const &variable_array, VariableArray const &variable_array_prev, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
dValue (VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
d2Value (VariableArray const &variable_array, Variable const &variable1, Variable const &variable2, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 

Protected Attributes

std::string name_
 
PropertyDataType value_
 The single value of a property.
 
PropertyDataType dvalue_
 
std::variant< Medium *, Phase *, Component * > scale_
 

Private Member Functions

virtual void checkScale () const
 
std::string description () const
 

Private Attributes

bool property_used = false
 

Static Private Attributes

static constexpr std::array property_data_type_names_
 Corresponds to the PropertyDataType.
 

Constructor & Destructor Documentation

◆ ~Property()

virtual MaterialPropertyLib::Property::~Property ( )
inlinevirtual

Definition at line 54 of file Property.h.

55 {
56 if (property_used)
57 {
58 DBUG("Property is used: '{:s}'", description());
59 }
60 else
61 {
62 WARN("Property is not used: '{:s}'", description());
63 }
64 }
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30
void WARN(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:40
std::string description() const
Definition Property.cpp:151

References DBUG(), description(), property_used, and WARN().

Member Function Documentation

◆ checkScale()

virtual void MaterialPropertyLib::Property::checkScale ( ) const
inlineprivatevirtual

Reimplemented in MaterialPropertyLib::AverageMolarMass, MaterialPropertyLib::BishopsPowerLaw, MaterialPropertyLib::BishopsSaturationCutoff, MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten, MaterialPropertyLib::CapillaryPressureVanGenuchten, MaterialPropertyLib::ClausiusClapeyron, MaterialPropertyLib::CubicLawPermeability, MaterialPropertyLib::EffectiveThermalConductivityPorosityMixing< GlobalDim >, MaterialPropertyLib::EffectiveThermalConductivityPorosityMixing< GlobalDim >, MaterialPropertyLib::EmbeddedFracturePermeability< DisplacementDim >, MaterialPropertyLib::GasPressureDependentPermeability< DisplacementDim >, MaterialPropertyLib::IdealGasLaw, MaterialPropertyLib::IdealGasLawBinaryMixture, MaterialPropertyLib::LinearSaturationSwellingStress, MaterialPropertyLib::LinearWaterVapourLatentHeat, MaterialPropertyLib::LiquidViscosityVogels< VogelsConstants >, MaterialPropertyLib::OrthotropicEmbeddedFracturePermeability< DisplacementDim >, MaterialPropertyLib::PermeabilityMohrCoulombFailureIndexModel< DisplacementDim >, MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >, MaterialPropertyLib::PorosityFromMassBalance, MaterialPropertyLib::RelPermBrooksCorey, MaterialPropertyLib::RelPermBrooksCoreyNonwettingPhase, MaterialPropertyLib::RelPermGeneralizedPower, MaterialPropertyLib::RelPermGeneralizedPowerNonwettingPhase, MaterialPropertyLib::RelPermLiakopoulos, MaterialPropertyLib::RelPermNonWettingPhaseVanGenuchtenMualem, MaterialPropertyLib::RelPermUdell, MaterialPropertyLib::RelPermUdellNonwettingPhase, MaterialPropertyLib::RelPermVanGenuchten, MaterialPropertyLib::SaturationBrooksCorey, MaterialPropertyLib::SaturationDependentSwelling, MaterialPropertyLib::SaturationExponential, MaterialPropertyLib::SaturationLiakopoulos, MaterialPropertyLib::SaturationVanGenuchten, MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain, MaterialPropertyLib::SaturationWeightedThermalConductivity< MeantType, GlobalDimension >, MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat, MaterialPropertyLib::StrainDependentPermeability< DisplacementDim >, MaterialPropertyLib::TemperatureDependentDiffusion, MaterialPropertyLib::TemperatureDependentFraction, MaterialPropertyLib::TransportPorosityFromMassBalance, MaterialPropertyLib::VapourDiffusionDeVries, MaterialPropertyLib::VapourDiffusionFEBEX, MaterialPropertyLib::VapourDiffusionPMQ, MaterialPropertyLib::VolumeFractionAverage, MaterialPropertyLib::WaterDensityIAPWSIF97Region1, MaterialPropertyLib::WaterEnthalpyIAPWSIF97Region1, MaterialPropertyLib::WaterLiquidDensityIAPWSIF97Region4, MaterialPropertyLib::WaterLiquidEnthalpyIAPWSIF97Region4, MaterialPropertyLib::WaterSaturationTemperatureIAPWSIF97Region4, MaterialPropertyLib::WaterTemperatureIAPWSIF97Region1, MaterialPropertyLib::WaterThermalConductivityIAPWS, MaterialPropertyLib::WaterVapourDensity, MaterialPropertyLib::WaterVapourDensityIAPWSIF97Region4, MaterialPropertyLib::WaterVapourEnthalpyIAPWSIF97Region4, MaterialPropertyLib::WaterVapourLatentHeatWithCriticalTemperature, and MaterialPropertyLib::WaterViscosityIAPWS.

Definition at line 300 of file Property.h.

301 {
302 // Empty check for properties which can be defined on every scale,
303 // medium, phase or component
304 }

Referenced by setScale().

◆ d2Value() [1/2]

template<typename T >
T MaterialPropertyLib::Property::d2Value ( VariableArray const & variable_array,
Variable const & variable1,
Variable const & variable2,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
inline

Definition at line 263 of file Property.h.

267 {
268 try
269 {
270#ifndef NDEBUG
271 property_used = true;
272#endif
273 return std::get<T>(
274 d2Value(variable_array, variable1, variable2, pos, t, dt));
275 }
276 catch (std::bad_variant_access const&)
277 {
278 OGS_FATAL(
279 "The second derivative value of {:s} is not of the requested "
280 "type '{:s}' but a {:s}.",
281 description(),
282 typeid(T).name(),
283 property_data_type_names_[d2Value(variable_array, variable1,
284 variable2, pos, t, dt)
285 .index()]);
286 }
287 }
#define OGS_FATAL(...)
Definition Error.h:26
virtual PropertyDataType d2Value(VariableArray const &variable_array, Variable const variable1, Variable const variable2, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
Default implementation: 2nd derivative of any constant property is zero.
Definition Property.cpp:131
static constexpr std::array property_data_type_names_
Corresponds to the PropertyDataType.
Definition Property.h:312

References d2Value(), description(), MaterialPropertyLib::name, OGS_FATAL, property_data_type_names_, and property_used.

◆ d2Value() [2/2]

PropertyDataType MaterialPropertyLib::Property::d2Value ( VariableArray const & variable_array,
Variable const variable1,
Variable const variable2,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
virtual

◆ description()

std::string MaterialPropertyLib::Property::description ( ) const
private

Definition at line 151 of file Property.cpp.

152{
153 return "property '" + name_ + "' defined for " +
154 std::visit(
155 [](auto&& scale) -> std::string
156 {
157 if (scale == nullptr)
158 {
159 return "unknown scale";
160 }
161 return scale->description();
162 },
163 scale_);
164}
std::variant< Medium *, Phase *, Component * > scale_
Definition Property.h:297
void scale(PETScVector &x, PetscScalar const a)
Definition LinAlg.cpp:44

References name_, and scale_.

Referenced by ~Property(), d2Value(), dValue(), dValue(), initialValue(), value(), value(), and value().

◆ dValue() [1/4]

PropertyDataType MaterialPropertyLib::Property::dValue ( VariableArray const & variable_array,
Variable const variable,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
virtual

This virtual method will compute the property derivative value based on the variables that are passed as arguments with the default implementation using empty variables array for the previous time step.

The default implementation of this method only returns the property value derivative without altering it.

Reimplemented in MaterialPropertyLib::AverageMolarMass, MaterialPropertyLib::BishopsPowerLaw, MaterialPropertyLib::BishopsSaturationCutoff, MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten, MaterialPropertyLib::CapillaryPressureVanGenuchten, MaterialPropertyLib::ClausiusClapeyron, MaterialPropertyLib::CubicLawPermeability, MaterialPropertyLib::Curve, MaterialPropertyLib::EffectiveThermalConductivityPorosityMixing< GlobalDim >, MaterialPropertyLib::EffectiveThermalConductivityPorosityMixing< GlobalDim >, MaterialPropertyLib::EmbeddedFracturePermeability< DisplacementDim >, MaterialPropertyLib::Exponential, MaterialPropertyLib::Function, MaterialPropertyLib::GasPressureDependentPermeability< DisplacementDim >, MaterialPropertyLib::IdealGasLaw, MaterialPropertyLib::IdealGasLawBinaryMixture, MaterialPropertyLib::Linear, MaterialPropertyLib::LinearSaturationSwellingStress, MaterialPropertyLib::LinearWaterVapourLatentHeat, MaterialPropertyLib::LiquidViscosityVogels< VogelsConstants >, MaterialPropertyLib::OrthotropicEmbeddedFracturePermeability< DisplacementDim >, MaterialPropertyLib::Parameter, MaterialPropertyLib::PengRobinson, MaterialPropertyLib::PermeabilityMohrCoulombFailureIndexModel< DisplacementDim >, MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >, MaterialPropertyLib::PorosityFromMassBalance, MaterialPropertyLib::RelPermBrooksCorey, MaterialPropertyLib::RelPermBrooksCoreyNonwettingPhase, MaterialPropertyLib::RelPermGeneralizedPower, MaterialPropertyLib::RelPermGeneralizedPowerNonwettingPhase, MaterialPropertyLib::RelPermLiakopoulos, MaterialPropertyLib::RelPermNonWettingPhaseVanGenuchtenMualem, MaterialPropertyLib::RelPermUdell, MaterialPropertyLib::RelPermUdellNonwettingPhase, MaterialPropertyLib::RelPermVanGenuchten, MaterialPropertyLib::SaturationBrooksCorey, MaterialPropertyLib::SaturationExponential, MaterialPropertyLib::SaturationLiakopoulos, MaterialPropertyLib::SaturationVanGenuchten, MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain, MaterialPropertyLib::SaturationWeightedThermalConductivity< MeantType, GlobalDimension >, MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat, MaterialPropertyLib::StrainDependentPermeability< DisplacementDim >, MaterialPropertyLib::TemperatureDependentFraction, MaterialPropertyLib::TransportPorosityFromMassBalance, MaterialPropertyLib::VapourDiffusionDeVries, MaterialPropertyLib::VapourDiffusionFEBEX, MaterialPropertyLib::VapourDiffusionPMQ, MaterialPropertyLib::VolumeFractionAverage, MaterialPropertyLib::WaterDensityIAPWSIF97Region1, MaterialPropertyLib::WaterEnthalpyIAPWSIF97Region1, MaterialPropertyLib::WaterLiquidDensityIAPWSIF97Region4, MaterialPropertyLib::WaterLiquidEnthalpyIAPWSIF97Region4, MaterialPropertyLib::WaterSaturationTemperatureIAPWSIF97Region4, MaterialPropertyLib::WaterTemperatureIAPWSIF97Region1, MaterialPropertyLib::WaterThermalConductivityIAPWS, MaterialPropertyLib::WaterVapourDensity, MaterialPropertyLib::WaterVapourDensityIAPWSIF97Region4, MaterialPropertyLib::WaterVapourEnthalpyIAPWSIF97Region4, MaterialPropertyLib::WaterVapourLatentHeatWithCriticalTemperature, and MaterialPropertyLib::WaterViscosityIAPWS.

Definition at line 119 of file Property.cpp.

123{
124#ifndef NDEBUG
125 property_used = true;
126#endif
127 return dValue(variable_array, EmptyVariableArray, variable, pos, t, dt);
128}
virtual PropertyDataType dValue(VariableArray const &variable_array, VariableArray const &variable_array_prev, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
Definition Property.cpp:105
static const VariableArray EmptyVariableArray

References dValue(), MaterialPropertyLib::EmptyVariableArray, and property_used.

◆ dValue() [2/4]

template<typename T >
T MaterialPropertyLib::Property::dValue ( VariableArray const & variable_array,
Variable const variable,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
inline

Definition at line 240 of file Property.h.

243 {
244 try
245 {
246#ifndef NDEBUG
247 property_used = true;
248#endif
249 return std::get<T>(dValue(variable_array, variable, pos, t, dt));
250 }
251 catch (std::bad_variant_access const&)
252 {
253 OGS_FATAL(
254 "The first derivative value of {:s} is not of the requested "
255 "type '{:s}' but a {:s}.",
256 description(),
257 typeid(T).name(),
259 [dValue(variable_array, variable, pos, t, dt).index()]);
260 }
261 }

References description(), dValue(), MaterialPropertyLib::name, OGS_FATAL, property_data_type_names_, and property_used.

◆ dValue() [3/4]

PropertyDataType MaterialPropertyLib::Property::dValue ( VariableArray const & variable_array,
VariableArray const & variable_array_prev,
Variable const variable,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
virtual

This virtual method will compute the property derivative value based on the variables that are passed as arguments and the variables from the previous time step.

Reimplemented in MaterialPropertyLib::Constant, and MaterialPropertyLib::SaturationDependentSwelling.

Definition at line 105 of file Property.cpp.

110{
111#ifndef NDEBUG
112 property_used = true;
113#endif
114 return dvalue_;
115}
PropertyDataType dvalue_
Definition Property.h:293

References dvalue_, and property_used.

Referenced by dValue(), and dValue().

◆ dValue() [4/4]

template<typename T >
T MaterialPropertyLib::Property::dValue ( VariableArray const & variable_array,
VariableArray const & variable_array_prev,
Variable const variable,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
inline

Definition at line 215 of file Property.h.

219 {
220 try
221 {
222#ifndef NDEBUG
223 property_used = true;
224#endif
225 return std::get<T>(dValue(variable_array, variable_array_prev,
226 variable, pos, t, dt));
227 }
228 catch (std::bad_variant_access const&)
229 {
230 OGS_FATAL(
231 "The first derivative value of {:s} is not of the requested "
232 "type '{:s}' but a {:s}.",
233 description(),
234 typeid(T).name(),
236 [dValue(variable_array, variable, pos, t, dt).index()]);
237 }
238 }

References description(), dValue(), MaterialPropertyLib::name, OGS_FATAL, property_data_type_names_, and property_used.

◆ initialValue() [1/2]

PropertyDataType MaterialPropertyLib::Property::initialValue ( ParameterLib::SpatialPosition const & pos,
double const t ) const
virtual

Returns the initial (or reference) value of the property. The default implementation forwards to the value function.

Reimplemented in MaterialPropertyLib::PorosityFromMassBalance, and MaterialPropertyLib::TransportPorosityFromMassBalance.

Definition at line 69 of file Property.cpp.

71{
72 return value(EmptyVariableArray, pos, t,
73 std::numeric_limits<double>::quiet_NaN());
74}
virtual PropertyDataType value() const
Definition Property.cpp:76

References MaterialPropertyLib::EmptyVariableArray, and value().

Referenced by initialValue().

◆ initialValue() [2/2]

template<typename T >
T MaterialPropertyLib::Property::initialValue ( ParameterLib::SpatialPosition const & pos,
double const t ) const
inline

Definition at line 125 of file Property.h.

127 {
128 try
129 {
130 return std::get<T>(initialValue(pos, t));
131 }
132 catch (std::bad_variant_access const&)
133 {
134 OGS_FATAL(
135 "The initial value of {:s} does not hold requested type '{:s}' "
136 "but a {:s}.",
137 description(),
138 typeid(T).name(),
139 property_data_type_names_[initialValue(pos, t).index()]);
140 }
141 }
virtual PropertyDataType initialValue(ParameterLib::SpatialPosition const &pos, double const t) const
Definition Property.cpp:69

References description(), initialValue(), MaterialPropertyLib::name, OGS_FATAL, and property_data_type_names_.

◆ setProperties()

void MaterialPropertyLib::Property::setProperties ( std::vector< std::unique_ptr< Phase > > const & phases)
virtual

Default implementation:

This virtual method will collect the properties of the phases in order to access them from the medium property level.

Reimplemented in MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat, and MaterialPropertyLib::VolumeFractionAverage.

Definition at line 145 of file Property.cpp.

147{
148 // empty
149}

◆ setScale()

void MaterialPropertyLib::Property::setScale ( std::variant< Medium *, Phase *, Component * > scale)
inline

Definition at line 118 of file Property.h.

119 {
120 scale_ = scale;
121 checkScale();
122 };
virtual void checkScale() const
Definition Property.h:300

References checkScale(), and scale_.

◆ value() [1/6]

PropertyDataType MaterialPropertyLib::Property::value ( ) const
virtual

This virtual method simply returns the private value_ attribute without changing it.

Definition at line 76 of file Property.cpp.

77{
78#ifndef NDEBUG
79 property_used = true;
80#endif
81 return value_;
82}
PropertyDataType value_
The single value of a property.
Definition Property.h:292

References property_used, and value_.

Referenced by ProcessLib::RichardsMechanics::RichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assembleWithJacobianEvalConstitutiveSetting(), MaterialPropertyLib::AverageMolarMass::dValue(), MaterialPropertyLib::ClausiusClapeyron::dValue(), MaterialPropertyLib::PengRobinson::dValue(), MaterialPropertyLib::RelPermBrooksCorey::dValue(), MaterialPropertyLib::RelPermBrooksCoreyNonwettingPhase::dValue(), MaterialPropertyLib::RelPermLiakopoulos::dValue(), MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat::dValue(), MaterialPropertyLib::VolumeFractionAverage::dValue(), MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat::effectiveVolumetricHeatCapacity(), ProcessLib::TH2M::ConstitutiveRelations::SolidThermalExpansionModel< DisplacementDim >::eval(), ProcessLib::ThermoRichardsMechanics::SolidThermalExpansionModel< DisplacementDim >::eval(), ProcessLib::ThermoRichardsMechanics::TRMHeatStorageAndFluxModel< DisplacementDim >::eval(), initialValue(), MaterialPropertyLib::ClausiusClapeyron::molarMass(), MaterialPropertyLib::AverageMolarMass::value(), MaterialPropertyLib::PorosityFromMassBalance::value(), value(), value(), value(), MaterialPropertyLib::RelPermBrooksCorey::value(), MaterialPropertyLib::RelPermBrooksCoreyNonwettingPhase::value(), MaterialPropertyLib::RelPermLiakopoulos::value(), MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat::value(), MaterialPropertyLib::TransportPorosityFromMassBalance::value(), and MaterialPropertyLib::VolumeFractionAverage::value().

◆ value() [2/6]

template<typename T >
T MaterialPropertyLib::Property::value ( ) const
inline

Definition at line 144 of file Property.h.

145 {
146 try
147 {
148#ifndef NDEBUG
149 property_used = true;
150#endif
151 return std::get<T>(value());
152 }
153 catch (std::bad_variant_access const&)
154 {
155 OGS_FATAL(
156 "The value of {:s} does not hold requested type '{:s}' but a "
157 "{:s}.",
158 description(),
159 typeid(T).name(),
161 }
162 }

References description(), MaterialPropertyLib::name, OGS_FATAL, property_data_type_names_, property_used, and value().

◆ value() [3/6]

PropertyDataType MaterialPropertyLib::Property::value ( VariableArray const & variable_array,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
virtual

This virtual method will compute the property value based on the variables that are passed as arguments with the default implementation using empty variables array for the previous time step.

Reimplemented in MaterialPropertyLib::AverageMolarMass, MaterialPropertyLib::BishopsPowerLaw, MaterialPropertyLib::BishopsSaturationCutoff, MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten, MaterialPropertyLib::CapillaryPressureVanGenuchten, MaterialPropertyLib::ClausiusClapeyron, MaterialPropertyLib::CubicLawPermeability, MaterialPropertyLib::Curve, MaterialPropertyLib::DupuitPermeability, MaterialPropertyLib::EffectiveThermalConductivityPorosityMixing< GlobalDim >, MaterialPropertyLib::EffectiveThermalConductivityPorosityMixing< GlobalDim >, MaterialPropertyLib::EmbeddedFracturePermeability< DisplacementDim >, MaterialPropertyLib::Exponential, MaterialPropertyLib::Function, MaterialPropertyLib::GasPressureDependentPermeability< DisplacementDim >, MaterialPropertyLib::IdealGasLaw, MaterialPropertyLib::IdealGasLawBinaryMixture, MaterialPropertyLib::KozenyCarmanModel, MaterialPropertyLib::Linear, MaterialPropertyLib::LinearSaturationSwellingStress, MaterialPropertyLib::LinearWaterVapourLatentHeat, MaterialPropertyLib::LiquidViscosityVogels< VogelsConstants >, MaterialPropertyLib::OrthotropicEmbeddedFracturePermeability< DisplacementDim >, MaterialPropertyLib::Parameter, MaterialPropertyLib::PengRobinson, MaterialPropertyLib::PermeabilityMohrCoulombFailureIndexModel< DisplacementDim >, MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >, MaterialPropertyLib::PorosityFromMassBalance, MaterialPropertyLib::RelPermBrooksCorey, MaterialPropertyLib::RelPermBrooksCoreyNonwettingPhase, MaterialPropertyLib::RelPermGeneralizedPower, MaterialPropertyLib::RelPermGeneralizedPowerNonwettingPhase, MaterialPropertyLib::RelPermLiakopoulos, MaterialPropertyLib::RelPermNonWettingPhaseVanGenuchtenMualem, MaterialPropertyLib::RelPermUdell, MaterialPropertyLib::RelPermUdellNonwettingPhase, MaterialPropertyLib::RelPermVanGenuchten, MaterialPropertyLib::SaturationBrooksCorey, MaterialPropertyLib::SaturationExponential, MaterialPropertyLib::SaturationLiakopoulos, MaterialPropertyLib::SaturationVanGenuchten, MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain, MaterialPropertyLib::SaturationWeightedThermalConductivity< MeantType, GlobalDimension >, MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat, MaterialPropertyLib::StrainDependentPermeability< DisplacementDim >, MaterialPropertyLib::TemperatureDependentDiffusion, MaterialPropertyLib::TemperatureDependentFraction, MaterialPropertyLib::TransportPorosityFromMassBalance, MaterialPropertyLib::VapourDiffusionDeVries, MaterialPropertyLib::VapourDiffusionFEBEX, MaterialPropertyLib::VapourDiffusionPMQ, MaterialPropertyLib::VermaPruessModel, MaterialPropertyLib::VolumeFractionAverage, MaterialPropertyLib::WaterDensityIAPWSIF97Region1, MaterialPropertyLib::WaterEnthalpyIAPWSIF97Region1, MaterialPropertyLib::WaterLiquidDensityIAPWSIF97Region4, MaterialPropertyLib::WaterLiquidEnthalpyIAPWSIF97Region4, MaterialPropertyLib::WaterSaturationTemperatureIAPWSIF97Region4, MaterialPropertyLib::WaterTemperatureIAPWSIF97Region1, MaterialPropertyLib::WaterThermalConductivityIAPWS, MaterialPropertyLib::WaterVapourDensity, MaterialPropertyLib::WaterVapourDensityIAPWSIF97Region4, MaterialPropertyLib::WaterVapourEnthalpyIAPWSIF97Region4, MaterialPropertyLib::WaterVapourLatentHeatWithCriticalTemperature, and MaterialPropertyLib::WaterViscosityIAPWS.

Definition at line 95 of file Property.cpp.

98{
99#ifndef NDEBUG
100 property_used = true;
101#endif
102 return value(variable_array, EmptyVariableArray, pos, t, dt);
103}

References MaterialPropertyLib::EmptyVariableArray, property_used, and value().

◆ value() [4/6]

template<typename T >
T MaterialPropertyLib::Property::value ( VariableArray const & variable_array,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
inline

Definition at line 191 of file Property.h.

194 {
195 try
196 {
197#ifndef NDEBUG
198 property_used = true;
199#endif
200 return std::get<T>(value(variable_array, pos, t, dt));
201 }
202 catch (std::bad_variant_access const&)
203 {
204 OGS_FATAL(
205 "The value of {:s} is not of the requested type '{:s}' but a "
206 "{:s}.",
207 description(),
208 typeid(T).name(),
209 property_data_type_names_[value(variable_array, pos, t, dt)
210 .index()]);
211 }
212 }

References description(), MaterialPropertyLib::name, OGS_FATAL, property_data_type_names_, property_used, and value().

◆ value() [5/6]

PropertyDataType MaterialPropertyLib::Property::value ( VariableArray const & variable_array,
VariableArray const & variable_array_prev,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
virtual

This virtual method will compute the property value based on the variables that are passed as arguments and the variables from the previous time step.

Reimplemented in MaterialPropertyLib::LinearSaturationSwellingStress, MaterialPropertyLib::Parameter, MaterialPropertyLib::PorosityFromMassBalance, MaterialPropertyLib::SaturationDependentSwelling, and MaterialPropertyLib::TransportPorosityFromMassBalance.

Definition at line 84 of file Property.cpp.

88{
89#ifndef NDEBUG
90 property_used = true;
91#endif
92 return value_;
93}

References property_used, and value_.

◆ value() [6/6]

template<typename T >
T MaterialPropertyLib::Property::value ( VariableArray const & variable_array,
VariableArray const & variable_array_prev,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
inline

Definition at line 165 of file Property.h.

169 {
170 try
171 {
172#ifndef NDEBUG
173 property_used = true;
174#endif
175 return std::get<T>(
176 value(variable_array, variable_array_prev, pos, t, dt));
177 }
178 catch (std::bad_variant_access const&)
179 {
180 OGS_FATAL(
181 "The value of {:s} is not of the requested type '{:s}' but a "
182 "{:s}.",
183 description(),
184 typeid(T).name(),
185 property_data_type_names_[value(variable_array,
186 variable_array_prev, pos, t, dt)
187 .index()]);
188 }
189 }

References description(), MaterialPropertyLib::name, OGS_FATAL, property_data_type_names_, property_used, and value().

Member Data Documentation

◆ dvalue_

PropertyDataType MaterialPropertyLib::Property::dvalue_
protected

Definition at line 293 of file Property.h.

Referenced by MaterialPropertyLib::Constant::Constant(), and dValue().

◆ name_

std::string MaterialPropertyLib::Property::name_
protected

Definition at line 290 of file Property.h.

Referenced by MaterialPropertyLib::AverageMolarMass::AverageMolarMass(), MaterialPropertyLib::BishopsPowerLaw::BishopsPowerLaw(), MaterialPropertyLib::BishopsSaturationCutoff::BishopsSaturationCutoff(), MaterialPropertyLib::CapillaryPressureVanGenuchten::CapillaryPressureVanGenuchten(), MaterialPropertyLib::ClausiusClapeyron::ClausiusClapeyron(), MaterialPropertyLib::Constant::Constant(), MaterialPropertyLib::CubicLawPermeability::CubicLawPermeability(), MaterialPropertyLib::Curve::Curve(), MaterialPropertyLib::DupuitPermeability::DupuitPermeability(), MaterialPropertyLib::EffectiveThermalConductivityPorosityMixing< GlobalDim >::EffectiveThermalConductivityPorosityMixing(), MaterialPropertyLib::EmbeddedFracturePermeability< DisplacementDim >::EmbeddedFracturePermeability(), MaterialPropertyLib::Exponential::Exponential(), MaterialPropertyLib::Function::Function(), MaterialPropertyLib::GasPressureDependentPermeability< DisplacementDim >::GasPressureDependentPermeability(), MaterialPropertyLib::IdealGasLaw::IdealGasLaw(), MaterialPropertyLib::IdealGasLawBinaryMixture::IdealGasLawBinaryMixture(), MaterialPropertyLib::Linear::Linear(), MaterialPropertyLib::LinearSaturationSwellingStress::LinearSaturationSwellingStress(), MaterialPropertyLib::LinearWaterVapourLatentHeat::LinearWaterVapourLatentHeat(), MaterialPropertyLib::LiquidViscosityVogels< VogelsConstants >::LiquidViscosityVogels(), MaterialPropertyLib::OrthotropicEmbeddedFracturePermeability< DisplacementDim >::OrthotropicEmbeddedFracturePermeability(), MaterialPropertyLib::Parameter::Parameter(), MaterialPropertyLib::PermeabilityMohrCoulombFailureIndexModel< DisplacementDim >::PermeabilityMohrCoulombFailureIndexModel(), MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >::PermeabilityOrthotropicPowerLaw(), MaterialPropertyLib::PorosityFromMassBalance::PorosityFromMassBalance(), MaterialPropertyLib::RelPermBrooksCorey::RelPermBrooksCorey(), MaterialPropertyLib::RelPermBrooksCoreyNonwettingPhase::RelPermBrooksCoreyNonwettingPhase(), MaterialPropertyLib::RelPermGeneralizedPower::RelPermGeneralizedPower(), MaterialPropertyLib::RelPermGeneralizedPowerNonwettingPhase::RelPermGeneralizedPowerNonwettingPhase(), MaterialPropertyLib::RelPermLiakopoulos::RelPermLiakopoulos(), MaterialPropertyLib::RelPermNonWettingPhaseVanGenuchtenMualem::RelPermNonWettingPhaseVanGenuchtenMualem(), MaterialPropertyLib::RelPermUdell::RelPermUdell(), MaterialPropertyLib::RelPermUdellNonwettingPhase::RelPermUdellNonwettingPhase(), MaterialPropertyLib::RelPermVanGenuchten::RelPermVanGenuchten(), MaterialPropertyLib::SaturationBrooksCorey::SaturationBrooksCorey(), MaterialPropertyLib::SaturationDependentSwelling::SaturationDependentSwelling(), MaterialPropertyLib::SaturationExponential::SaturationExponential(), MaterialPropertyLib::SaturationLiakopoulos::SaturationLiakopoulos(), MaterialPropertyLib::SaturationVanGenuchten::SaturationVanGenuchten(), MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain::SaturationVanGenuchtenWithVolumetricStrain(), MaterialPropertyLib::SaturationWeightedThermalConductivity< MeantType, GlobalDimension >::SaturationWeightedThermalConductivity(), MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat::SpecificHeatCapacityWithLatentHeat(), MaterialPropertyLib::StrainDependentPermeability< DisplacementDim >::StrainDependentPermeability(), MaterialPropertyLib::TemperatureDependentFraction::TemperatureDependentFraction(), MaterialPropertyLib::TransportPorosityFromMassBalance::TransportPorosityFromMassBalance(), MaterialPropertyLib::VapourDiffusionDeVries::VapourDiffusionDeVries(), MaterialPropertyLib::VapourDiffusionFEBEX::VapourDiffusionFEBEX(), MaterialPropertyLib::VapourDiffusionPMQ::VapourDiffusionPMQ(), MaterialPropertyLib::VolumeFractionAverage::VolumeFractionAverage(), MaterialPropertyLib::WaterDensityIAPWSIF97Region1::WaterDensityIAPWSIF97Region1(), MaterialPropertyLib::WaterEnthalpyIAPWSIF97Region1::WaterEnthalpyIAPWSIF97Region1(), MaterialPropertyLib::WaterLiquidDensityIAPWSIF97Region4::WaterLiquidDensityIAPWSIF97Region4(), MaterialPropertyLib::WaterLiquidEnthalpyIAPWSIF97Region4::WaterLiquidEnthalpyIAPWSIF97Region4(), MaterialPropertyLib::WaterSaturationTemperatureIAPWSIF97Region4::WaterSaturationTemperatureIAPWSIF97Region4(), MaterialPropertyLib::WaterTemperatureIAPWSIF97Region1::WaterTemperatureIAPWSIF97Region1(), MaterialPropertyLib::WaterThermalConductivityIAPWS::WaterThermalConductivityIAPWS(), MaterialPropertyLib::WaterVapourDensity::WaterVapourDensity(), MaterialPropertyLib::WaterVapourDensityIAPWSIF97Region4::WaterVapourDensityIAPWSIF97Region4(), MaterialPropertyLib::WaterVapourEnthalpyIAPWSIF97Region4::WaterVapourEnthalpyIAPWSIF97Region4(), MaterialPropertyLib::WaterVapourLatentHeatWithCriticalTemperature::WaterVapourLatentHeatWithCriticalTemperature(), MaterialPropertyLib::WaterViscosityIAPWS::WaterViscosityIAPWS(), description(), and MaterialPropertyLib::Function::dValue().

◆ property_data_type_names_

std::array MaterialPropertyLib::Property::property_data_type_names_
staticconstexprprivate
Initial value:
= {
"scalar", "2-vector", "3-vector",
"2x2-matrix", "3x3-matrix", "2D-Kelvin vector",
"3D-Kelvin vector", "dynamic matrix type"}

Corresponds to the PropertyDataType.

Definition at line 312 of file Property.h.

312 {
313 "scalar", "2-vector", "3-vector",
314 "2x2-matrix", "3x3-matrix", "2D-Kelvin vector",
315 "3D-Kelvin vector", "dynamic matrix type"};

Referenced by d2Value(), dValue(), dValue(), initialValue(), value(), value(), and value().

◆ property_used

bool MaterialPropertyLib::Property::property_used = false
mutableprivate

Definition at line 307 of file Property.h.

Referenced by ~Property(), d2Value(), d2Value(), dValue(), dValue(), value(), value(), and value().

◆ scale_

std::variant<Medium*, Phase*, Component*> MaterialPropertyLib::Property::scale_
protected

Definition scale of the property. Can be one of medium, phase, or component in general. Set through setScale method which takes care of the correctness in special cases.

Definition at line 297 of file Property.h.

Referenced by MaterialPropertyLib::AverageMolarMass::checkScale(), MaterialPropertyLib::BishopsPowerLaw::checkScale(), MaterialPropertyLib::BishopsSaturationCutoff::checkScale(), MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten::checkScale(), MaterialPropertyLib::CapillaryPressureVanGenuchten::checkScale(), MaterialPropertyLib::ClausiusClapeyron::checkScale(), MaterialPropertyLib::CubicLawPermeability::checkScale(), MaterialPropertyLib::IdealGasLaw::checkScale(), MaterialPropertyLib::IdealGasLawBinaryMixture::checkScale(), MaterialPropertyLib::LinearSaturationSwellingStress::checkScale(), MaterialPropertyLib::LinearWaterVapourLatentHeat::checkScale(), MaterialPropertyLib::LiquidViscosityVogels< VogelsConstants >::checkScale(), MaterialPropertyLib::PorosityFromMassBalance::checkScale(), MaterialPropertyLib::RelPermBrooksCorey::checkScale(), MaterialPropertyLib::RelPermBrooksCoreyNonwettingPhase::checkScale(), MaterialPropertyLib::RelPermGeneralizedPower::checkScale(), MaterialPropertyLib::RelPermGeneralizedPowerNonwettingPhase::checkScale(), MaterialPropertyLib::RelPermLiakopoulos::checkScale(), MaterialPropertyLib::RelPermNonWettingPhaseVanGenuchtenMualem::checkScale(), MaterialPropertyLib::RelPermUdell::checkScale(), MaterialPropertyLib::RelPermUdellNonwettingPhase::checkScale(), MaterialPropertyLib::RelPermVanGenuchten::checkScale(), MaterialPropertyLib::SaturationBrooksCorey::checkScale(), MaterialPropertyLib::SaturationDependentSwelling::checkScale(), MaterialPropertyLib::SaturationExponential::checkScale(), MaterialPropertyLib::SaturationLiakopoulos::checkScale(), MaterialPropertyLib::SaturationVanGenuchten::checkScale(), MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain::checkScale(), MaterialPropertyLib::SaturationWeightedThermalConductivity< MeantType, GlobalDimension >::checkScale(), MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat::checkScale(), MaterialPropertyLib::TemperatureDependentDiffusion::checkScale(), MaterialPropertyLib::TemperatureDependentFraction::checkScale(), MaterialPropertyLib::TransportPorosityFromMassBalance::checkScale(), MaterialPropertyLib::VapourDiffusionDeVries::checkScale(), MaterialPropertyLib::VapourDiffusionFEBEX::checkScale(), MaterialPropertyLib::VapourDiffusionPMQ::checkScale(), MaterialPropertyLib::VolumeFractionAverage::checkScale(), MaterialPropertyLib::WaterDensityIAPWSIF97Region1::checkScale(), MaterialPropertyLib::WaterEnthalpyIAPWSIF97Region1::checkScale(), MaterialPropertyLib::WaterLiquidDensityIAPWSIF97Region4::checkScale(), MaterialPropertyLib::WaterLiquidEnthalpyIAPWSIF97Region4::checkScale(), MaterialPropertyLib::WaterSaturationTemperatureIAPWSIF97Region4::checkScale(), MaterialPropertyLib::WaterTemperatureIAPWSIF97Region1::checkScale(), MaterialPropertyLib::WaterThermalConductivityIAPWS::checkScale(), MaterialPropertyLib::WaterVapourDensity::checkScale(), MaterialPropertyLib::WaterVapourDensityIAPWSIF97Region4::checkScale(), MaterialPropertyLib::WaterVapourEnthalpyIAPWSIF97Region4::checkScale(), MaterialPropertyLib::WaterVapourLatentHeatWithCriticalTemperature::checkScale(), MaterialPropertyLib::WaterViscosityIAPWS::checkScale(), MaterialPropertyLib::TemperatureDependentFraction::d2Value(), description(), MaterialPropertyLib::AverageMolarMass::dValue(), MaterialPropertyLib::ClausiusClapeyron::dValue(), MaterialPropertyLib::RelPermBrooksCorey::dValue(), MaterialPropertyLib::RelPermBrooksCoreyNonwettingPhase::dValue(), MaterialPropertyLib::RelPermLiakopoulos::dValue(), MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat::dValue(), MaterialPropertyLib::TemperatureDependentFraction::dValue(), MaterialPropertyLib::VolumeFractionAverage::dValue(), MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat::effectiveVolumetricHeatCapacity(), setScale(), MaterialPropertyLib::AverageMolarMass::value(), MaterialPropertyLib::ClausiusClapeyron::value(), MaterialPropertyLib::PorosityFromMassBalance::value(), MaterialPropertyLib::RelPermBrooksCorey::value(), MaterialPropertyLib::RelPermBrooksCoreyNonwettingPhase::value(), MaterialPropertyLib::RelPermLiakopoulos::value(), MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat::value(), MaterialPropertyLib::TemperatureDependentFraction::value(), MaterialPropertyLib::TransportPorosityFromMassBalance::value(), and MaterialPropertyLib::VolumeFractionAverage::value().

◆ value_


The documentation for this class was generated from the following files: