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 89 of file MaterialLib/MPL/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::SaturationLuMcCartney, MaterialPropertyLib::SaturationVanGenuchten, MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain, MaterialPropertyLib::SaturationWeightedThermalConductivity< MeantType, GlobalDimension >, MaterialPropertyLib::Sigmoid, MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat, MaterialPropertyLib::StrainDependentPermeability< DisplacementDim >, MaterialPropertyLib::TemperatureDependentDiffusion, 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 93 of file MaterialLib/MPL/Property.h.

94 {
95 if (property_used)
96 {
97 DBUG("Property is used: '{:s}'", description());
98 }
99 else
100 {
101 WARN("Property is not used: '{:s}'", description());
102 }
103 }
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:22
void WARN(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:34

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::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::SaturationLuMcCartney, MaterialPropertyLib::SaturationVanGenuchten, MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain, MaterialPropertyLib::SaturationWeightedThermalConductivity< MeantType, GlobalDimension >, MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat, MaterialPropertyLib::StrainDependentPermeability< DisplacementDim >, MaterialPropertyLib::TemperatureDependentDiffusion, 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 339 of file MaterialLib/MPL/Property.h.

340 {
341 // Empty check for properties which can be defined on every scale,
342 // medium, phase or component
343 }

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 302 of file MaterialLib/MPL/Property.h.

306 {
307 try
308 {
309#ifndef NDEBUG
310 property_used = true;
311#endif
312 return std::get<T>(
313 d2Value(variable_array, variable1, variable2, pos, t, dt));
314 }
315 catch (std::bad_variant_access const&)
316 {
317 OGS_FATAL(
318 "The second derivative value of {:s} is not of the requested "
319 "type '{:s}' but a {:s}.",
320 description(),
322 property_data_type_names_[d2Value(variable_array, variable1,
323 variable2, pos, t, dt)
324 .index()]);
325 }
326 }
#define OGS_FATAL(...)
Definition Error.h:10
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.
static constexpr std::array property_data_type_names_
Corresponds to the PropertyDataType.
std::string typeToString()

References d2Value(), description(), OGS_FATAL, property_data_type_names_, property_used, and BaseLib::typeToString().

◆ 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 142 of file MaterialLib/MPL/Property.cpp.

143{
144 return "property '" + name_ + "' defined for " +
145 std::visit(
146 [](auto&& scale) -> std::string
147 {
148 if (scale == nullptr)
149 {
150 return "unknown scale";
151 }
152 return scale->description();
153 },
154 scale_);
155}
std::variant< Medium *, Phase *, Component * > scale_
void scale(PETScVector &x, PetscScalar const a)
Definition LinAlg.cpp:37

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::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::SaturationLuMcCartney, MaterialPropertyLib::SaturationVanGenuchten, MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain, MaterialPropertyLib::SaturationWeightedThermalConductivity< MeantType, GlobalDimension >, MaterialPropertyLib::Sigmoid, MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat, MaterialPropertyLib::StrainDependentPermeability< DisplacementDim >, 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 110 of file MaterialLib/MPL/Property.cpp.

114{
115#ifndef NDEBUG
116 property_used = true;
117#endif
118 return dValue(variable_array, EmptyVariableArray, variable, pos, t, dt);
119}
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
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 279 of file MaterialLib/MPL/Property.h.

282 {
283 try
284 {
285#ifndef NDEBUG
286 property_used = true;
287#endif
288 return std::get<T>(dValue(variable_array, variable, pos, t, dt));
289 }
290 catch (std::bad_variant_access const&)
291 {
292 OGS_FATAL(
293 "The first derivative value of {:s} is not of the requested "
294 "type '{:s}' but a {:s}.",
295 description(),
298 [dValue(variable_array, variable, pos, t, dt).index()]);
299 }
300 }

References description(), dValue(), OGS_FATAL, property_data_type_names_, property_used, and BaseLib::typeToString().

◆ 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 96 of file MaterialLib/MPL/Property.cpp.

101{
102#ifndef NDEBUG
103 property_used = true;
104#endif
105 return dvalue_;
106}

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 254 of file MaterialLib/MPL/Property.h.

258 {
259 try
260 {
261#ifndef NDEBUG
262 property_used = true;
263#endif
264 return std::get<T>(dValue(variable_array, variable_array_prev,
265 variable, pos, t, dt));
266 }
267 catch (std::bad_variant_access const&)
268 {
269 OGS_FATAL(
270 "The first derivative value of {:s} is not of the requested "
271 "type '{:s}' but a {:s}.",
272 description(),
275 [dValue(variable_array, variable, pos, t, dt).index()]);
276 }
277 }

References description(), dValue(), OGS_FATAL, property_data_type_names_, property_used, and BaseLib::typeToString().

◆ 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 60 of file MaterialLib/MPL/Property.cpp.

62{
63 return value(EmptyVariableArray, pos, t,
64 std::numeric_limits<double>::quiet_NaN());
65}
virtual PropertyDataType value() const

References MaterialPropertyLib::EmptyVariableArray, and value().

Referenced by initialValue(), and MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >::value().

◆ initialValue() [2/2]

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

Definition at line 164 of file MaterialLib/MPL/Property.h.

166 {
167 try
168 {
169 return std::get<T>(initialValue(pos, t));
170 }
171 catch (std::bad_variant_access const&)
172 {
173 OGS_FATAL(
174 "The initial value of {:s} does not hold requested type '{:s}' "
175 "but a {:s}.",
176 description(),
178 property_data_type_names_[initialValue(pos, t).index()]);
179 }
180 }
virtual PropertyDataType initialValue(ParameterLib::SpatialPosition const &pos, double const t) const

References description(), initialValue(), OGS_FATAL, property_data_type_names_, and BaseLib::typeToString().

◆ 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 136 of file MaterialLib/MPL/Property.cpp.

138{
139 // empty
140}

◆ setScale()

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

Definition at line 157 of file MaterialLib/MPL/Property.h.

158 {
159 scale_ = scale;
160 checkScale();
161 };

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 67 of file MaterialLib/MPL/Property.cpp.

68{
69#ifndef NDEBUG
70 property_used = true;
71#endif
72 return value_;
73}
PropertyDataType value_
The single value of a property.

References property_used, and value_.

Referenced by ProcessLib::RichardsMechanics::RichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assembleWithJacobianEvalConstitutiveSetting(), anonymous_namespace{ogs_mpl.cpp}::bindLinear(), MaterialPropertyLib::Sigmoid::d2Value(), MaterialPropertyLib::AverageMolarMass::dValue(), MaterialPropertyLib::ClausiusClapeyron::dValue(), MaterialPropertyLib::PengRobinson::dValue(), MaterialPropertyLib::RelPermBrooksCorey::dValue(), MaterialPropertyLib::RelPermBrooksCoreyNonwettingPhase::dValue(), MaterialPropertyLib::RelPermLiakopoulos::dValue(), MaterialPropertyLib::Sigmoid::dValue(), MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat::dValue(), ProcessLib::TH2M::ConstitutiveRelations::PermeabilityModel< DisplacementDim >::eval(), ProcessLib::TH2M::ConstitutiveRelations::SolidThermalExpansionModel< DisplacementDim >::eval(), ProcessLib::TH2M::ConstitutiveRelations::SwellingModel< DisplacementDim >::eval(), ProcessLib::ThermoRichardsMechanics::SolidThermalExpansionModel< DisplacementDim >::eval(), ProcessLib::ThermoRichardsMechanics::TRMHeatStorageAndFluxModel< DisplacementDim >::eval(), ProcessLib::getThermoOsmoticCoefficient(), 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(), and MaterialPropertyLib::TransportPorosityFromMassBalance::value().

◆ value() [2/6]

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

Definition at line 183 of file MaterialLib/MPL/Property.h.

184 {
185 try
186 {
187#ifndef NDEBUG
188 property_used = true;
189#endif
190 return std::get<T>(value());
191 }
192 catch (std::bad_variant_access const&)
193 {
194 OGS_FATAL(
195 "The value of {:s} does not hold requested type '{:s}' but a "
196 "{:s}.",
197 description(),
200 }
201 }

References description(), OGS_FATAL, property_data_type_names_, property_used, BaseLib::typeToString(), 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::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::SaturationLuMcCartney, MaterialPropertyLib::SaturationVanGenuchten, MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain, MaterialPropertyLib::SaturationWeightedThermalConductivity< MeantType, GlobalDimension >, MaterialPropertyLib::Sigmoid, MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat, MaterialPropertyLib::StrainDependentPermeability< DisplacementDim >, MaterialPropertyLib::TemperatureDependentDiffusion, 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 86 of file MaterialLib/MPL/Property.cpp.

89{
90#ifndef NDEBUG
91 property_used = true;
92#endif
93 return value(variable_array, EmptyVariableArray, pos, t, dt);
94}

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 230 of file MaterialLib/MPL/Property.h.

233 {
234 try
235 {
236#ifndef NDEBUG
237 property_used = true;
238#endif
239 return std::get<T>(value(variable_array, pos, t, dt));
240 }
241 catch (std::bad_variant_access const&)
242 {
243 OGS_FATAL(
244 "The value of {:s} is not of the requested type '{:s}' but a "
245 "{:s}.",
246 description(),
248 property_data_type_names_[value(variable_array, pos, t, dt)
249 .index()]);
250 }
251 }

References description(), OGS_FATAL, property_data_type_names_, property_used, BaseLib::typeToString(), 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 75 of file MaterialLib/MPL/Property.cpp.

79{
80#ifndef NDEBUG
81 property_used = true;
82#endif
83 return value_;
84}

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 204 of file MaterialLib/MPL/Property.h.

208 {
209 try
210 {
211#ifndef NDEBUG
212 property_used = true;
213#endif
214 return std::get<T>(
215 value(variable_array, variable_array_prev, pos, t, dt));
216 }
217 catch (std::bad_variant_access const&)
218 {
219 OGS_FATAL(
220 "The value of {:s} is not of the requested type '{:s}' but a "
221 "{:s}.",
222 description(),
224 property_data_type_names_[value(variable_array,
225 variable_array_prev, pos, t, dt)
226 .index()]);
227 }
228 }

References description(), OGS_FATAL, property_data_type_names_, property_used, BaseLib::typeToString(), and value().

Member Data Documentation

◆ dvalue_

PropertyDataType MaterialPropertyLib::Property::dvalue_
protected

Definition at line 332 of file MaterialLib/MPL/Property.h.

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

◆ name_

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

Definition at line 329 of file MaterialLib/MPL/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::SaturationLuMcCartney::SaturationLuMcCartney(), MaterialPropertyLib::SaturationVanGenuchten::SaturationVanGenuchten(), MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain::SaturationVanGenuchtenWithVolumetricStrain(), MaterialPropertyLib::SaturationWeightedThermalConductivity< MeantType, GlobalDimension >::SaturationWeightedThermalConductivity(), MaterialPropertyLib::Sigmoid::Sigmoid(), MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat::SpecificHeatCapacityWithLatentHeat(), MaterialPropertyLib::StrainDependentPermeability< DisplacementDim >::StrainDependentPermeability(), 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(), MaterialPropertyLib::Function::d2Value(), description(), MaterialPropertyLib::Function::dValue(), MaterialPropertyLib::VolumeFractionAverage::setProperties(), and MaterialPropertyLib::Function::value().

◆ 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 351 of file MaterialLib/MPL/Property.h.

351 {
352 "scalar", "2-vector", "3-vector",
353 "2x2-matrix", "3x3-matrix", "2D-Kelvin vector",
354 "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 346 of file MaterialLib/MPL/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 336 of file MaterialLib/MPL/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::EffectiveThermalConductivityPorosityMixing< GlobalDim >::checkScale(), MaterialPropertyLib::EmbeddedFracturePermeability< DisplacementDim >::checkScale(), MaterialPropertyLib::GasPressureDependentPermeability< DisplacementDim >::checkScale(), MaterialPropertyLib::IdealGasLaw::checkScale(), MaterialPropertyLib::IdealGasLawBinaryMixture::checkScale(), MaterialPropertyLib::LinearSaturationSwellingStress::checkScale(), MaterialPropertyLib::LinearWaterVapourLatentHeat::checkScale(), MaterialPropertyLib::LiquidViscosityVogels< VogelsConstants >::checkScale(), MaterialPropertyLib::OrthotropicEmbeddedFracturePermeability< DisplacementDim >::checkScale(), MaterialPropertyLib::PermeabilityMohrCoulombFailureIndexModel< DisplacementDim >::checkScale(), MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >::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::SaturationLuMcCartney::checkScale(), MaterialPropertyLib::SaturationVanGenuchten::checkScale(), MaterialPropertyLib::SaturationVanGenuchtenWithVolumetricStrain::checkScale(), MaterialPropertyLib::SaturationWeightedThermalConductivity< MeantType, GlobalDimension >::checkScale(), MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat::checkScale(), MaterialPropertyLib::StrainDependentPermeability< DisplacementDim >::checkScale(), MaterialPropertyLib::TemperatureDependentDiffusion::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::SaturationLuMcCartney::d2Value(), description(), MaterialPropertyLib::AverageMolarMass::dValue(), MaterialPropertyLib::ClausiusClapeyron::dValue(), MaterialPropertyLib::EffectiveThermalConductivityPorosityMixing< GlobalDim >::dValue(), MaterialPropertyLib::RelPermBrooksCorey::dValue(), MaterialPropertyLib::RelPermBrooksCoreyNonwettingPhase::dValue(), MaterialPropertyLib::RelPermLiakopoulos::dValue(), MaterialPropertyLib::SaturationLuMcCartney::dValue(), MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat::dValue(), MaterialPropertyLib::VolumeFractionAverage::dValue(), MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat::effectiveVolumetricHeatCapacity(), MaterialPropertyLib::VolumeFractionAverage::setProperties(), setScale(), MaterialPropertyLib::AverageMolarMass::value(), MaterialPropertyLib::ClausiusClapeyron::value(), MaterialPropertyLib::EffectiveThermalConductivityPorosityMixing< GlobalDim >::value(), MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >::value(), MaterialPropertyLib::PorosityFromMassBalance::value(), MaterialPropertyLib::RelPermBrooksCorey::value(), MaterialPropertyLib::RelPermBrooksCoreyNonwettingPhase::value(), MaterialPropertyLib::RelPermLiakopoulos::value(), MaterialPropertyLib::SaturationLuMcCartney::value(), MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat::value(), MaterialPropertyLib::TransportPorosityFromMassBalance::value(), and MaterialPropertyLib::VolumeFractionAverage::value().

◆ value_


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