OGS
MaterialPropertyLib Namespace Reference

Classes

class  Component
 This class defines components (substances). More...
 
struct  Water
 
class  MaterialSpatialDistributionMap
 
class  Medium
 
class  Phase
 
class  AverageMolarMass
 
class  BishopsPowerLaw
 Bishop's power law for effective stress. More...
 
class  BishopsSaturationCutoff
 
class  CapillaryPressureRegularizedVanGenuchten
 This class handles the computation of the capillary pressure, \( p_c(S_l) \), with the capillary pressure regularization. More...
 
class  CapillaryPressureVanGenuchten
 The van Genuchten capillary pressure model. More...
 
class  SaturationBrooksCorey
 A well known soil characteristics function. More...
 
class  SaturationExponential
 A simplistic soil characteristics function. More...
 
class  SaturationLiakopoulos
 A well known soil characteristics function. More...
 
class  SaturationVanGenuchten
 The van Genuchten capillary pressure model. More...
 
class  ClausiusClapeyron
 
struct  ZeroInitPropertyDataType
 
class  Constant
 
class  Curve
 
class  WaterVapourDensity
 A model for water vapour density in the unsaturated porous media. More...
 
class  DupuitPermeability
 
class  EffectiveThermalConductivityPorosityMixing
 
class  EmbeddedFracturePermeability
 Permeability model as proposed by Olivella&Alonso. More...
 
class  LinearWaterVapourLatentHeat
 An empirical function for the latent heat of vaporization of liquid water, which is given by [32] p.786f. More...
 
class  WaterVapourLatentHeatWithCriticalTemperature
 A latent heat model of vaporisation of water considering the critical temperature. More...
 
struct  ExponentData
 
class  Exponential
 
class  Function
 
class  GasPressureDependentPermeability
 A gas pressure dependent intrinsic permeability model. More...
 
class  IdealGasLaw
 Density function for ideal gases. More...
 
class  IdealGasLawBinaryMixture
 Density function for binary ideal gases. More...
 
class  KozenyCarmanModel
 Kozeny-Carman equation. More...
 
struct  IndependentVariable
 
class  Linear
 
class  OrthotropicEmbeddedFracturePermeability
 Extended Permeability model based on Olivella&Alonso. More...
 
class  Parameter
 
class  PermeabilityMohrCoulombFailureIndexModel
 A failure index dependent permeability model [39]. More...
 
class  PermeabilityOrthotropicPowerLaw
 
class  PorosityFromMassBalance
 
class  RelPermBrooksCorey
 Relative permeability function of the wetting phase proposed by Brooks&Corey. More...
 
class  RelPermBrooksCoreyNonwettingPhase
 Relative permeability function of the non-wetting phase proposed by Brooks&Corey. More...
 
class  RelPermLiakopoulos
 Relative permeability function for the wetting phase of the Liakopoulos experiment. More...
 
class  RelPermNonWettingPhaseVanGenuchtenMualem
 
class  RelPermUdell
 
class  RelPermUdellNonwettingPhase
 
class  RelPermVanGenuchten
 
class  SaturationDependentSwelling
 
class  SaturationDependentThermalConductivity
 
class  SpecificHeatCapacityWithLatentHeat
 
class  StrainDependentPermeability
 A strain dependent intrinsic permeability model. More...
 
class  LinearSaturationSwellingStress
 This class defines a linear saturation rate dependent swelling stress model for the materials that swell strongly when water content increases. More...
 
class  TemperatureDependentDiffusion
 
class  TemperatureDependentFraction
 
class  SoilThermalConductivitySomerton
 A saturation dependent thermal conductivity model for soil. More...
 
class  TransportPorosityFromMassBalance
 
class  VapourDiffusionFEBEX
 FEBEX type Vapour diffusion. More...
 
class  VapourDiffusionPMQ
 The Penman-Millington-Quirk (PMQ) Vapour diffusion model. More...
 
class  VermaPruessModel
 Verma-Pruess equation [38]. More...
 
class  VolumeFractionAverage
 
class  Property
 
struct  FormEigenTensor
 
struct  FormEigenVector
 
struct  FormKelvinVectorFromThermalExpansivity
 
struct  GetSymmetricTensor
 
class  SigmoidFunction
 
class  VariableArray
 

Typedefs

using PropertyArray = std::array< std::unique_ptr< Property >, PropertyType::number_of_properties >
 
using PropertyDataType = std::variant< double, Eigen::Matrix< double, 2, 1 >, Eigen::Matrix< double, 3, 1 >, Eigen::Matrix< double, 2, 2 >, Eigen::Matrix< double, 3, 3 >, Eigen::Matrix< double, 4, 1 >, Eigen::Matrix< double, 6, 1 >, Eigen::MatrixXd >
 
template<int GlobalDim>
using SymmetricTensor = Eigen::Matrix< double, symmetric_tensor_size< GlobalDim >, 1 >
 
using VariableType = std::variant< std::monostate, double, Eigen::Matrix< double, 4, 1 >, Eigen::Matrix< double, 6, 1 > >
 

Enumerations

enum  PropertyType : int {
  acentric_factor , binary_interaction_coefficient , biot_coefficient , bishops_effective_stress ,
  brooks_corey_exponent , bulk_modulus , capillary_pressure , critical_density ,
  critical_pressure , critical_temperature , compressibility , concentration ,
  decay_rate , density , diffusion , drhodT ,
  effective_stress , entry_pressure , evaporation_enthalpy , fredlund_parameters ,
  heat_capacity , henry_coefficient , latent_heat , longitudinal_dispersivity ,
  molality , molar_mass , molar_volume , mole_fraction ,
  molecular_diffusion , name , permeability , phase_velocity ,
  pore_diffusion , poissons_ratio , porosity , reference_density ,
  reference_temperature , reference_pressure , relative_permeability , relative_permeability_nonwetting_phase ,
  residual_gas_saturation , residual_liquid_saturation , retardation_factor , saturation ,
  saturation_micro , specific_heat_capacity , specific_latent_heat , storage ,
  storage_contribution , swelling_stress_rate , thermal_conductivity , thermal_diffusion_enhancement_factor ,
  thermal_expansivity , thermal_expansivity_contribution , thermal_longitudinal_dispersivity , thermal_osmosis_coefficient ,
  thermal_transversal_dispersivity , transport_porosity , transversal_dispersivity , vapour_pressure ,
  vapour_density , vapour_diffusion , viscosity , volume_fraction ,
  youngs_modulus , number_of_properties
}
 
enum class  Variable : int {
  capillary_pressure , concentration , density , effective_pore_pressure ,
  enthalpy_of_evaporation , equivalent_plastic_strain , grain_compressibility , liquid_phase_pressure ,
  liquid_saturation , mechanical_strain , molar_mass , molar_mass_derivative ,
  molar_fraction , phase_pressure , porosity , solid_grain_pressure ,
  stress , temperature , total_strain , total_stress ,
  transport_porosity , vapour_pressure , volumetric_strain , number_of_variables
}
 

Functions

template<typename ContainerMedium , typename ContainerSolid , typename ContainerLiquid , typename ContainerGas >
void checkMaterialSpatialDistributionMap (MeshLib::Mesh const &mesh, MaterialPropertyLib::MaterialSpatialDistributionMap const &media_map, ContainerMedium const &required_properties_medium, ContainerSolid const &required_properties_solid_phase, ContainerLiquid const &required_properties_liquid_phase, ContainerGas const &required_properties_gas_phase)
 
std::unique_ptr< ComponentnewComponent (std::string const &component_name, bool &isCustomComponent)
 
template<typename Container >
void checkRequiredProperties (Component const &c, Container const &required_properties)
 
std::vector< std::unique_ptr< Component > > createComponents (int const geometry_dimension, std::optional< BaseLib::ConfigTree > const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters, ParameterLib::CoordinateSystem const *const local_coordinate_system, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)
 
std::unique_ptr< MaterialSpatialDistributionMapcreateMaterialSpatialDistributionMap (std::map< int, std::shared_ptr< Medium >> const &media, MeshLib::Mesh const &mesh)
 
std::unique_ptr< MediumcreateMedium (int const material_id, int const geometry_dimension, BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters, ParameterLib::CoordinateSystem const *const local_coordinate_system, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)
 
std::vector< std::unique_ptr< Phase > > createPhases (int const geometry_dimension, std::optional< BaseLib::ConfigTree > const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters, ParameterLib::CoordinateSystem const *const local_coordinate_system, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)
 
std::unique_ptr< PropertyArraycreateProperties (int const geometry_dimension, std::optional< BaseLib::ConfigTree > const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters, ParameterLib::CoordinateSystem const *const local_coordinate_system, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)
 
Phase const & fluidPhase (Medium const &medium)
 Returns a gas or aqueous liquid phase of the given medium. More...
 
template<typename Container >
void checkRequiredProperties (Medium const &medium, Container const &required_properties)
 
template<typename Container >
void checkRequiredProperties (Phase const &phase, Container const &required_properties)
 
void checkSaturationRange (const double Sl)
 
std::unique_ptr< PropertycreateCapillaryPressureRegularizedVanGenuchten (BaseLib::ConfigTree const &config)
 
std::unique_ptr< PropertycreateCapillaryPressureVanGenuchten (BaseLib::ConfigTree const &config)
 
std::unique_ptr< SaturationBrooksCoreycreateSaturationBrooksCorey (BaseLib::ConfigTree const &config)
 
std::unique_ptr< SaturationExponentialcreateSaturationExponential (BaseLib::ConfigTree const &config)
 
std::unique_ptr< SaturationLiakopouloscreateSaturationLiakopoulos (BaseLib::ConfigTree const &config)
 
std::unique_ptr< SaturationVanGenuchtencreateSaturationVanGenuchten (BaseLib::ConfigTree const &config)
 
std::unique_ptr< AverageMolarMasscreateAverageMolarMass (BaseLib::ConfigTree const &config)
 
std::unique_ptr< BishopsPowerLawcreateBishopsPowerLaw (BaseLib::ConfigTree const &config)
 
std::unique_ptr< BishopsSaturationCutoffcreateBishopsSaturationCutoff (BaseLib::ConfigTree const &config)
 
std::unique_ptr< ClausiusClapeyroncreateClausiusClapeyron (BaseLib::ConfigTree const &config)
 
std::unique_ptr< ConstantcreateConstant (BaseLib::ConfigTree const &config)
 
std::unique_ptr< CurvecreateCurve (BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)
 
std::unique_ptr< DupuitPermeabilitycreateDupuitPermeability (BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters)
 
std::unique_ptr< PropertycreateEffectiveThermalConductivityPorosityMixing (int const geometry_dimension, BaseLib::ConfigTree const &config, ParameterLib::CoordinateSystem const *const local_coordinate_system)
 
std::unique_ptr< PropertycreateEmbeddedFracturePermeability (int const geometry_dimension, BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters)
 
std::unique_ptr< ExponentialcreateExponential (BaseLib::ConfigTree const &config)
 
std::unique_ptr< FunctioncreateFunction (BaseLib::ConfigTree const &config)
 
std::unique_ptr< PropertycreateGasPressureDependentPermeability (int const geometry_dimension, BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters, ParameterLib::CoordinateSystem const *const local_coordinate_system)
 
std::unique_ptr< IdealGasLawcreateIdealGasLaw (BaseLib::ConfigTree const &config)
 
std::unique_ptr< IdealGasLawBinaryMixturecreateIdealGasLawBinaryMixture (BaseLib::ConfigTree const &config)
 
std::unique_ptr< PropertycreateKozenyCarmanModel (BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters)
 
std::unique_ptr< LinearcreateLinear (BaseLib::ConfigTree const &config)
 
std::unique_ptr< PropertycreateOrthotropicEmbeddedFracturePermeability (int const geometry_dimension, BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters)
 
std::unique_ptr< ParametercreateParameterProperty (BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters)
 
std::unique_ptr< PropertycreatePermeabilityMohrCoulombFailureIndexModel (int const geometry_dimension, BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters, ParameterLib::CoordinateSystem const *const local_coordinate_system)
 
std::unique_ptr< PropertycreatePermeabilityOrthotropicPowerLaw (BaseLib::ConfigTree const &config, ParameterLib::CoordinateSystem const *const local_coordinate_system)
 
std::unique_ptr< PorosityFromMassBalancecreatePorosityFromMassBalance (BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters)
 
std::unique_ptr< SaturationDependentSwellingcreateSaturationDependentSwelling (BaseLib::ConfigTree const &config, ParameterLib::CoordinateSystem const *const local_coordinate_system)
 
std::unique_ptr< SaturationDependentThermalConductivitycreateSaturationDependentThermalConductivity (BaseLib::ConfigTree const &config)
 
std::unique_ptr< SpecificHeatCapacityWithLatentHeatcreateSpecificHeatCapacityWithLatentHeat (BaseLib::ConfigTree const &config)
 
std::unique_ptr< PropertycreateStrainDependentPermeability (int const geometry_dimension, BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters, ParameterLib::CoordinateSystem const *const local_coordinate_system)
 
std::unique_ptr< PropertycreateTemperatureDependentDiffusion (BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters)
 
std::unique_ptr< TemperatureDependentFractioncreateTemperatureDependentFraction (BaseLib::ConfigTree const &config)
 
std::unique_ptr< TransportPorosityFromMassBalancecreateTransportPorosityFromMassBalance (BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters)
 
std::unique_ptr< PropertycreateVermaPruessModel (BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters)
 
std::unique_ptr< VolumeFractionAveragecreateVolumeFractionAverage (BaseLib::ConfigTree const &config)
 
std::unique_ptr< PropertycreateWaterVapourDensity (BaseLib::ConfigTree const &config)
 
static double saturatedVaporDensity (double const T)
 \(\rho_{vS}\) More...
 
static double dsaturatedVaporDensitydT (double const T)
 \(\frac{\partial \rho_{vS}}{\partial T}\) More...
 
static double humidity (double const T, double const p, double const water_density)
 
std::unique_ptr< PropertycreateLinearWaterVapourLatentHeat (BaseLib::ConfigTree const &config)
 
std::unique_ptr< PropertycreateWaterVapourLatentHeatWithCriticalTemperature (BaseLib::ConfigTree const &config)
 
template<typename T >
static std::vector< exprtk::expression< T > > compileExpressions (exprtk::symbol_table< T > &symbol_table, std::vector< std::string > const &string_expressions)
 
static void updateVariableValues (std::vector< std::pair< Variable, double * >> const &symbol_values, VariableArray const &variable_array)
 
static PropertyDataType evaluateExpressions (std::vector< std::pair< Variable, double * >> const &symbol_values, VariableArray const &variable_array, std::vector< exprtk::expression< double >> const &expressions)
 
static std::vector< std::string > collectVariables (std::vector< std::string > const &value_string_expressions, std::vector< std::pair< std::string, std::vector< std::string >>> const &dvalue_string_expressions)
 
std::unique_ptr< RelPermBrooksCoreycreateRelPermBrooksCorey (BaseLib::ConfigTree const &config)
 
std::unique_ptr< RelPermBrooksCoreyNonwettingPhasecreateRelPermBrooksCoreyNonwettingPhase (BaseLib::ConfigTree const &config)
 
std::unique_ptr< RelPermLiakopouloscreateRelPermLiakopoulos (BaseLib::ConfigTree const &config)
 
std::unique_ptr< PropertycreateRelPermNonWettingPhaseVanGenuchtenMualem (BaseLib::ConfigTree const &config)
 
std::unique_ptr< RelPermUdellcreateRelPermUdell (BaseLib::ConfigTree const &config)
 
std::unique_ptr< RelPermUdellNonwettingPhasecreateRelPermUdellNonwettingPhase (BaseLib::ConfigTree const &config)
 
std::unique_ptr< RelPermVanGenuchtencreateRelPermVanGenuchten (BaseLib::ConfigTree const &config)
 
double computeVanGenuchtenMualemValue (const double S_L, const double S_L_r, const double S_L_max, const double m)
 
std::unique_ptr< PropertycreateLinearSaturationSwellingStress (BaseLib::ConfigTree const &config)
 
std::unique_ptr< PropertycreateSoilThermalConductivitySomerton (int const geometry_dimension, BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters, ParameterLib::CoordinateSystem const *const local_coordinate_system)
 
std::unique_ptr< PropertycreateVapourDiffusionFEBEX (BaseLib::ConfigTree const &config)
 
std::unique_ptr< PropertycreateVapourDiffusionPMQ (BaseLib::ConfigTree const &config)
 
PropertyDataType fromVector (std::vector< double > const &values)
 
void overwriteExistingProperties (PropertyArray &properties, PropertyArray &new_properties, std::variant< Medium *, Phase *, Component * > scale_pointer)
 
void updatePropertiesForAllPhases (PropertyArray &properties, std::vector< std::unique_ptr< Phase >> const &phases)
 
PropertyType convertStringToProperty (std::string const &string)
 
void checkVanGenuchtenExponentRange (const double m)
 
template<int GlobalDim>
Eigen::Matrix< double, GlobalDim, GlobalDim > formEffectiveThermalConductivity (MaterialPropertyLib::PropertyDataType const &solid_thermal_conductivity, const double fluid_thermal_conductivity, const double porosity)
 
template Eigen::Matrix< double, 1, 1 > formEffectiveThermalConductivity< 1 > (MaterialPropertyLib::PropertyDataType const &solid_thermal_conductivity, const double fluid_thermal_conductivity, const double porosity)
 
template Eigen::Matrix< double, 2, 2 > formEffectiveThermalConductivity< 2 > (MaterialPropertyLib::PropertyDataType const &solid_thermal_conductivity, const double fluid_thermal_conductivity, const double porosity)
 
template Eigen::Matrix< double, 3, 3 > formEffectiveThermalConductivity< 3 > (MaterialPropertyLib::PropertyDataType const &solid_thermal_conductivity, const double fluid_thermal_conductivity, const double porosity)
 
template<int GlobalDim>
Eigen::Matrix< double, GlobalDim, GlobalDim > formEigenTensor (MaterialPropertyLib::PropertyDataType const &values)
 
template Eigen::Matrix< double, 1, 1 > formEigenTensor< 1 > (MaterialPropertyLib::PropertyDataType const &values)
 
template Eigen::Matrix< double, 2, 2 > formEigenTensor< 2 > (MaterialPropertyLib::PropertyDataType const &values)
 
template Eigen::Matrix< double, 3, 3 > formEigenTensor< 3 > (MaterialPropertyLib::PropertyDataType const &values)
 
template Eigen::Matrix< double, 4, 4 > formEigenTensor< 4 > (MaterialPropertyLib::PropertyDataType const &values)
 
template Eigen::Matrix< double, 6, 6 > formEigenTensor< 6 > (MaterialPropertyLib::PropertyDataType const &values)
 
template<int GlobalDim>
Eigen::Matrix< double, GlobalDim, 1 > formEigenVector (MaterialPropertyLib::PropertyDataType const &values)
 
template Eigen::Matrix< double, 1, 1 > formEigenVector< 1 > (MaterialPropertyLib::PropertyDataType const &values)
 
template Eigen::Matrix< double, 2, 1 > formEigenVector< 2 > (MaterialPropertyLib::PropertyDataType const &values)
 
template Eigen::Matrix< double, 3, 1 > formEigenVector< 3 > (MaterialPropertyLib::PropertyDataType const &values)
 
template<int GlobalDim>
MathLib::KelvinVector::KelvinVectorType< GlobalDim > formKelvinVectorFromThermalExpansivity (MaterialPropertyLib::PropertyDataType const &values)
 A function to form a Kelvin vector from thermal expansivity for thermal strain. More...
 
template MathLib::KelvinVector::KelvinVectorType< 2 > formKelvinVectorFromThermalExpansivity< 2 > (MaterialPropertyLib::PropertyDataType const &values)
 
template MathLib::KelvinVector::KelvinVectorType< 3 > formKelvinVectorFromThermalExpansivity< 3 > (MaterialPropertyLib::PropertyDataType const &values)
 
double getLiquidThermalExpansivity (Phase const &phase, VariableArray const &vars, const double density, ParameterLib::SpatialPosition const &pos, double const t, double const dt)
 
template<int GlobalDim>
SymmetricTensor< GlobalDim > getSymmetricTensor (MaterialPropertyLib::PropertyDataType const &values)
 
template Eigen::Matrix< double, 4, 1 > getSymmetricTensor< 2 > (MaterialPropertyLib::PropertyDataType const &values)
 
template Eigen::Matrix< double, 6, 1 > getSymmetricTensor< 3 > (MaterialPropertyLib::PropertyDataType const &values)
 
Variable convertStringToVariable (std::string const &string)
 

Variables

constexpr double T_c
 Critical temperature. More...
 
constexpr double alpha = 1. / 8.
 
constexpr double beta = 1. / 3.
 
constexpr double Delta = 0.79 - beta
 
constexpr std::array c
 
static const std::array< std::string, PropertyType::number_of_properties > property_enum_to_string
 
static constexpr const char error_info []
 
template<int GlobalDim>
constexpr int symmetric_tensor_size
 
static const std::array< std::string, static_cast< int >Variable::number_of_variables)> variable_enum_to_string
 

Typedef Documentation

◆ PropertyArray

typedef std::array< std::unique_ptr< Property >, PropertyType::number_of_properties > MaterialPropertyLib::PropertyArray

This data type is based on a std::array. It can hold pointers to objects of class Property or its inheritors. The size of this array is determined by the number of entries of the PropertyType enumerator.

Definition at line 42 of file CreateProperty.h.

◆ PropertyDataType

using MaterialPropertyLib::PropertyDataType = typedef std::variant<double, Eigen::Matrix<double, 2, 1>, Eigen::Matrix<double, 3, 1>, Eigen::Matrix<double, 2, 2>, Eigen::Matrix<double, 3, 3>, Eigen::Matrix<double, 4, 1>, Eigen::Matrix<double, 6, 1>, Eigen::MatrixXd>

Definition at line 31 of file Property.h.

◆ SymmetricTensor

template<int GlobalDim>
using MaterialPropertyLib::SymmetricTensor = typedef Eigen::Matrix<double, symmetric_tensor_size<GlobalDim>, 1>

Definition at line 26 of file GetSymmetricTensor.h.

◆ VariableType

using MaterialPropertyLib::VariableType = typedef std::variant<std::monostate, double, Eigen::Matrix<double, 4, 1>, Eigen::Matrix<double, 6, 1> >

Data type for primary variables, designed to contain both scalar and vector data.

Definition at line 84 of file VariableType.h.

Enumeration Type Documentation

◆ PropertyType

PropertyType is an enumerator list of all known properties of a substance. This includes all properties on all scales (i.e. component, phase, and medium scales). It is used as an index for the PropertyArray of the materials. If a necessary property is not in the list, simply add a new one in alphabetical order (of course, except for the last entry). Please note that any of these entries must also appear in below convert functions.

Enumerator
acentric_factor 
binary_interaction_coefficient 
biot_coefficient 
bishops_effective_stress 
brooks_corey_exponent 
bulk_modulus 
capillary_pressure 
critical_density 
critical_pressure 
critical_temperature 
compressibility 
concentration 

used to specify decay rate of a substance.

decay_rate 
density 
diffusion 
drhodT 
effective_stress 
entry_pressure 
evaporation_enthalpy 
fredlund_parameters 
heat_capacity 
henry_coefficient 
latent_heat 
longitudinal_dispersivity 

used to compute the hydrodynamic dispersion tensor.

molality 
molar_mass 
molar_volume 
mole_fraction 
molecular_diffusion 

ion diffusivity in free water.

name 
permeability 
phase_velocity 
pore_diffusion 

ion diffusivity in the porous medium with account of the effect of tortuosity and connectivity.

poissons_ratio 
porosity 
reference_density 
reference_temperature 
reference_pressure 
relative_permeability 
relative_permeability_nonwetting_phase 
residual_gas_saturation 
residual_liquid_saturation 
retardation_factor 

specify retardation factor used in component transport process.

saturation 
saturation_micro 

capillary pressure saturation relationship for microstructure.

specific_heat_capacity 
specific_latent_heat 
storage 
storage_contribution 
swelling_stress_rate 
thermal_conductivity 
thermal_diffusion_enhancement_factor 

Thermal diffusion enhancement factor for water vapor flow.

thermal_expansivity 

The thermal expansivity corresponds to the linear thermal expansion coefficient for a solid and to the volumetric thermal expansion coefficient for a fluid

thermal_expansivity_contribution 
thermal_longitudinal_dispersivity 
thermal_osmosis_coefficient 
thermal_transversal_dispersivity 
transport_porosity 
transversal_dispersivity 

used to compute the hydrodynamic dispersion tensor.

vapour_pressure 
vapour_density 
vapour_diffusion 
viscosity 
volume_fraction 
youngs_modulus 
number_of_properties 

Definition at line 32 of file PropertyType.h.

33 {
47  decay_rate,
48  density,
49  diffusion,
50  drhodT,
60  molality,
61  molar_mass,
66  name,
73  porosity,
83  saturation,
88  storage,
108  viscosity,
112 };
@ molecular_diffusion
ion diffusivity in free water.
Definition: PropertyType.h:65
@ thermal_diffusion_enhancement_factor
Thermal diffusion enhancement factor for water vapor flow.
Definition: PropertyType.h:93
@ saturation_micro
capillary pressure saturation relationship for microstructure.
Definition: PropertyType.h:85
@ relative_permeability_nonwetting_phase
Definition: PropertyType.h:78
@ longitudinal_dispersivity
used to compute the hydrodynamic dispersion tensor.
Definition: PropertyType.h:59
@ concentration
used to specify decay rate of a substance.
Definition: PropertyType.h:46
@ transversal_dispersivity
used to compute the hydrodynamic dispersion tensor.
Definition: PropertyType.h:104
@ retardation_factor
specify retardation factor used in component transport process.
Definition: PropertyType.h:82

◆ Variable

enum MaterialPropertyLib::Variable : int
strong

Enum Variable is simply a list of all commonly used variables. If the variable of your choice is missing, simply add it somewhere at the list, but above the last entry.

Enumerator
capillary_pressure 
concentration 
density 
effective_pore_pressure 
enthalpy_of_evaporation 
equivalent_plastic_strain 
grain_compressibility 
liquid_phase_pressure 
liquid_saturation 
mechanical_strain 
molar_mass 
molar_mass_derivative 
molar_fraction 
phase_pressure 
porosity 
solid_grain_pressure 
stress 
temperature 
total_strain 
total_stress 
transport_porosity 
vapour_pressure 
volumetric_strain 
number_of_variables 

Definition at line 28 of file VariableType.h.

29 {
32  density,
40  molar_mass,
44  porosity,
46  stress,
54 };
@ number_of_variables
Number of property variables.
static constexpr Temperature temperature
Definition: Variable.h:125
static constexpr Stress stress
Definition: Variable.h:105

Function Documentation

◆ checkMaterialSpatialDistributionMap()

template<typename ContainerMedium , typename ContainerSolid , typename ContainerLiquid , typename ContainerGas >
void MaterialPropertyLib::checkMaterialSpatialDistributionMap ( MeshLib::Mesh const &  mesh,
MaterialPropertyLib::MaterialSpatialDistributionMap const &  media_map,
ContainerMedium const &  required_properties_medium,
ContainerSolid const &  required_properties_solid_phase,
ContainerLiquid const &  required_properties_liquid_phase,
ContainerGas const &  required_properties_gas_phase 
)

Definition at line 23 of file CheckMaterialSpatialDistributionMap.h.

30 {
31  for (auto const& element : mesh.getElements())
32  {
33  auto const element_id = element->getID();
34 
35  auto const& medium = *media_map.getMedium(element_id);
36  if (!required_properties_medium.empty())
37  {
39  medium, required_properties_medium);
40  }
41  if (!required_properties_liquid_phase.empty())
42  {
44  medium.phase("AqueousLiquid"),
45  required_properties_liquid_phase);
46  }
47  if (!required_properties_gas_phase.empty())
48  {
50  medium.phase("Gas"), required_properties_gas_phase);
51  }
52  if (!required_properties_solid_phase.empty())
53  {
55  medium.phase("Solid"), required_properties_solid_phase);
56  }
57  }
58 }
void checkRequiredProperties(Component const &c, Container const &required_properties)
Definition: Component.h:96

References checkRequiredProperties(), MeshLib::Mesh::getElements(), and MaterialPropertyLib::MaterialSpatialDistributionMap::getMedium().

Referenced by ProcessLib::HeatConduction::checkMPLProperties(), ProcessLib::HT::checkMPLProperties(), ProcessLib::LiquidFlow::checkMPLProperties(), ProcessLib::RichardsFlow::checkMPLProperties(), and ProcessLib::SteadyStateDiffusion::checkMPLProperties().

◆ checkRequiredProperties() [1/3]

template<typename Container >
void MaterialPropertyLib::checkRequiredProperties ( Component const &  c,
Container const &  required_properties 
)

Definition at line 96 of file Component.h.

98 {
99  for (auto const& p : required_properties)
100  {
101  if (!c.hasProperty(p))
102  {
103  OGS_FATAL("The property '{:s}' is missing in the component '{:s}'.",
104  property_enum_to_string[p], c.name);
105  }
106  }
107 }
#define OGS_FATAL(...)
Definition: Error.h:26
static const std::array< std::string, PropertyType::number_of_properties > property_enum_to_string
Definition: PropertyType.h:115
static const double p

References c, OGS_FATAL, and property_enum_to_string.

Referenced by ProcessLib::TH2M::NoPhaseTransition::NoPhaseTransition(), ProcessLib::TH2M::PhaseTransition::PhaseTransition(), ProcessLib::TH2M::PhaseTransitionModel::PhaseTransitionModel(), checkMaterialSpatialDistributionMap(), ProcessLib::ComponentTransport::checkMPLProperties(), ProcessLib::RichardsComponentTransport::anonymous_namespace{CreateRichardsComponentTransportProcess.cpp}::checkMPLProperties(), ProcessLib::StokesFlow::anonymous_namespace{CreateStokesFlowProcess.cpp}::checkMPLProperties(), ProcessLib::RichardsMechanics::checkMPLProperties(), ProcessLib::ThermalTwoPhaseFlowWithPP::checkMPLProperties(), ProcessLib::ThermoMechanics::checkMPLProperties(), ProcessLib::ThermoRichardsFlow::checkMPLProperties(), ProcessLib::ThermoRichardsMechanics::checkMPLProperties(), and ProcessLib::HydroMechanics::createHydroMechanicsProcess().

◆ checkRequiredProperties() [2/3]

template<typename Container >
void MaterialPropertyLib::checkRequiredProperties ( Medium const &  medium,
Container const &  required_properties 
)

Definition at line 109 of file Medium.h.

111 {
112  for (auto const& p : required_properties)
113  {
114  if (!medium.hasProperty(p))
115  {
116  OGS_FATAL(
117  "The property '{:s}' is missing in the medium definition.",
119  }
120  }
121 }

References MaterialPropertyLib::Medium::hasProperty(), OGS_FATAL, and property_enum_to_string.

◆ checkRequiredProperties() [3/3]

template<typename Container >
void MaterialPropertyLib::checkRequiredProperties ( Phase const &  phase,
Container const &  required_properties 
)

Definition at line 75 of file Phase.h.

76 {
77  for (auto const& p : required_properties)
78  {
79  if (!phase.hasProperty(p))
80  {
81  OGS_FATAL("The property '{:s}' is missing in the {:s} phase.",
82  property_enum_to_string[p], phase.name);
83  }
84  }
85 }

References MaterialPropertyLib::Phase::hasProperty(), MaterialPropertyLib::Phase::name, OGS_FATAL, and property_enum_to_string.

◆ checkSaturationRange()

void MaterialPropertyLib::checkSaturationRange ( const double  Sl)

Definition at line 24 of file CapillaryPressureRegularizedVanGenuchten.cpp.

25 {
26  if (Sl < 0 || Sl > 1)
27  {
28  OGS_FATAL("The saturation of {:e} is out of its range of [0, 1]", Sl);
29  }
30 }

References OGS_FATAL.

Referenced by MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten::dValue(), and MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten::value().

◆ checkVanGenuchtenExponentRange()

void MaterialPropertyLib::checkVanGenuchtenExponentRange ( const double  m)

Definition at line 18 of file CheckVanGenuchtenExponentRange.cpp.

19 {
20  if (m <= 0 || m >= 1)
21  {
22  OGS_FATAL(
23  "The exponent value m = {:e} of van Genuchten saturation model, is "
24  "out of its range of(0, 1) ",
25  m);
26  }
27 }

References OGS_FATAL.

Referenced by MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten::CapillaryPressureRegularizedVanGenuchten(), and MaterialPropertyLib::RelPermNonWettingPhaseVanGenuchtenMualem::RelPermNonWettingPhaseVanGenuchtenMualem().

◆ collectVariables()

static std::vector<std::string> MaterialPropertyLib::collectVariables ( std::vector< std::string > const &  value_string_expressions,
std::vector< std::pair< std::string, std::vector< std::string >>> const &  dvalue_string_expressions 
)
static

Definition at line 121 of file Function.cpp.

125 {
126  std::vector<std::string> variables;
127 
128  auto collect_variables = [&](auto string_expressions)
129  {
130  for (auto const& string_expression : string_expressions)
131  {
132  if (!exprtk::collect_variables(string_expression, variables))
133  {
134  OGS_FATAL("Collecting variables didn't work.");
135  }
136  }
137  };
138 
139  collect_variables(value_string_expressions);
140  for (auto const& var_name_string_expression : dvalue_string_expressions)
141  {
142  collect_variables(var_name_string_expression.second);
143  }
144 
145  BaseLib::makeVectorUnique(variables);
146  return variables;
147 }
void makeVectorUnique(std::vector< T > &v)
Definition: Algorithm.h:209

References BaseLib::makeVectorUnique(), and OGS_FATAL.

Referenced by MaterialPropertyLib::Function::Function().

◆ compileExpressions()

template<typename T >
static std::vector<exprtk::expression<T> > MaterialPropertyLib::compileExpressions ( exprtk::symbol_table< T > &  symbol_table,
std::vector< std::string > const &  string_expressions 
)
static

Definition at line 21 of file Function.cpp.

24 {
25  exprtk::parser<T> parser;
26 
27  std::vector<exprtk::expression<T>> expressions(string_expressions.size());
28  expressions.resize(string_expressions.size());
29  for (unsigned i = 0; i < string_expressions.size(); ++i)
30  {
31  expressions[i].register_symbol_table(symbol_table);
32  if (!parser.compile(string_expressions[i], expressions[i]))
33  {
34  OGS_FATAL("Error: {:s}\tExpression: {:s}\n",
35  parser.error(),
36  string_expressions[i]);
37  }
38  }
39  return expressions;
40 }

References OGS_FATAL.

Referenced by MaterialPropertyLib::Function::Function().

◆ computeVanGenuchtenMualemValue()

double MaterialPropertyLib::computeVanGenuchtenMualemValue ( const double  S_L,
const double  S_L_r,
const double  S_L_max,
const double  m 
)

Definition at line 25 of file RelPermNonWettingPhaseVanGenuchtenMualem.cpp.

27 {
28  const double Se = (S_L - S_L_r) / (S_L_max - S_L_r);
29  return std::sqrt(1.0 - Se) * std::pow(1.0 - std::pow(Se, 1.0 / m), 2.0 * m);
30 }

Referenced by MaterialPropertyLib::RelPermNonWettingPhaseVanGenuchtenMualem::computeSaturationForMinimumRelativePermeability(), and MaterialPropertyLib::RelPermNonWettingPhaseVanGenuchtenMualem::value().

◆ convertStringToProperty()

PropertyType MaterialPropertyLib::convertStringToProperty ( std::string const &  string)

This function converts a string (e.g. a string from the configuration-tree) into one of the entries of the PropertyType enumerator.

Definition at line 18 of file PropertyType.cpp.

19 {
20  for (int i = 0; i < static_cast<int>(PropertyType::number_of_properties);
21  ++i)
22  {
23  if (boost::iequals(string, property_enum_to_string[i]))
24  {
25  return static_cast<PropertyType>(i);
26  }
27  }
28 
29  OGS_FATAL(
30  "The property name '{:s}' does not correspond to any known property",
31  string);
32 }

References number_of_properties, OGS_FATAL, and property_enum_to_string.

Referenced by MaterialPropertyLib::VolumeFractionAverage::VolumeFractionAverage(), and createProperties().

◆ convertStringToVariable()

Variable MaterialPropertyLib::convertStringToVariable ( std::string const &  string)

This function converts a string (e.g. a string from the configuration-tree) into one of the entries of the VariableType enumerator.

Definition at line 19 of file VariableType.cpp.

20 {
21  for (int i = 0; i < static_cast<int>(Variable::number_of_variables); ++i)
22  {
23  if (boost::iequals(string, variable_enum_to_string[i]))
24  {
25  return static_cast<Variable>(i);
26  }
27  }
28 
29  OGS_FATAL(
30  "The variable name '{:s}' does not correspond to any known variable",
31  string);
32 }
static const std::array< std::string, static_cast< int >Variable::number_of_variables)> variable_enum_to_string
Definition: VariableType.h:58

References number_of_variables, OGS_FATAL, and variable_enum_to_string.

Referenced by MaterialPropertyLib::Function::Function(), createCurve(), createExponential(), and createLinear().

◆ createAverageMolarMass()

std::unique_ptr< AverageMolarMass > MaterialPropertyLib::createAverageMolarMass ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__AverageMolarMass

Definition at line 18 of file CreateAverageMolarMass.cpp.

20 {
22  config.checkConfigParameter("type", "AverageMolarMass");
23 
25  auto property_name = config.peekConfigParameter<std::string>("name");
26 
27  DBUG("Create AverageMolarMass medium property");
29  return std::make_unique<AverageMolarMass>(std::move(property_name));
30 }
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition: Logging.h:29

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createBishopsPowerLaw()

std::unique_ptr< BishopsPowerLaw > MaterialPropertyLib::createBishopsPowerLaw ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__BishopsPowerLaw__exponent

Definition at line 15 of file CreateBishopsPowerLaw.cpp.

17 {
19  config.checkConfigParameter("type", "BishopsPowerLaw");
20 
21  // Second access for storage.
23  auto property_name = config.peekConfigParameter<std::string>("name");
24 
25  DBUG("Create BishopsPowerLaw property {:s}.", property_name);
26 
27  auto const exponent =
29  config.getConfigParameter<double>("exponent");
30 
31  return std::make_unique<MaterialPropertyLib::BishopsPowerLaw>(
32  std::move(property_name), exponent);
33 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createBishopsSaturationCutoff()

std::unique_ptr< BishopsSaturationCutoff > MaterialPropertyLib::createBishopsSaturationCutoff ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__BishopsSaturationCutoff__cutoff_value

Definition at line 15 of file CreateBishopsSaturationCutoff.cpp.

17 {
19  config.checkConfigParameter("type", "BishopsSaturationCutoff");
20 
21  // Second access for storage.
23  auto property_name = config.peekConfigParameter<std::string>("name");
24 
25  DBUG("Create BishopsSaturationCutoff property {:s}.", property_name);
26 
27  auto const cutoff_value =
29  config.getConfigParameter<double>("cutoff_value");
30 
31  return std::make_unique<MaterialPropertyLib::BishopsSaturationCutoff>(
32  std::move(property_name), cutoff_value);
33 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createCapillaryPressureRegularizedVanGenuchten()

std::unique_ptr< Property > MaterialPropertyLib::createCapillaryPressureRegularizedVanGenuchten ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__CapillaryPressureRegularizedVanGenuchten__residual_liquid_saturation
Input File Parameter:
properties__property__CapillaryPressureRegularizedVanGenuchten__residual_gas_saturation
Input File Parameter:
properties__property__CapillaryPressureRegularizedVanGenuchten__exponent
Input File Parameter:
properties__property__CapillaryPressureRegularizedVanGenuchten__p_b

Definition at line 20 of file CreateCapillaryPressureRegularizedVanGenuchten.cpp.

22 {
24  config.checkConfigParameter("type",
25  "CapillaryPressureRegularizedVanGenuchten");
26 
27  DBUG("Create CapillaryPressureRegularizedVanGenuchten medium property");
28 
29  auto const residual_liquid_saturation =
31  config.getConfigParameter<double>("residual_liquid_saturation");
32  auto const maximum_liquid_saturation =
33  1.0 -
35  config.getConfigParameter<double>("residual_gas_saturation");
36  auto const exponent =
38  config.getConfigParameter<double>("exponent");
39  auto const p_b =
41  config.getConfigParameter<double>("p_b");
42 
43  return std::make_unique<CapillaryPressureRegularizedVanGenuchten>(
44  residual_liquid_saturation, maximum_liquid_saturation, exponent, p_b);
45 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), and residual_liquid_saturation.

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createCapillaryPressureVanGenuchten()

std::unique_ptr< Property > MaterialPropertyLib::createCapillaryPressureVanGenuchten ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__CapillaryPressureVanGenuchten__residual_liquid_saturation
Input File Parameter:
properties__property__CapillaryPressureVanGenuchten__residual_gas_saturation
Input File Parameter:
properties__property__CapillaryPressureVanGenuchten__exponent
Input File Parameter:
properties__property__CapillaryPressureVanGenuchten__p_b
Input File Parameter:
properties__property__CapillaryPressureVanGenuchten__maximum_capillary_pressure

Definition at line 20 of file CreateCapillaryPressureVanGenuchten.cpp.

22 {
24  config.checkConfigParameter("type", "CapillaryPressureVanGenuchten");
25 
26  // Second access for storage.
28  auto property_name = config.peekConfigParameter<std::string>("name");
29 
30  DBUG("Create CapillaryPressureVanGenuchten medium property {:s}.",
31  property_name);
32 
33  auto const residual_liquid_saturation =
35  config.getConfigParameter<double>("residual_liquid_saturation");
36  auto const residual_gas_saturation =
38  config.getConfigParameter<double>("residual_gas_saturation");
39  auto const exponent =
41  config.getConfigParameter<double>("exponent");
42  auto const p_b =
44  config.getConfigParameter<double>("p_b");
45  auto const maximum_capillary_pressure =
47  config.getConfigParameter<double>("maximum_capillary_pressure");
48 
49  return std::make_unique<CapillaryPressureVanGenuchten>(
50  std::move(property_name), residual_liquid_saturation,
51  residual_gas_saturation, exponent, p_b, maximum_capillary_pressure);
52 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), BaseLib::ConfigTree::peekConfigParameter(), residual_gas_saturation, and residual_liquid_saturation.

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createClausiusClapeyron()

std::unique_ptr< ClausiusClapeyron > MaterialPropertyLib::createClausiusClapeyron ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__ClausiusClapeyron__triple_temperature
Input File Parameter:
properties__property__ClausiusClapeyron__triple_pressure
Input File Parameter:
properties__property__ClausiusClapeyron__critical_temperature
Input File Parameter:
properties__property__ClausiusClapeyron__critical_pressure
Input File Parameter:
properties__property__ClausiusClapeyron__reference_temperature
Input File Parameter:
properties__property__ClausiusClapeyron__reference_pressure
Input File Parameter:
properties__property__ClausiusClapeyron

Definition at line 18 of file CreateClausiusClapeyron.cpp.

20 {
22  config.checkConfigParameter("type", "ClausiusClapeyron");
23 
25  auto property_name = config.peekConfigParameter<std::string>("name");
26 
27  DBUG("Create ClausiusClapeyron property {:s}.", property_name);
28 
29  auto const triple_temperature =
31  config.getConfigParameter<double>("triple_temperature");
32 
33  auto const triple_pressure =
35  config.getConfigParameter<double>("triple_pressure");
36 
37  auto const critical_temperature =
39  config.getConfigParameter<double>("critical_temperature");
40 
41  auto const critical_pressure =
43  config.getConfigParameter<double>("critical_pressure");
44 
45  auto const ref_temperature =
47  config.getConfigParameter<double>("reference_temperature");
48 
49  auto const ref_pressure =
51  config.getConfigParameter<double>("reference_pressure");
52 
54  return std::make_unique<ClausiusClapeyron>(
55  std::move(property_name), triple_temperature, triple_pressure,
56  critical_temperature, critical_pressure, ref_temperature, ref_pressure);
57 }

References BaseLib::ConfigTree::checkConfigParameter(), critical_pressure, critical_temperature, DBUG(), BaseLib::ConfigTree::getConfigParameter(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createComponents()

std::vector< std::unique_ptr< Component > > MaterialPropertyLib::createComponents ( int const  geometry_dimension,
std::optional< BaseLib::ConfigTree > const &  config,
std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &  parameters,
ParameterLib::CoordinateSystem const *const  local_coordinate_system,
std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &  curves 
)

The method creates components based on config subtree.

Just like a phase, a component can have a name. But, in this case, the name has an important task. If a name is given, a specific component class referring to that name with corresponding physical material properties is created. Assigning a name is optional; If no name is given, a custom component without predefined properties is created.

Input File Parameter:
prj__media__medium__phases__phase__components__component

Definition at line 75 of file CreateComponent.cpp.

83 {
84  if (!config)
85  {
86  return {};
87  }
88 
89  std::vector<std::unique_ptr<Component>> components;
90  for (
91  auto const& component_config :
93  config->getConfigSubtreeList("component"))
94  {
95  auto component =
96  createComponent(geometry_dimension, component_config, parameters,
97  local_coordinate_system, curves);
98 
99  if (std::find_if(components.begin(),
100  components.end(),
101  [component_name = component->name](auto const& c) {
102  return c->name == component_name;
103  }) != components.end())
104  {
105  OGS_FATAL(
106  "Found duplicates with the same component name tag '{:s}'.",
107  component->name);
108  }
109 
110  components.push_back(std::move(component));
111  }
112 
113  return components;
114 }
std::unique_ptr< MaterialPropertyLib::Component > createComponent(int const geometry_dimension, BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters, ParameterLib::CoordinateSystem const *const local_coordinate_system, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)

References c, anonymous_namespace{CreateComponent.cpp}::createComponent(), and OGS_FATAL.

Referenced by anonymous_namespace{CreatePhase.cpp}::createPhase().

◆ createConstant()

std::unique_ptr< Constant > MaterialPropertyLib::createConstant ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__Constant__value

Definition at line 18 of file CreateConstant.cpp.

19 {
21  config.checkConfigParameter("type", "Constant");
22 
23  // Second access for storage.
25  auto property_name = config.peekConfigParameter<std::string>("name");
26 
27  DBUG("Create Constant property {:s}.", property_name);
28  std::vector<double> const values =
30  config.getConfigParameter<std::vector<double>>("value");
31 
32  return std::make_unique<Constant>(std::move(property_name),
33  fromVector(values));
34 }
PropertyDataType fromVector(std::vector< double > const &values)
Definition: Property.cpp:23

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), fromVector(), BaseLib::ConfigTree::getConfigParameter(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createCurve()

std::unique_ptr< Curve > MaterialPropertyLib::createCurve ( BaseLib::ConfigTree const &  config,
std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &  curves 
)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__Curve__curve
Input File Parameter:
properties__property__Curve__independent_variable

Definition at line 21 of file CreateCurve.cpp.

26 {
28  config.checkConfigParameter("type", "Curve");
29 
30  // Second access for storage.
32  auto property_name = config.peekConfigParameter<std::string>("name");
33 
34  DBUG("Create Curve {:s}.", property_name);
35 
37  auto curve_name = config.getConfigParameter<std::string>("curve");
38  DBUG("Using curve '{:s}'", curve_name);
39 
40  auto const& curve =
41  *BaseLib::getOrError(curves, curve_name, "Could not find curve.");
42 
43  auto const independent_variable_string =
45  config.getConfigParameter<std::string>("independent_variable");
46  DBUG("Using independent_variable '{:s}'", independent_variable_string);
47  auto const independent_variable =
49  independent_variable_string);
50 
51  return std::make_unique<Curve>(
52  std::move(property_name), independent_variable, curve);
53 }
Map::mapped_type & getOrError(Map &map, Key const &key, std::string const &error_message)
Definition: Algorithm.h:147
Variable convertStringToVariable(std::string const &string)

References BaseLib::ConfigTree::checkConfigParameter(), convertStringToVariable(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), BaseLib::getOrError(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createDupuitPermeability()

std::unique_ptr< DupuitPermeability > MaterialPropertyLib::createDupuitPermeability ( BaseLib::ConfigTree const &  config,
std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &  parameters 
)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__Dupuit__parameter_name

Definition at line 19 of file CreateDupuitPermeability.cpp.

22 {
24  config.checkConfigParameter("type", "Dupuit");
25 
26  // Second access for storage.
28  auto property_name = config.peekConfigParameter<std::string>("name");
29 
30  DBUG("Create DupuitPermeability property {:s}.", property_name);
31 
32  std::string const& parameter_name =
34  config.getConfigParameter<std::string>("parameter_name");
35  auto const& parameter = ParameterLib::findParameter<double>(
36  parameter_name, parameters, 0, nullptr);
37  return std::make_unique<MaterialPropertyLib::DupuitPermeability>(
38  std::move(property_name), parameter);
39 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createEffectiveThermalConductivityPorosityMixing()

std::unique_ptr< Property > MaterialPropertyLib::createEffectiveThermalConductivityPorosityMixing ( int const  geometry_dimension,
BaseLib::ConfigTree const &  config,
ParameterLib::CoordinateSystem const *const  local_coordinate_system 
)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__EffectiveThermalConductivityPorosityMixing

Definition at line 17 of file CreateEffectiveThermalConductivityPorosityMixing.cpp.

21 {
23  config.checkConfigParameter("type",
24  "EffectiveThermalConductivityPorosityMixing");
25 
26  // Second access for storage.
28  auto property_name = config.peekConfigParameter<std::string>("name");
29 
30  DBUG(
31  "Create effective thermal_conductivity property from porosity mixing "
32  "{:s}.",
33  property_name);
34 
35  if (geometry_dimension == 1)
36  {
37  return std::make_unique<
39  std::move(property_name), local_coordinate_system);
40  }
41 
42  if (geometry_dimension == 2)
43  {
44  return std::make_unique<
46  std::move(property_name), local_coordinate_system);
47  }
49  return std::make_unique<
51  std::move(property_name), local_coordinate_system);
52 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createEmbeddedFracturePermeability()

std::unique_ptr< Property > MaterialPropertyLib::createEmbeddedFracturePermeability ( int const  geometry_dimension,
BaseLib::ConfigTree const &  config,
std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &  parameters 
)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__EmbeddedFracturePermeability__intrinsic_permeability
Input File Parameter:
properties__property__EmbeddedFracturePermeability__initial_aperture
Input File Parameter:
properties__property__EmbeddedFracturePermeability__mean_frac_distance
Input File Parameter:
properties__property__EmbeddedFracturePermeability__threshold_strain
Input File Parameter:
properties__property__EmbeddedFracturePermeability__fracture_normal
Input File Parameter:
properties__property__EmbeddedFracturePermeability__fracture_rotation_xy
Input File Parameter:
properties__property__EmbeddedFracturePermeability__fracture_rotation_yz
Input File Parameter:
properties__property__EmbeddedFracturePermeability__jacobian_factor

Definition at line 17 of file CreateEmbeddedFracturePermeability.cpp.

20 {
21  if ((geometry_dimension != 2) && (geometry_dimension != 3))
22  {
23  OGS_FATAL(
24  "The EmbeddedFracturePermeability is implemented only for 2D or 3D "
25  "problems");
26  }
27 
29  config.checkConfigParameter("type", "EmbeddedFracturePermeability");
30 
31  // Second access for storage.
33  auto property_name = config.peekConfigParameter<std::string>("name");
34 
35  DBUG("Create EmbeddedFracturePermeability medium property");
36 
37  auto const k =
39  config.getConfigParameter<double>("intrinsic_permeability");
40 
41  auto const b0 =
43  config.getConfigParameter<double>("initial_aperture");
44 
45  auto const a =
47  config.getConfigParameter<double>("mean_frac_distance");
48 
49  auto const e0 =
51  config.getConfigParameter<double>("threshold_strain");
52 
53  bool n_const = false;
54  Eigen::Matrix<double, 3, 1> n;
55  if (auto const n_ptr =
57  config.getConfigParameterOptional<std::vector<double>>(
58  "fracture_normal"))
59  {
60  if ((*n_ptr).size() != 3)
61  {
62  OGS_FATAL(
63  "The size of the fracture normal vector must be 3, but is %d.",
64  (*n_ptr).size());
65  }
66  DBUG("Using constant fracture normal vector.");
67  std::copy_n((*n_ptr).data(), 3, n.data());
68  n_const = true;
69  n /= n.norm();
70  }
71  else
72  {
73  DBUG(
74  "No constant fracture normal was given. By default it will be "
75  "determined as the third principal stress vector.");
76  }
77 
78  std::string const fracture_rotation_xy_param_name =
80  config.getConfigParameter<std::string>("fracture_rotation_xy");
81 
82  auto const& phi_xy = ParameterLib::findParameter<double>(
83  fracture_rotation_xy_param_name, parameters, 0, nullptr);
84 
85  std::string const fracture_rotation_yz_param_name =
87  config.getConfigParameter<std::string>("fracture_rotation_yz");
88 
89  auto const& phi_yz = ParameterLib::findParameter<double>(
90  fracture_rotation_yz_param_name, parameters, 0, nullptr);
91 
92  auto const jf =
94  config.getConfigParameter<double>("jacobian_factor", 0.);
95 
96  if (geometry_dimension == 2)
97  {
98  return std::make_unique<EmbeddedFracturePermeability<2>>(
99  std::move(property_name), n, n_const, k, b0, a, e0, phi_xy, phi_yz,
100  jf);
101  }
102  return std::make_unique<EmbeddedFracturePermeability<3>>(
103  std::move(property_name), n, n_const, k, b0, a, e0, phi_xy, phi_yz, jf);
104 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), BaseLib::ConfigTree::getConfigParameterOptional(), OGS_FATAL, and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createExponential()

std::unique_ptr< Exponential > MaterialPropertyLib::createExponential ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__Exponential__reference_value
Input File Parameter:
properties__property__Exponential__exponent
Input File Parameter:
properties__property__Exponential__exponent__variable_name
Input File Parameter:
properties__property__Exponential__exponent__reference_condition
Input File Parameter:
properties__property__Exponential__exponent__factor
Input File Parameter:
properties__property__Exponential__offset

Definition at line 18 of file CreateExponential.cpp.

20 {
22  config.checkConfigParameter("type", "Exponential");
23 
24  // Second access for storage.
26  auto property_name = config.peekConfigParameter<std::string>("name");
27 
28  DBUG("Create Exponential property {:s}.", property_name);
29  auto const reference_value =
31  config.getConfigParameter<double>("reference_value");
32 
33  auto const& exponent_data_config =
35  config.getConfigSubtree("exponent");
36 
37  auto const& variable_name =
39  exponent_data_config.getConfigParameter<std::string>("variable_name");
40  auto const reference_condition =
42  exponent_data_config.getConfigParameter<double>("reference_condition");
43  auto const factor =
45  exponent_data_config.getConfigParameter<double>("factor");
46 
47  auto const offset =
49  config.getConfigParameter<double>("offset");
50 
51  MaterialPropertyLib::Variable exp_data_type =
53 
54  MaterialPropertyLib::ExponentData const exp_data{
55  exp_data_type, reference_condition, factor};
56 
57  return std::make_unique<MaterialPropertyLib::Exponential>(
58  std::move(property_name), offset, reference_value, exp_data);
59 }

References BaseLib::ConfigTree::checkConfigParameter(), convertStringToVariable(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), BaseLib::ConfigTree::getConfigSubtree(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createFunction()

std::unique_ptr< Function > MaterialPropertyLib::createFunction ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__Function__value
Input File Parameter:
properties__property__Function__value__expression
Input File Parameter:
properties__property__Function__dvalue
Input File Parameter:
properties__property__Function__dvalue__variable_name
Input File Parameter:
properties__property__Function__dvalue__expression

Definition at line 15 of file CreateFunction.cpp.

16 {
18  config.checkConfigParameter("type", "Function");
19 
20  // Second access for storage.
22  auto property_name = config.peekConfigParameter<std::string>("name");
23 
24  DBUG("Create Function property {:s}.", property_name);
25 
26  std::vector<std::string> value_expressions;
28  auto const& value_config = config.getConfigSubtree("value");
29 
31  for (auto const& p : value_config.getConfigSubtreeList("expression"))
32  {
33  value_expressions.emplace_back(p.getValue<std::string>());
34  }
35 
36  // For each derivative a name of the variable and the list of expressions.
37  std::vector<std::pair<std::string, std::vector<std::string>>>
38  dvalue_expressions;
40  for (auto const& dvalue_config : config.getConfigSubtreeList("dvalue"))
41  {
42  auto variable_name =
44  dvalue_config.getConfigParameter<std::string>("variable_name");
45 
46  std::vector<std::string> expressions;
48  for (auto const& p : dvalue_config.getConfigSubtreeList("expression"))
49  {
50  expressions.emplace_back(p.getValue<std::string>());
51  }
52  dvalue_expressions.emplace_back(std::move(variable_name),
53  std::move(expressions));
54  }
55 
56  return std::make_unique<MaterialPropertyLib::Function>(
57  std::move(property_name), value_expressions, dvalue_expressions);
58 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), BaseLib::ConfigTree::getConfigSubtree(), BaseLib::ConfigTree::getConfigSubtreeList(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createGasPressureDependentPermeability()

std::unique_ptr< Property > MaterialPropertyLib::createGasPressureDependentPermeability ( int const  geometry_dimension,
BaseLib::ConfigTree const &  config,
std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &  parameters,
ParameterLib::CoordinateSystem const *const  local_coordinate_system 
)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__GasPressureDependentPermeability__initial_permeability
Input File Parameter:
properties__property__GasPressureDependentPermeability__a1
Input File Parameter:
properties__property__GasPressureDependentPermeability__a2
Input File Parameter:
properties__property__GasPressureDependentPermeability__pressure_threshold
Input File Parameter:
properties__property__GasPressureDependentPermeability__minimum_permeability
Input File Parameter:
properties__property__GasPressureDependentPermeability__maximum_permeability

Definition at line 26 of file CreateGasPressureDependentPermeability.cpp.

31 {
32  if ((geometry_dimension != 2) && (geometry_dimension != 3))
33  {
34  OGS_FATAL(
35  "The GasPressureDependentPermeability is implemented only for 2D "
36  "or 3D problems");
37  }
38 
40  config.checkConfigParameter("type", "GasPressureDependentPermeability");
41 
42  // Second access for storage.
44  auto property_name = config.peekConfigParameter<std::string>("name");
45 
46  DBUG("Create GasPressureDependentPermeability property {:s}.",
47  property_name);
48 
49  std::string const& parameter_name =
51  config.getConfigParameter<std::string>("initial_permeability");
52  auto const& parameter_k0 = ParameterLib::findParameter<double>(
53  parameter_name, parameters, 0, nullptr);
54 
55  auto const a1 =
57  config.getConfigParameter<double>("a1");
58  auto const a2 =
60  config.getConfigParameter<double>("a2");
61  auto const pressure_threshold =
63  config.getConfigParameter<double>("pressure_threshold");
64  auto const minimum_permeability =
66  config.getConfigParameter<double>("minimum_permeability");
67  auto const maximum_permeability =
69  config.getConfigParameter<double>("maximum_permeability");
70 
71  if (minimum_permeability > maximum_permeability)
72  {
73  OGS_FATAL(
74  "The value of minimum_permeability of {:e} is larger that the "
75  "value of maximum_permeability of {:e} in "
76  "GasPressureDependentPermeability",
77  minimum_permeability, maximum_permeability);
78  }
79 
80  if (geometry_dimension == 2)
81  {
82  return std::make_unique<GasPressureDependentPermeability<2>>(
83  std::move(property_name), parameter_k0, a1, a2, pressure_threshold,
84  minimum_permeability, maximum_permeability,
85  local_coordinate_system);
86  }
87 
88  return std::make_unique<GasPressureDependentPermeability<3>>(
89  std::move(property_name), parameter_k0, a1, a2, pressure_threshold,
90  minimum_permeability, maximum_permeability, local_coordinate_system);
91 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), OGS_FATAL, and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createIdealGasLaw()

std::unique_ptr< IdealGasLaw > MaterialPropertyLib::createIdealGasLaw ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__IdealGasLaw

Definition at line 18 of file CreateIdealGasLaw.cpp.

20 {
22  config.checkConfigParameter("type", "IdealGasLaw");
23 
24  // Second access for storage.
26  auto property_name = config.peekConfigParameter<std::string>("name");
27 
28  DBUG("Create IdealGasLaw medium property {:s}.", property_name);
30  return std::make_unique<IdealGasLaw>(std::move(property_name));
31 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createIdealGasLawBinaryMixture()

std::unique_ptr< IdealGasLawBinaryMixture > MaterialPropertyLib::createIdealGasLawBinaryMixture ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__IdealGasLawBinaryMixture

Definition at line 18 of file CreateIdealGasLawBinaryMixture.cpp.

20 {
22  config.checkConfigParameter("type", "IdealGasLawBinaryMixture");
23 
24  // Second access for storage.
26  auto property_name = config.peekConfigParameter<std::string>("name");
27 
28  DBUG("Create IdealGasLawBinaryMixture medium property {:s}.",
29  property_name);
30 
32  return std::make_unique<IdealGasLawBinaryMixture>(std::move(property_name));
33 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createKozenyCarmanModel()

std::unique_ptr< Property > MaterialPropertyLib::createKozenyCarmanModel ( BaseLib::ConfigTree const &  config,
std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &  parameters 
)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__KozenyCarman__initial_permeability
Input File Parameter:
properties__property__KozenyCarman__initial_porosity

Definition at line 18 of file CreateKozenyCarmanModel.cpp.

21 {
23  config.checkConfigParameter("type", "KozenyCarman");
24  DBUG("Create Kozeny-Carman model.");
25 
26  auto const& k0 = ParameterLib::findParameter<double>(
28  config.getConfigParameter<std::string>("initial_permeability"),
29  parameters, 0, nullptr);
30 
31  auto const& phi0 = ParameterLib::findParameter<double>(
33  config.getConfigParameter<std::string>("initial_porosity"), parameters,
34  1, nullptr);
35 
36  return std::make_unique<KozenyCarmanModel>(k0, phi0);
37 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), and BaseLib::ConfigTree::getConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createLinear()

std::unique_ptr< Linear > MaterialPropertyLib::createLinear ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__Linear__reference_value
Input File Parameter:
properties__property__Linear__independent_variable
Input File Parameter:
properties__property__Linear__independent_variable__variable_name
Input File Parameter:
properties__property__Linear__independent_variable__reference_condition
Input File Parameter:
properties__property__Linear__independent_variable__slope

Definition at line 18 of file CreateLinear.cpp.

19 {
21  config.checkConfigParameter("type", "Linear");
22 
23  // Second access for storage.
25  auto property_name = config.peekConfigParameter<std::string>("name");
26 
27  DBUG("Create Linear property {:s}.", property_name);
28  auto const reference_value =
30  config.getConfigParameter<double>("reference_value");
31 
32  std::vector<MaterialPropertyLib::IndependentVariable> ivs;
33  for (auto const& independent_variable_config :
35  config.getConfigSubtreeList("independent_variable"))
36  {
37  auto const& variable_name =
39  independent_variable_config.getConfigParameter<std::string>(
40  "variable_name");
41  auto const reference_condition =
43  independent_variable_config.getConfigParameter<double>(
44  "reference_condition");
45  auto const slope =
47  independent_variable_config.getConfigParameter<double>("slope");
48 
51 
52  MaterialPropertyLib::IndependentVariable iv{ivt, reference_condition,
53  slope};
54 
55  ivs.push_back(std::move(iv));
56  }
57 
58  return std::make_unique<MaterialPropertyLib::Linear>(
59  std::move(property_name), reference_value, ivs);
60 }

References BaseLib::ConfigTree::checkConfigParameter(), convertStringToVariable(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), BaseLib::ConfigTree::getConfigSubtreeList(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createLinearSaturationSwellingStress()

std::unique_ptr< Property > MaterialPropertyLib::createLinearSaturationSwellingStress ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__LinearSaturationSwellingStress__coefficient
Input File Parameter:
properties__property__LinearSaturationSwellingStress__reference_saturation

Definition at line 20 of file CreateLinearSaturationSwellingStress.cpp.

22 {
24  config.checkConfigParameter("type", "LinearSaturationSwellingStress");
25 
27  auto property_name = config.peekConfigParameter<std::string>("name");
28 
29  DBUG("Create LinearSaturationSwellingStress phase property {:s}.",
30  property_name);
31 
32  auto const coefficient =
34  config.getConfigParameter<double>("coefficient");
35 
36  auto const reference_saturation =
38  config.getConfigParameter<double>("reference_saturation");
39 
40  return std::make_unique<LinearSaturationSwellingStress>(
41  property_name, coefficient, reference_saturation);
42 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createLinearWaterVapourLatentHeat()

std::unique_ptr< Property > MaterialPropertyLib::createLinearWaterVapourLatentHeat ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__LinearWaterVapourLatentHeat

Definition at line 20 of file CreateLinearWaterVapourLatentHeat.cpp.

22 {
24  config.checkConfigParameter("type", "LinearWaterVapourLatentHeat");
25  DBUG("Create LinearWaterVapourLatentHeat phase property");
26 
27  // Second access for storage.
29  auto property_name = config.peekConfigParameter<std::string>("name");
30 
32  return std::make_unique<LinearWaterVapourLatentHeat>(
33  std::move(property_name));
34 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createMaterialSpatialDistributionMap()

std::unique_ptr< MaterialSpatialDistributionMap > MaterialPropertyLib::createMaterialSpatialDistributionMap ( std::map< int, std::shared_ptr< Medium >> const &  media,
MeshLib::Mesh const &  mesh 
)

Definition at line 19 of file CreateMaterialSpatialDistributionMap.cpp.

22 {
23  auto const material_ids = materialIDs(mesh);
24 
25  int const max_material_id =
26  !material_ids
27  ? 0
28  : *std::max_element(begin(*material_ids), end(*material_ids));
29 
30  if (max_material_id > static_cast<int>(media.size() - 1))
31  {
32  WARN(
33  "The maximum value of MaterialIDs in mesh is {:d}. As the given "
34  "number of porous media definitions in the project file is {:d}, "
35  "the maximum value of MaterialIDs in mesh must be {:d} (index "
36  "starts with zero).",
37  max_material_id, media.size(), max_material_id - 1);
38  }
39 
40  if (max_material_id < static_cast<int>(media.size() - 1))
41  {
42  WARN(
43  "There are {:d} porous medium definitions in the project file but "
44  "only {:d} different values in the MaterialIDs vector/data_array "
45  "in the mesh.",
46  media.size(), max_material_id - 1);
47  }
48  return std::make_unique<MaterialSpatialDistributionMap>(media,
49  material_ids);
50 }
void WARN(fmt::format_string< Args... > fmt, Args &&... args)
Definition: Logging.h:39
PropertyVector< int > const * materialIDs(Mesh const &mesh)
Definition: Mesh.cpp:264

References MeshLib::materialIDs(), and WARN().

Referenced by ProcessLib::ComponentTransport::createComponentTransportProcess(), ProcessLib::HeatConduction::createHeatConductionProcess(), ProcessLib::HeatTransportBHE::createHeatTransportBHEProcess(), ProcessLib::HT::createHTProcess(), ProcessLib::HydroMechanics::createHydroMechanicsProcess(), ProcessLib::LiquidFlow::createLiquidFlowProcess(), ProcessLib::RichardsComponentTransport::createRichardsComponentTransportProcess(), ProcessLib::RichardsFlow::createRichardsFlowProcess(), ProcessLib::RichardsMechanics::createRichardsMechanicsProcess(), ProcessLib::SteadyStateDiffusion::createSteadyStateDiffusion(), ProcessLib::StokesFlow::createStokesFlowProcess(), ProcessLib::TH2M::createTH2MProcess(), ProcessLib::ThermalTwoPhaseFlowWithPP::createThermalTwoPhaseFlowWithPPProcess(), ProcessLib::ThermoHydroMechanics::createThermoHydroMechanicsProcess(), ProcessLib::ThermoMechanics::createThermoMechanicsProcess(), ProcessLib::ThermoRichardsFlow::createThermoRichardsFlowProcess(), ProcessLib::ThermoRichardsMechanics::createThermoRichardsMechanicsProcess(), and ProcessLib::TwoPhaseFlowWithPP::createTwoPhaseFlowWithPPProcess().

◆ createMedium()

std::unique_ptr< Medium > MaterialPropertyLib::createMedium ( int const  material_id,
int const  geometry_dimension,
BaseLib::ConfigTree const &  config,
std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &  parameters,
ParameterLib::CoordinateSystem const *const  local_coordinate_system,
std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &  curves 
)

This function parses the "phases" and "properties" subtrees of the config tree and calls create methods for the phase vector and the properties array. Medium properties are optional. If not defined, default properties are assigned.

Input File Parameter:
prj__media__medium__phases
Input File Parameter:
prj__media__medium__properties

Definition at line 24 of file CreateMedium.cpp.

33 {
34  // Parsing the phases
35  // Properties of phases may be not required in all the cases.
36  auto&& phases = createPhases(geometry_dimension,
38  config.getConfigSubtreeOptional("phases"),
39  parameters, local_coordinate_system, curves);
40 
41  // Parsing medium properties, overwriting the defaults.
42  auto&& properties =
43  createProperties(geometry_dimension,
45  config.getConfigSubtreeOptional("properties"),
46  parameters, local_coordinate_system, curves);
47 
48  if (phases.empty() && !properties)
49  {
50  OGS_FATAL("Neither tag <phases> nor tag <properties> has been found.");
51  }
52 
53  return std::make_unique<Medium>(material_id, std::move(phases),
54  std::move(properties));
55 }
std::vector< std::unique_ptr< Phase > > createPhases(int const geometry_dimension, std::optional< BaseLib::ConfigTree > const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters, ParameterLib::CoordinateSystem const *const local_coordinate_system, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)
Definition: CreatePhase.cpp:91
std::unique_ptr< PropertyArray > createProperties(int const geometry_dimension, std::optional< BaseLib::ConfigTree > const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters, ParameterLib::CoordinateSystem const *const local_coordinate_system, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)

References createPhases(), createProperties(), BaseLib::ConfigTree::getConfigSubtreeOptional(), and OGS_FATAL.

Referenced by ProjectData::parseMedia().

◆ createOrthotropicEmbeddedFracturePermeability()

std::unique_ptr< Property > MaterialPropertyLib::createOrthotropicEmbeddedFracturePermeability ( int const  geometry_dimension,
BaseLib::ConfigTree const &  config,
std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &  parameters 
)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__OrthotropicEmbeddedFracturePermeability__mean_frac_distances
Input File Parameter:
properties__property__OrthotropicEmbeddedFracturePermeability__threshold_strains
Input File Parameter:
properties__property__OrthotropicEmbeddedFracturePermeability__fracture_normals
Input File Parameter:
properties__property__OrthotropicEmbeddedFracturePermeability__intrinsic_permeability
Input File Parameter:
properties__property__OrthotropicEmbeddedFracturePermeability__fracture_rotation_xy
Input File Parameter:
properties__property__OrthotropicEmbeddedFracturePermeability__fracture_rotation_yz
Input File Parameter:
properties__property__OrthotropicEmbeddedFracturePermeability__jacobian_factor

Definition at line 19 of file CreateOrthotropicEmbeddedFracturePermeability.cpp.

22 {
23  if ((geometry_dimension != 2) && (geometry_dimension != 3))
24  {
25  OGS_FATAL(
26  "The OrthotropicEmbeddedFracturePermeability is implemented only "
27  "for 2D or 3D problems");
28  }
29 
31  config.checkConfigParameter("type",
32  "OrthotropicEmbeddedFracturePermeability");
33 
34  // Second access for storage.
36  auto property_name = config.peekConfigParameter<std::string>("name");
37 
38  DBUG("Create OrthotropicEmbeddedFracturePermeability medium property");
39 
40  auto const a_i =
42  config.getConfigParameter<std::vector<double>>("mean_frac_distances");
43  if (a_i.size() != 3)
44  {
45  OGS_FATAL(
46  "The size of the mean fracture distances vector must be 3, but is "
47  "{}.",
48  a_i.size());
49  }
50 
51  auto const e_i0 =
53  config.getConfigParameter<std::vector<double>>("threshold_strains");
54  if (e_i0.size() != 3)
55  {
56  OGS_FATAL(
57  "The size of the mean threshold strains vector must be 3, but is "
58  "{}.",
59  e_i0.size());
60  }
61 
62  auto const n =
64  config.getConfigParameter<std::vector<double>>("fracture_normals");
65  if (n.size() != 6)
66  {
67  OGS_FATAL(
68  "The size of the fracture normals vector must be 6, but is {}.",
69  n.size());
70  }
71  Eigen::Vector3d const n1 = Eigen::Vector3d({n[0], n[1], n[2]}).normalized();
72  Eigen::Vector3d const n2 = Eigen::Vector3d({n[3], n[4], n[5]}).normalized();
73 
74  if (n1.dot(n2) > std::numeric_limits<double>::epsilon())
75  {
76  OGS_FATAL(
77  "The given fracture normals are not orthogonal. Please provide two "
78  "orthogonal fracture normals");
79  }
80 
81  Eigen::Matrix3d const n_i =
82  (Eigen::Matrix3d() << n1, n2, n1.cross(n2)).finished();
83 
84  std::string const intrinsic_permeability_param_name =
86  config.getConfigParameter<std::string>("intrinsic_permeability");
87 
88  auto const& k = ParameterLib::findParameter<double>(
89  intrinsic_permeability_param_name, parameters, 0, nullptr);
90 
91  std::string const fracture_rotation_xy_param_name =
93  config.getConfigParameter<std::string>("fracture_rotation_xy");
94 
95  auto const& phi_xy = ParameterLib::findParameter<double>(
96  fracture_rotation_xy_param_name, parameters, 0, nullptr);
97 
98  std::string const fracture_rotation_yz_param_name =
100  config.getConfigParameter<std::string>("fracture_rotation_yz");
101 
102  auto const& phi_yz = ParameterLib::findParameter<double>(
103  fracture_rotation_yz_param_name, parameters, 0, nullptr);
104 
105  auto const jf =
107  config.getConfigParameter<double>("jacobian_factor", 0.);
108 
109  if (geometry_dimension == 2)
110  {
111  return std::make_unique<OrthotropicEmbeddedFracturePermeability<2>>(
112  std::move(property_name), a_i, e_i0, n_i, k, phi_xy, phi_yz, jf);
113  }
114  return std::make_unique<OrthotropicEmbeddedFracturePermeability<3>>(
115  std::move(property_name), a_i, e_i0, n_i, k, phi_xy, phi_yz, jf);
116 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), OGS_FATAL, and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createParameterProperty()

std::unique_ptr< Parameter > MaterialPropertyLib::createParameterProperty ( BaseLib::ConfigTree const &  config,
std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &  parameters 
)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__Parameter__parameter_name

Definition at line 22 of file CreateParameter.cpp.

25 {
27  config.checkConfigParameter("type", "Parameter");
28 
29  // Second access for storage.
31  auto property_name = config.peekConfigParameter<std::string>("name");
32 
33  DBUG("Create Parameter property {:s}.", property_name);
34 
35  std::string const& parameter_name =
37  config.getConfigParameter<std::string>("parameter_name");
38  auto const& parameter = ParameterLib::findParameter<double>(
39  parameter_name, parameters, 0, nullptr);
40  return std::make_unique<MaterialPropertyLib::Parameter>(
41  std::move(property_name), parameter);
42 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createPermeabilityMohrCoulombFailureIndexModel()

std::unique_ptr< Property > MaterialPropertyLib::createPermeabilityMohrCoulombFailureIndexModel ( int const  geometry_dimension,
BaseLib::ConfigTree const &  config,
std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &  parameters,
ParameterLib::CoordinateSystem const *const  local_coordinate_system 
)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__PermeabilityMohrCoulombFailureIndexModel__initial_permeability
Input File Parameter:
properties__property__PermeabilityMohrCoulombFailureIndexModel__reference_permeability
Input File Parameter:
properties__property__PermeabilityMohrCoulombFailureIndexModel__fitting_factor
Input File Parameter:
properties__property__PermeabilityMohrCoulombFailureIndexModel__cohesion
Input File Parameter:
properties__property__PermeabilityMohrCoulombFailureIndexModel__friction_angle
Input File Parameter:
properties__property__PermeabilityMohrCoulombFailureIndexModel__maximum_permeability
Input File Parameter:
properties__property__PermeabilityMohrCoulombFailureIndexModel__tensile_strength_parameter

Definition at line 25 of file CreatePermeabilityMohrCoulombFailureIndexModel.cpp.

30 {
31  if ((geometry_dimension != 2) && (geometry_dimension != 3))
32  {
33  OGS_FATAL(
34  "The PermeabilityMohrCoulombFailureIndexModel is implemented only "
35  "for 2D or 3D problems");
36  }
37 
39  config.checkConfigParameter("type",
40  "PermeabilityMohrCoulombFailureIndexModel");
41 
42  // Second access for storage.
44  auto property_name = config.peekConfigParameter<std::string>("name");
45 
46  DBUG("Create PermeabilityMohrCoulombFailureIndexModel property {:s}.",
47  property_name);
48 
49  std::string const& parameter_name =
51  config.getConfigParameter<std::string>("initial_permeability");
52  auto const& parameter_k0 = ParameterLib::findParameter<double>(
53  parameter_name, parameters, 0, nullptr);
54 
55  auto const kr =
57  config.getConfigParameter<double>("reference_permeability");
58  auto const b =
60  config.getConfigParameter<double>("fitting_factor");
61  auto const c =
63  config.getConfigParameter<double>("cohesion");
64  auto const phi =
66  config.getConfigParameter<double>("friction_angle");
67  auto const max_k =
69  config.getConfigParameter<double>("maximum_permeability");
70  auto const t_sigma_max =
72  config.getConfigParameter<double>("tensile_strength_parameter");
73 
74  if (geometry_dimension == 2)
75  {
76  return std::make_unique<PermeabilityMohrCoulombFailureIndexModel<2>>(
77  std::move(property_name), parameter_k0, kr, b, c, phi, max_k,
78  t_sigma_max, local_coordinate_system);
79  }
80 
81  return std::make_unique<PermeabilityMohrCoulombFailureIndexModel<3>>(
82  std::move(property_name), parameter_k0, kr, b, c, phi, max_k,
83  t_sigma_max, local_coordinate_system);
84 }

References c, BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), OGS_FATAL, and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createPermeabilityOrthotropicPowerLaw()

std::unique_ptr< Property > MaterialPropertyLib::createPermeabilityOrthotropicPowerLaw ( BaseLib::ConfigTree const &  config,
ParameterLib::CoordinateSystem const *const  local_coordinate_system 
)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__PermeabilityOrthotropicPowerLaw__intrinsic_permeabilities
Input File Parameter:
properties__property__PermeabilityOrthotropicPowerLaw__exponents

Definition at line 16 of file CreatePermeabilityOrthotropicPowerLaw.cpp.

19 {
21  config.checkConfigParameter("type", "PermeabilityOrthotropicPowerLaw");
22 
23  // Second access for storage.
25  auto property_name = config.peekConfigParameter<std::string>("name");
26 
27  DBUG("Create PermeabilityOrthotropicPowerLaw solid phase property {:s}.",
28  property_name);
29 
30  auto const intrinsic_permeabilities =
32  config.getConfigParameter<std::vector<double>>(
33  "intrinsic_permeabilities");
34 
35  if (!((intrinsic_permeabilities.size() == 3) ||
36  (intrinsic_permeabilities.size() == 2)))
37  {
38  OGS_FATAL(
39  "The number of intrinsic permeabilities must be two or three, but "
40  "{:d} were given.",
41  intrinsic_permeabilities.size());
42  }
43 
44  auto const exponents =
46  config.getConfigParameter<std::vector<double>>("exponents");
47 
48  if (exponents.size() != 3 && exponents.size() != 2)
49  {
50  OGS_FATAL(
51  "The number of exponents must be two or three, but {:d} were "
52  "given.",
53  exponents.size());
54  }
55 
56  if (intrinsic_permeabilities.size() != exponents.size())
57  {
58  OGS_FATAL(
59  "The number of intrinsic permeabilities and exponents must be "
60  "equal, but they are {:d} and {:d}, respectively.",
61  intrinsic_permeabilities.size(), exponents.size());
62  }
63 
64  if (exponents.size() == 2)
65  {
66  return std::make_unique<PermeabilityOrthotropicPowerLaw<2>>(
67  std::move(property_name),
68  std::array<double, 2>{intrinsic_permeabilities[0],
69  intrinsic_permeabilities[1]},
70  std::array<double, 2>{exponents[0], exponents[1]},
71  local_coordinate_system);
72  }
73  if (exponents.size() == 3)
74  {
75  return std::make_unique<PermeabilityOrthotropicPowerLaw<3>>(
76  std::move(property_name),
77  std::array<double, 3>{intrinsic_permeabilities[0],
78  intrinsic_permeabilities[1],
79  intrinsic_permeabilities[2]},
80  std::array<double, 3>{exponents[0], exponents[1], exponents[2]},
81  local_coordinate_system);
82  }
83  OGS_FATAL(
84  "Could not create PermeabilityOrthotropicPowerLaw material model.");
85 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), OGS_FATAL, and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createPhases()

std::vector< std::unique_ptr< Phase > > MaterialPropertyLib::createPhases ( int const  geometry_dimension,
std::optional< BaseLib::ConfigTree > const &  config,
std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &  parameters,
ParameterLib::CoordinateSystem const *const  local_coordinate_system,
std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &  curves 
)

A method that parses the phase details and stores them in the private phases_ member.

This method creates the phases of the medium. Unlike a medium, a phase may have a name. However, this is silly at the moment since this name still has no effect (except of some benefits in regard of readability). Phase components are required (a phase consists of at least one component). Phase properties are optional. If not given, default properties are assigned. These default properties average the component properties, weighted by mole fraction.

Input File Parameter:
prj__media__medium__phases__phase

Definition at line 91 of file CreatePhase.cpp.

99 {
100  if (!config)
101  {
102  return {};
103  }
104 
105  std::vector<std::unique_ptr<Phase>> phases;
106 
107  for (auto phase_config :
109  config->getConfigSubtreeList("phase"))
110  {
111  auto phase = createPhase(geometry_dimension, phase_config, parameters,
112  local_coordinate_system, curves);
113 
114  if (std::find_if(phases.begin(),
115  phases.end(),
116  [phase_name = phase->name](auto const& p)
117  { return p->name == phase_name; }) != phases.end())
118  {
119  OGS_FATAL("Found duplicates with the same phase name tag '{:s}'.",
120  phase->name);
121  }
122 
123  phases.push_back(std::move(phase));
124  }
125 
126  return phases;
127 }
std::unique_ptr< MaterialPropertyLib::Phase > createPhase(int const geometry_dimension, BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters, ParameterLib::CoordinateSystem const *const local_coordinate_system, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)
Definition: CreatePhase.cpp:27

References anonymous_namespace{CreatePhase.cpp}::createPhase(), and OGS_FATAL.

Referenced by createMedium().

◆ createPorosityFromMassBalance()

std::unique_ptr< PorosityFromMassBalance > MaterialPropertyLib::createPorosityFromMassBalance ( BaseLib::ConfigTree const &  config,
std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &  parameters 
)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__PorosityFromMassBalance__initial_porosity
Input File Parameter:
properties__property__PorosityFromMassBalance__minimal_porosity
Input File Parameter:
properties__property__PorosityFromMassBalance__maximal_porosity

Definition at line 18 of file CreatePorosityFromMassBalance.cpp.

21 {
23  config.checkConfigParameter("type", "PorosityFromMassBalance");
24 
25  // Second access for storage.
27  auto property_name = config.peekConfigParameter<std::string>("name");
28 
29  DBUG("Create PorosityFromMassBalance medium property {:s}.", property_name);
30 
31  std::string const& parameter_name =
33  config.getConfigParameter<std::string>("initial_porosity");
34  auto const& initial_porosity = ParameterLib::findParameter<double>(
35  parameter_name, parameters, 0, nullptr);
36 
38  auto const& phi_min = config.getConfigParameter<double>("minimal_porosity");
39 
41  auto const& phi_max = config.getConfigParameter<double>("maximal_porosity");
42 
43  return std::make_unique<PorosityFromMassBalance>(
44  std::move(property_name), initial_porosity, phi_min, phi_max);
45 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createProperties()

std::unique_ptr< PropertyArray > MaterialPropertyLib::createProperties ( int const  geometry_dimension,
std::optional< BaseLib::ConfigTree > const &  config,
std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &  parameters,
ParameterLib::CoordinateSystem const *const  local_coordinate_system,
std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &  curves 
)

The method reads the 'properties' tag in the prj-file and creates component properties accordingly.

First, a new property iy created based on the specified property type. Then, the property name is evaluated and the property is copied into the properties array.

Input File Parameter:
properties__property
Input File Parameter:
properties__property__name

Definition at line 312 of file CreateProperty.cpp.

320 {
321  if (!config)
322  {
323  return nullptr;
324  }
325 
327  auto const& property_configs = config->getConfigSubtreeList("property");
328  if (property_configs.empty())
329  {
330  return nullptr;
331  }
332 
333  auto properties = std::make_unique<PropertyArray>();
334 
335  for (auto property_config : property_configs)
336  {
337  // Parsing the property name:
338  auto const property_name =
340  property_config.getConfigParameter<std::string>("name");
341  // Create a new property based on the configuration subtree:
342  auto property =
343  createProperty(geometry_dimension, property_config, parameters,
344  local_coordinate_system, curves);
345 
346  // Insert the new property at the right position into the components
347  // private PropertyArray:
348  (*properties)[convertStringToProperty(property_name)] =
349  std::move(property);
350  }
351  return properties;
352 }
PropertyType convertStringToProperty(std::string const &string)
std::unique_ptr< MaterialPropertyLib::Property > createProperty(int const geometry_dimension, BaseLib::ConfigTree const &config, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters, ParameterLib::CoordinateSystem const *const local_coordinate_system, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)

References convertStringToProperty(), and anonymous_namespace{CreateProperty.cpp}::createProperty().

Referenced by anonymous_namespace{CreateComponent.cpp}::createComponent(), createMedium(), and anonymous_namespace{CreatePhase.cpp}::createPhase().

◆ createRelPermBrooksCorey()

std::unique_ptr< RelPermBrooksCorey > MaterialPropertyLib::createRelPermBrooksCorey ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__RelPermBrooksCorey__residual_liquid_saturation
Input File Parameter:
properties__property__RelPermBrooksCorey__residual_gas_saturation
Input File Parameter:
properties__property__RelPermBrooksCorey__min_relative_permeability
Input File Parameter:
properties__property__RelPermBrooksCorey__lambda

Definition at line 16 of file CreateRelPermBrooksCorey.cpp.

18 {
20  config.checkConfigParameter("type", "RelPermBrooksCorey");
21 
22  // Second access for storage.
24  auto property_name = config.peekConfigParameter<std::string>("name");
25 
26  DBUG("Create RelPermBrooksCorey medium property {:s}.", property_name);
27 
28  auto const residual_liquid_saturation =
30  config.getConfigParameter<double>("residual_liquid_saturation");
31  auto const residual_gas_saturation =
33  config.getConfigParameter<double>("residual_gas_saturation");
34  auto const min_relative_permeability =
36  config.getConfigParameter<double>("min_relative_permeability");
37  auto const exponent =
39  config.getConfigParameter<double>("lambda");
40  if (exponent <= 0.)
41  {
42  OGS_FATAL("Exponent 'lambda' must be positive.");
43  }
44 
45  return std::make_unique<RelPermBrooksCorey>(std::move(property_name),
48  min_relative_permeability,
49  exponent);
50 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), OGS_FATAL, BaseLib::ConfigTree::peekConfigParameter(), residual_gas_saturation, and residual_liquid_saturation.

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createRelPermBrooksCoreyNonwettingPhase()

std::unique_ptr< RelPermBrooksCoreyNonwettingPhase > MaterialPropertyLib::createRelPermBrooksCoreyNonwettingPhase ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__RelPermBrooksCoreyNonwettingPhase__residual_liquid_saturation
Input File Parameter:
properties__property__RelPermBrooksCoreyNonwettingPhase__residual_gas_saturation
Input File Parameter:
properties__property__RelPermBrooksCoreyNonwettingPhase__min_relative_permeability
Input File Parameter:
properties__property__RelPermBrooksCoreyNonwettingPhase__lambda

Definition at line 20 of file CreateRelPermBrooksCoreyNonwettingPhase.cpp.

21 {
23  config.checkConfigParameter("type", "RelPermBrooksCoreyNonwettingPhase");
24 
25  // Second access for storage.
27  auto property_name = config.peekConfigParameter<std::string>("name");
28 
29  DBUG("Create RelPermBrooksCoreyNonwettingPhase medium property {:s}.",
30  property_name);
31 
32  auto const residual_liquid_saturation =
34  config.getConfigParameter<double>("residual_liquid_saturation");
35  auto const residual_gas_saturation =
37  config.getConfigParameter<double>("residual_gas_saturation");
38  auto const min_relative_permeability =
40  config.getConfigParameter<double>("min_relative_permeability");
41  auto const exponent =
43  config.getConfigParameter<double>("lambda");
44  if (exponent <= 0.)
45  {
46  OGS_FATAL("Exponent 'lambda' must be positive.");
47  }
48 
49  return std::make_unique<RelPermBrooksCoreyNonwettingPhase>(
50  std::move(property_name),
53  min_relative_permeability,
54  exponent);
55 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), OGS_FATAL, BaseLib::ConfigTree::peekConfigParameter(), residual_gas_saturation, and residual_liquid_saturation.

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createRelPermLiakopoulos()

std::unique_ptr< RelPermLiakopoulos > MaterialPropertyLib::createRelPermLiakopoulos ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__RelPermLiakopoulos

Definition at line 16 of file CreateRelPermLiakopoulos.cpp.

18 {
20  config.checkConfigParameter("type", "RelPermLiakopoulos");
21 
22  // Second access for storage.
24  auto property_name = config.peekConfigParameter<std::string>("name");
25 
26  DBUG("Create RelPermLiakopoulos medium property {:s}.", property_name);
27 
29  return std::make_unique<RelPermLiakopoulos>(std::move(property_name));
30 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createRelPermNonWettingPhaseVanGenuchtenMualem()

std::unique_ptr< Property > MaterialPropertyLib::createRelPermNonWettingPhaseVanGenuchtenMualem ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__RelativePermeabilityNonWettingPhaseVanGenuchtenMualem__residual_liquid_saturation
Input File Parameter:
properties__property__RelativePermeabilityNonWettingPhaseVanGenuchtenMualem__residual_gas_saturation
Input File Parameter:
properties__property__RelativePermeabilityNonWettingPhaseVanGenuchtenMualem__exponent
Input File Parameter:
properties__property__RelativePermeabilityNonWettingPhaseVanGenuchtenMualem__min_relative_permeability

Definition at line 20 of file CreateRelPermNonWettingPhaseVanGenuchtenMualem.cpp.

22 {
24  config.checkConfigParameter(
25  "type", "RelativePermeabilityNonWettingPhaseVanGenuchtenMualem");
26  DBUG("Create RelPermNonWettingPhaseVanGenuchtenMualem medium property");
27 
28  // Second access for storage.
30  auto property_name = config.peekConfigParameter<std::string>("name");
31 
32  auto const residual_liquid_saturation =
34  config.getConfigParameter<double>("residual_liquid_saturation");
35  auto const residual_gas_saturation =
37  config.getConfigParameter<double>("residual_gas_saturation");
38 
39  auto const exponent =
41  config.getConfigParameter<double>("exponent");
42 
43  auto const min_relative_permeability =
45  config.getConfigParameter<double>("min_relative_permeability");
46 
47  if (min_relative_permeability <= 0.0 || min_relative_permeability > 1.0)
48  {
49  OGS_FATAL(
50  "The value for min_relative_permeability of "
51  "RelativePermeabilityNonWettingPhaseVanGenuchtenMualem is {:g}, "
52  "which falls outside of the range of (0, 1]",
53  min_relative_permeability);
54  }
55 
56  return std::make_unique<RelPermNonWettingPhaseVanGenuchtenMualem>(
58  exponent, min_relative_permeability);
59 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), OGS_FATAL, BaseLib::ConfigTree::peekConfigParameter(), residual_gas_saturation, and residual_liquid_saturation.

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createRelPermUdell()

std::unique_ptr< RelPermUdell > MaterialPropertyLib::createRelPermUdell ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__RelativePermeabilityUdell__residual_liquid_saturation
Input File Parameter:
properties__property__RelativePermeabilityUdell__residual_gas_saturation
Input File Parameter:
properties__property__RelativePermeabilityUdell__min_relative_permeability

Definition at line 18 of file CreateRelPermUdell.cpp.

20 {
22  config.checkConfigParameter("type", "RelativePermeabilityUdell");
23 
24  // Second access for storage.
26  auto property_name = config.peekConfigParameter<std::string>("name");
27 
28  DBUG("Create RelPermUdell medium property {:s}.", property_name);
29 
30  auto const residual_liquid_saturation =
32  config.getConfigParameter<double>("residual_liquid_saturation");
33  auto const residual_gas_saturation =
35  config.getConfigParameter<double>("residual_gas_saturation");
36  auto const min_relative_permeability =
38  config.getConfigParameter<double>("min_relative_permeability");
39 
40  if (min_relative_permeability < 0)
41  {
42  OGS_FATAL("Minimal relative permeability must be non-negative.");
43  }
44 
45  return std::make_unique<RelPermUdell>(
46  std::move(property_name), residual_liquid_saturation,
47  residual_gas_saturation, min_relative_permeability);
48 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), OGS_FATAL, BaseLib::ConfigTree::peekConfigParameter(), residual_gas_saturation, and residual_liquid_saturation.

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createRelPermUdellNonwettingPhase()

std::unique_ptr< RelPermUdellNonwettingPhase > MaterialPropertyLib::createRelPermUdellNonwettingPhase ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__RelativePermeabilityUdellNonwettingPhase__residual_liquid_saturation
Input File Parameter:
properties__property__RelativePermeabilityUdellNonwettingPhase__residual_gas_saturation
Input File Parameter:
properties__property__RelativePermeabilityUdellNonwettingPhase__min_relative_permeability

Definition at line 17 of file CreateRelPermUdellNonwettingPhase.cpp.

19 {
21  config.checkConfigParameter("type",
22  "RelativePermeabilityUdellNonwettingPhase");
23 
24  // Second access for storage.
26  auto property_name = config.peekConfigParameter<std::string>("name");
27 
28  DBUG("Create RelPermUdellNonwettingPhase medium property {:s}.",
29  property_name);
30 
31  auto const residual_liquid_saturation =
33  config.getConfigParameter<double>("residual_liquid_saturation");
34  auto const residual_gas_saturation =
36  config.getConfigParameter<double>("residual_gas_saturation");
37  auto const min_relative_permeability =
39  config.getConfigParameter<double>("min_relative_permeability");
40 
41  if (min_relative_permeability < 0)
42  {
43  OGS_FATAL("Minimal relative permeability must be non-negative.");
44  }
45 
46  return std::make_unique<RelPermUdellNonwettingPhase>(
47  std::move(property_name), residual_liquid_saturation,
48  residual_gas_saturation, min_relative_permeability);
49 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), OGS_FATAL, BaseLib::ConfigTree::peekConfigParameter(), residual_gas_saturation, and residual_liquid_saturation.

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createRelPermVanGenuchten()

std::unique_ptr< RelPermVanGenuchten > MaterialPropertyLib::createRelPermVanGenuchten ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__RelativePermeabilityVanGenuchten__residual_liquid_saturation
Input File Parameter:
properties__property__RelativePermeabilityVanGenuchten__residual_gas_saturation
Input File Parameter:
properties__property__RelativePermeabilityVanGenuchten__minimum_relative_permeability_liquid
Input File Parameter:
properties__property__RelativePermeabilityVanGenuchten__exponent

Definition at line 16 of file CreateRelPermVanGenuchten.cpp.

18 {
20  config.checkConfigParameter("type", "RelativePermeabilityVanGenuchten");
21 
22  // Second access for storage.
24  auto property_name = config.peekConfigParameter<std::string>("name");
25 
26  DBUG("Create RelativePermeabilityVanGenuchten medium property {:s}.",
27  property_name);
28 
29  auto const residual_liquid_saturation =
31  config.getConfigParameter<double>("residual_liquid_saturation");
32  auto const residual_gas_saturation =
34  config.getConfigParameter<double>("residual_gas_saturation");
35  auto const min_relative_permeability_liquid =
37  config.getConfigParameter<double>(
38  "minimum_relative_permeability_liquid");
39  auto const exponent =
41  config.getConfigParameter<double>("exponent");
42  if (exponent <= 0. || exponent >= 1.)
43  {
44  OGS_FATAL("Exponent must be in the (0, 1) range.");
45  }
46 
47  return std::make_unique<RelPermVanGenuchten>(
48  std::move(property_name),
51  min_relative_permeability_liquid,
52  exponent);
53 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), OGS_FATAL, BaseLib::ConfigTree::peekConfigParameter(), residual_gas_saturation, and residual_liquid_saturation.

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createSaturationBrooksCorey()

std::unique_ptr< SaturationBrooksCorey > MaterialPropertyLib::createSaturationBrooksCorey ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__SaturationBrooksCorey__residual_liquid_saturation
Input File Parameter:
properties__property__SaturationBrooksCorey__residual_gas_saturation
Input File Parameter:
properties__property__SaturationBrooksCorey__lambda
Input File Parameter:
properties__property__SaturationBrooksCorey__entry_pressure

Definition at line 16 of file CreateSaturationBrooksCorey.cpp.

18 {
20  config.checkConfigParameter("type", "SaturationBrooksCorey");
21 
22  // Second access for storage.
24  auto property_name = config.peekConfigParameter<std::string>("name");
25 
26  DBUG("Create SaturationBrooksCorey medium property {:s}.", property_name);
27 
28  auto const residual_liquid_saturation =
30  config.getConfigParameter<double>("residual_liquid_saturation");
31  auto const residual_gas_saturation =
33  config.getConfigParameter<double>("residual_gas_saturation");
34  auto const exponent =
36  config.getConfigParameter<double>("lambda");
37  auto const entry_pressure =
39  config.getConfigParameter<double>("entry_pressure");
40 
41  return std::make_unique<SaturationBrooksCorey>(
42  std::move(property_name), residual_liquid_saturation,
44 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), entry_pressure, BaseLib::ConfigTree::getConfigParameter(), BaseLib::ConfigTree::peekConfigParameter(), residual_gas_saturation, and residual_liquid_saturation.

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createSaturationDependentSwelling()

std::unique_ptr< SaturationDependentSwelling > MaterialPropertyLib::createSaturationDependentSwelling ( BaseLib::ConfigTree const &  config,
ParameterLib::CoordinateSystem const *const  local_coordinate_system 
)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__SaturationDependentSwelling__swelling_pressures
Input File Parameter:
properties__property__SaturationDependentSwelling__exponents
Input File Parameter:
properties__property__SaturationDependentSwelling__lower_saturation_limit
Input File Parameter:
properties__property__SaturationDependentSwelling__upper_saturation_limit

Definition at line 16 of file CreateSaturationDependentSwelling.cpp.

19 {
21  config.checkConfigParameter("type", "SaturationDependentSwelling");
22 
23  // Second access for storage.
25  auto property_name = config.peekConfigParameter<std::string>("name");
26 
27  DBUG("Create SaturationDependentSwelling solid phase property {:s}.",
28  property_name);
29 
30  auto const swelling_pressures =
32  config.getConfigParameter<std::vector<double>>("swelling_pressures");
33 
34  if (swelling_pressures.size() != 3)
35  {
36  OGS_FATAL(
37  "The number of swelling pressures must be three, but {:d} were "
38  "given.",
39  swelling_pressures.size());
40  }
41 
42  auto const exponents =
44  config.getConfigParameter<std::vector<double>>("exponents");
45 
46  if (exponents.size() != 3)
47  {
48  OGS_FATAL("The number of exponents must be three, but {:d} were given.",
49  exponents.size());
50  }
51 
52  if (swelling_pressures.size() != exponents.size())
53  {
54  OGS_FATAL(
55  "The number of swelling pressures and exponents must be equal, but "
56  "they are {:d} and {:d}, respectively.",
57  swelling_pressures.size(), exponents.size());
58  }
59 
60  auto const lower_saturation_limit =
62  config.getConfigParameter<double>("lower_saturation_limit");
63 
64  auto const upper_saturation_limit =
66  config.getConfigParameter<double>("upper_saturation_limit");
67 
68  return std::make_unique<SaturationDependentSwelling>(
69  std::move(property_name),
70  std::array<double, 3>{swelling_pressures[0], swelling_pressures[1],
71  swelling_pressures[2]},
72  std::array<double, 3>{exponents[0], exponents[1], exponents[2]},
73  lower_saturation_limit, upper_saturation_limit,
74  local_coordinate_system);
75 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), OGS_FATAL, and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createSaturationDependentThermalConductivity()

std::unique_ptr< SaturationDependentThermalConductivity > MaterialPropertyLib::createSaturationDependentThermalConductivity ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__SaturationDependentThermalConductivity__dry
Input File Parameter:
properties__property__SaturationDependentThermalConductivity__wet

Definition at line 16 of file CreateSaturationDependentThermalConductivity.cpp.

17 {
19  config.checkConfigParameter("type",
20  "SaturationDependentThermalConductivity");
21 
22  // Second access for storage.
24  auto property_name = config.peekConfigParameter<std::string>("name");
25 
26  DBUG("Create saturation dependent thermal_conductivity property {:s}.",
27  property_name);
28 
29  auto const K_dry =
31  config.getConfigParameter<double>("dry");
32 
33  auto const K_wet =
35  config.getConfigParameter<double>("wet");
36 
37  return std::make_unique<
39  std::move(property_name), K_dry, K_wet);
40 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createSaturationExponential()

std::unique_ptr< SaturationExponential > MaterialPropertyLib::createSaturationExponential ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__SaturationExponential__residual_liquid_saturation
Input File Parameter:
properties__property__SaturationExponential__residual_gas_saturation
Input File Parameter:
properties__property__SaturationExponential__maximum_capillary_pressure
Input File Parameter:
properties__property__SaturationExponential__exponent

Definition at line 16 of file CreateSaturationExponential.cpp.

18 {
20  config.checkConfigParameter("type", "SaturationExponential");
21 
22  // Second access for storage.
24  auto property_name = config.peekConfigParameter<std::string>("name");
25 
26  DBUG("Create SaturationExponential medium property {:s}.", property_name);
27 
28  auto const residual_liquid_saturation =
30  config.getConfigParameter<double>("residual_liquid_saturation");
31  auto const residual_gas_saturation =
33  config.getConfigParameter<double>("residual_gas_saturation");
34  auto const p_cap_max =
36  config.getConfigParameter<double>("maximum_capillary_pressure");
37  auto const exponent =
39  config.getConfigParameter<double>("exponent");
40 
41  return std::make_unique<SaturationExponential>(
42  std::move(property_name), residual_liquid_saturation,
43  residual_gas_saturation, p_cap_max, exponent);
44 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), BaseLib::ConfigTree::peekConfigParameter(), residual_gas_saturation, and residual_liquid_saturation.

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createSaturationLiakopoulos()

std::unique_ptr< SaturationLiakopoulos > MaterialPropertyLib::createSaturationLiakopoulos ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__SaturationLiakopoulos

Definition at line 16 of file CreateSaturationLiakopoulos.cpp.

18 {
20  config.checkConfigParameter("type", "SaturationLiakopoulos");
21 
22  // Second access for storage.
24  auto property_name = config.peekConfigParameter<std::string>("name");
25 
26  DBUG("Create SaturationLiakopoulos medium property {:s}.", property_name);
27 
29  return std::make_unique<SaturationLiakopoulos>(std::move(property_name));
30 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createSaturationVanGenuchten()

std::unique_ptr< SaturationVanGenuchten > MaterialPropertyLib::createSaturationVanGenuchten ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__SaturationVanGenuchten__residual_liquid_saturation
Input File Parameter:
properties__property__SaturationVanGenuchten__residual_gas_saturation
Input File Parameter:
properties__property__SaturationVanGenuchten__exponent
Input File Parameter:
properties__property__SaturationVanGenuchten__p_b

Definition at line 16 of file CreateSaturationVanGenuchten.cpp.

18 {
20  config.checkConfigParameter("type", "SaturationVanGenuchten");
21 
22  // Second access for storage.
24  auto property_name = config.peekConfigParameter<std::string>("name");
25 
26  DBUG("Create SaturationVanGenuchten medium property {:s}.", property_name);
27 
28  auto const residual_liquid_saturation =
30  config.getConfigParameter<double>("residual_liquid_saturation");
31  auto const residual_gas_saturation =
33  config.getConfigParameter<double>("residual_gas_saturation");
34  auto const exponent =
36  config.getConfigParameter<double>("exponent");
38  auto const p_b = config.getConfigParameter<double>("p_b");
39 
40  return std::make_unique<SaturationVanGenuchten>(
41  std::move(property_name), residual_liquid_saturation,
42  residual_gas_saturation, exponent, p_b);
43 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), BaseLib::ConfigTree::peekConfigParameter(), residual_gas_saturation, and residual_liquid_saturation.

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createSoilThermalConductivitySomerton()

std::unique_ptr< Property > MaterialPropertyLib::createSoilThermalConductivitySomerton ( int const  geometry_dimension,
BaseLib::ConfigTree const &  config,
std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &  parameters,
ParameterLib::CoordinateSystem const *const  local_coordinate_system 
)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__SoilThermalConductivitySomerton__dry_thermal_conductivity
Input File Parameter:
properties__property__SoilThermalConductivitySomerton__wet_thermal_conductivity

Definition at line 25 of file CreateSoilThermalConductivitySomerton.cpp.

30 {
32  config.checkConfigParameter("type", "SoilThermalConductivitySomerton");
33 
35  auto property_name = config.peekConfigParameter<std::string>("name");
36 
37  DBUG("Create SoilThermalConductivitySomerton medium property");
38 
39  std::string const& dry_thermal_conductivity_parameter_name =
41  config.getConfigParameter<std::string>("dry_thermal_conductivity");
42  auto const& dry_thermal_conductivity = ParameterLib::findParameter<double>(
43  dry_thermal_conductivity_parameter_name, parameters, 0, nullptr);
44 
45  std::string const& wet_thermal_conductivity_parameter_name =
47  config.getConfigParameter<std::string>("wet_thermal_conductivity");
48  auto const& wet_thermal_conductivity = ParameterLib::findParameter<double>(
49  wet_thermal_conductivity_parameter_name, parameters, 0, nullptr);
50 
51  if (geometry_dimension == 1)
52  {
53  return std::make_unique<SoilThermalConductivitySomerton<1>>(
54  std::move(property_name),
55  dry_thermal_conductivity,
56  wet_thermal_conductivity,
57  local_coordinate_system);
58  }
59 
60  if (geometry_dimension == 2)
61  {
62  return std::make_unique<SoilThermalConductivitySomerton<2>>(
63  std::move(property_name),
64  dry_thermal_conductivity,
65  wet_thermal_conductivity,
66  local_coordinate_system);
67  }
68 
69  return std::make_unique<SoilThermalConductivitySomerton<3>>(
70  std::move(property_name),
71  dry_thermal_conductivity,
72  wet_thermal_conductivity,
73  local_coordinate_system);
74 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createSpecificHeatCapacityWithLatentHeat()

std::unique_ptr< SpecificHeatCapacityWithLatentHeat > MaterialPropertyLib::createSpecificHeatCapacityWithLatentHeat ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__SpecificHeatCapacityWithLatentHeat__specific_latent_heat

Definition at line 19 of file CreateSpecificHeatCapacityWithLatentHeat.cpp.

20 {
22  config.checkConfigParameter("type", "SpecificHeatCapacityWithLatentHeat");
23 
24  // Second access for storage.
26  auto property_name = config.peekConfigParameter<std::string>("name");
27 
28  DBUG("Create temperature dependent specific heat capacity {:s}.",
29  property_name);
30 
31  auto const l =
33  config.getConfigParameter<double>("specific_latent_heat");
34 
35  return std::make_unique<
37  std::move(property_name), l);
38 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createStrainDependentPermeability()

std::unique_ptr< Property > MaterialPropertyLib::createStrainDependentPermeability ( int const  geometry_dimension,
BaseLib::ConfigTree const &  config,
std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &  parameters,
ParameterLib::CoordinateSystem const *const  local_coordinate_system 
)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__StrainDependentPermeability__initial_permeability
Input File Parameter:
properties__property__StrainDependentPermeability__b1
Input File Parameter:
properties__property__StrainDependentPermeability__b2
Input File Parameter:
properties__property__StrainDependentPermeability__b3
Input File Parameter:
properties__property__StrainDependentPermeability__minimum_permeability
Input File Parameter:
properties__property__StrainDependentPermeability__maximum_permeability

Definition at line 26 of file CreateStrainDependentPermeability.cpp.

31 {
32  if ((geometry_dimension != 2) && (geometry_dimension != 3))
33  {
34  OGS_FATAL(
35  "The StrainDependentPermeability is implemented only for 2D or 3D "
36  "problems");
37  }
38 
40  config.checkConfigParameter("type", "StrainDependentPermeability");
41 
42  // Second access for storage.
44  auto property_name = config.peekConfigParameter<std::string>("name");
45 
46  DBUG("Create StrainDependentPermeability property {:s}.", property_name);
47 
48  std::string const& parameter_name =
50  config.getConfigParameter<std::string>("initial_permeability");
51  auto const& parameter_k0 = ParameterLib::findParameter<double>(
52  parameter_name, parameters, 0, nullptr);
53 
54  auto const b1 =
56  config.getConfigParameter<double>("b1");
57  auto const b2 =
59  config.getConfigParameter<double>("b2");
60  auto const b3 =
62  config.getConfigParameter<double>("b3");
63  auto const minimum_permeability =
65  config.getConfigParameter<double>("minimum_permeability");
66  auto const maximum_permeability =
68  config.getConfigParameter<double>("maximum_permeability");
69 
70  if (minimum_permeability > maximum_permeability)
71  {
72  OGS_FATAL(
73  "The value of minimum_permeability of {:e} is larger that the "
74  "value of maximum_permeability of {:e} in "
75  "StrainDependentPermeability",
76  minimum_permeability, maximum_permeability);
77  }
78 
79  if (geometry_dimension == 2)
80  {
81  return std::make_unique<StrainDependentPermeability<2>>(
82  std::move(property_name), parameter_k0, b1, b2, b3,
83  minimum_permeability, maximum_permeability,
84  local_coordinate_system);
85  }
86 
87  return std::make_unique<StrainDependentPermeability<3>>(
88  std::move(property_name), parameter_k0, b1, b2, b3,
89  minimum_permeability, maximum_permeability, local_coordinate_system);
90 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), OGS_FATAL, and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createTemperatureDependentDiffusion()

std::unique_ptr< Property > MaterialPropertyLib::createTemperatureDependentDiffusion ( BaseLib::ConfigTree const &  config,
std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &  parameters 
)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__TemperatureDependentDiffusion__reference_diffusion
Input File Parameter:
properties__property__TemperatureDependentDiffusion__activation_energy
Input File Parameter:
properties__property__TemperatureDependentDiffusion__reference_temperature

Definition at line 16 of file CreateTemperatureDependentDiffusion.cpp.

19 {
21  config.checkConfigParameter("type", "TemperatureDependentDiffusion");
22 
23  auto const& D0 = ParameterLib::findParameter<double>(
25  config.getConfigParameter<std::string>("reference_diffusion"),
26  parameters, 0, nullptr);
27 
28  auto const Ea =
30  config.getConfigParameter<double>("activation_energy");
31 
32  auto const T0 =
34  config.getConfigParameter<double>("reference_temperature");
35 
36  return std::make_unique<TemperatureDependentDiffusion>(D0, Ea, T0);
37 }

References BaseLib::ConfigTree::checkConfigParameter(), and BaseLib::ConfigTree::getConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createTemperatureDependentFraction()

std::unique_ptr< TemperatureDependentFraction > MaterialPropertyLib::createTemperatureDependentFraction ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__TemperatureDependentFraction__steepness
Input File Parameter:
properties__property__TemperatureDependentFraction__characteristic_temperature

Definition at line 16 of file CreateTemperatureDependentFraction.cpp.

17 {
19  config.checkConfigParameter("type", "TemperatureDependentFraction");
20 
21  // Second access for storage.
23  auto property_name = config.peekConfigParameter<std::string>("name");
24 
25  DBUG("Create temperature dependent fraction property {:s}.", property_name);
26 
27  auto const k =
29  config.getConfigParameter<double>("steepness");
30 
31  auto const T_c =
33  config.getConfigParameter<double>("characteristic_temperature");
34 
35  return std::make_unique<MaterialPropertyLib::TemperatureDependentFraction>(
36  std::move(property_name), k, T_c);
37 }
constexpr double T_c
Critical temperature.

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), BaseLib::ConfigTree::peekConfigParameter(), and T_c.

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createTransportPorosityFromMassBalance()

std::unique_ptr< TransportPorosityFromMassBalance > MaterialPropertyLib::createTransportPorosityFromMassBalance ( BaseLib::ConfigTree const &  config,
std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &  parameters 
)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__TransportPorosityFromMassBalance__initial_porosity
Input File Parameter:
properties__property__TransportPorosityFromMassBalance__minimal_porosity
Input File Parameter:
properties__property__TransportPorosityFromMassBalance__maximal_porosity

Definition at line 19 of file CreateTransportPorosityFromMassBalance.cpp.

22 {
24  config.checkConfigParameter("type", "TransportPorosityFromMassBalance");
25 
26  // Second access for storage.
28  auto property_name = config.peekConfigParameter<std::string>("name");
29 
30  DBUG("Create TransportPorosityFromMassBalance medium property {:s}.",
31  property_name);
32 
33  std::string const& parameter_name =
35  config.getConfigParameter<std::string>("initial_porosity");
36  auto const& initial_porosity = ParameterLib::findParameter<double>(
37  parameter_name, parameters, 0, nullptr);
38 
40  auto const& phi_min = config.getConfigParameter<double>("minimal_porosity");
41 
43  auto const& phi_max = config.getConfigParameter<double>("maximal_porosity");
44 
45  return std::make_unique<TransportPorosityFromMassBalance>(
46  std::move(property_name), initial_porosity, phi_min, phi_max);
47 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createVapourDiffusionFEBEX()

std::unique_ptr< Property > MaterialPropertyLib::createVapourDiffusionFEBEX ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__VapourDiffusionFEBEX__tortuosity

Definition at line 20 of file CreateVapourDiffusionFEBEX.cpp.

22 {
24  config.checkConfigParameter("type", "VapourDiffusionFEBEX");
25  DBUG("Create VapourDiffusionFEBEX phase property");
26 
27  // Second access for storage.
29  auto property_name = config.peekConfigParameter<std::string>("name");
30 
31  auto const tortuosity =
33  config.getConfigParameter<double>("tortuosity");
34 
35  return std::make_unique<VapourDiffusionFEBEX>(std::move(property_name),
36  tortuosity);
37 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), BaseLib::ConfigTree::getConfigParameter(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createVapourDiffusionPMQ()

std::unique_ptr< Property > MaterialPropertyLib::createVapourDiffusionPMQ ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__VapourDiffusionPMQ

Definition at line 20 of file CreateVapourDiffusionPMQ.cpp.

22 {
24  config.checkConfigParameter("type", "VapourDiffusionPMQ");
25  DBUG("Create VapourDiffusionPMQ phase property");
26 
28  auto property_name = config.peekConfigParameter<std::string>("name");
29 
31  return std::make_unique<VapourDiffusionPMQ>(std::move(property_name));
32 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createVermaPruessModel()

std::unique_ptr< Property > MaterialPropertyLib::createVermaPruessModel ( BaseLib::ConfigTree const &  config,
std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &  parameters 
)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__VermaPruessModel__initial_permeability
Input File Parameter:
properties__property__VermaPruessModel__initial_porosity
Input File Parameter:
properties__property__VermaPruessModel__critical_porosity
Input File Parameter:
properties__property__VermaPruessModel__exponent

Definition at line 18 of file CreateVermaPruessModel.cpp.

21 {
23  config.checkConfigParameter("type", "VermaPruess");
24  DBUG("Create Verma-Pruess model.");
25 
26  auto const& k0 = ParameterLib::findParameter<double>(
28  config.getConfigParameter<std::string>("initial_permeability"),
29  parameters, 0, nullptr);
30 
31  auto const& phi0 = ParameterLib::findParameter<double>(
33  config.getConfigParameter<std::string>("initial_porosity"), parameters,
34  1, nullptr);
35 
36  auto const& phi_c = ParameterLib::findParameter<double>(
38  config.getConfigParameter<std::string>("critical_porosity"), parameters,
39  1, nullptr);
40 
41  auto const& n = ParameterLib::findParameter<double>(
43  config.getConfigParameter<std::string>("exponent"), parameters, 1,
44  nullptr);
45 
46  return std::make_unique<VermaPruessModel>(k0, phi0, phi_c, n);
47 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), and BaseLib::ConfigTree::getConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createVolumeFractionAverage()

std::unique_ptr< VolumeFractionAverage > MaterialPropertyLib::createVolumeFractionAverage ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__VolumeFractionAverage

Definition at line 15 of file CreateVolumeFractionAverage.cpp.

17 {
19  config.checkConfigParameter("type", "VolumeFractionAverage");
20 
21  // Second access for storage.
23  auto property_name = config.peekConfigParameter<std::string>("name");
24 
26  DBUG("Create volume fraction average {:s}.", property_name);
27 
28  // no input parameters required here (taken from phase properties)
29 
30  return std::make_unique<MaterialPropertyLib::VolumeFractionAverage>(
31  std::move(property_name));
32 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createWaterVapourDensity()

std::unique_ptr< Property > MaterialPropertyLib::createWaterVapourDensity ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__WaterVapourDensity

Definition at line 20 of file CreateWaterVapourDensity.cpp.

22 {
24  config.checkConfigParameter("type", "WaterVapourDensity");
25  DBUG("Create WaterVapourDensity phase property");
26 
27  // Second access for storage.
29  auto property_name = config.peekConfigParameter<std::string>("name");
30 
32  return std::make_unique<WaterVapourDensity>(std::move(property_name));
33 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ createWaterVapourLatentHeatWithCriticalTemperature()

std::unique_ptr< Property > MaterialPropertyLib::createWaterVapourLatentHeatWithCriticalTemperature ( BaseLib::ConfigTree const &  config)
Input File Parameter:
properties__property__type
Input File Parameter:
properties__property__name
Input File Parameter:
properties__property__WaterVapourLatentHeatWithCriticalTemperature

Definition at line 20 of file CreateWaterVapourLatentHeatWithCriticalTemperature.cpp.

22 {
24  config.checkConfigParameter("type",
25  "WaterVapourLatentHeatWithCriticalTemperature");
26  DBUG("Create WaterVapourLatentHeatWithCriticalTemperature phase property");
27 
28  // Second access for storage.
30  auto property_name = config.peekConfigParameter<std::string>("name");
31 
33  return std::make_unique<WaterVapourLatentHeatWithCriticalTemperature>(
34  std::move(property_name));
35 }

References BaseLib::ConfigTree::checkConfigParameter(), DBUG(), and BaseLib::ConfigTree::peekConfigParameter().

Referenced by anonymous_namespace{CreateProperty.cpp}::createProperty().

◆ dsaturatedVaporDensitydT()

static double MaterialPropertyLib::dsaturatedVaporDensitydT ( double const  T)
static

\(\frac{\partial \rho_{vS}}{\partial T}\)

Definition at line 29 of file WaterVapourDensity.cpp.

30 {
31  return 4.9759 * std::exp(19.819 - 4975.9 / T) / (T * T);
32 }

Referenced by MaterialPropertyLib::WaterVapourDensity::dValue().

◆ evaluateExpressions()

static PropertyDataType MaterialPropertyLib::evaluateExpressions ( std::vector< std::pair< Variable, double * >> const &  symbol_values,
VariableArray const &  variable_array,
std::vector< exprtk::expression< double >> const &  expressions 
)
static

Definition at line 77 of file Function.cpp.

81 {
82  updateVariableValues(symbol_values, variable_array);
83 
84  std::vector<double> result(expressions.size());
85  std::transform(begin(expressions), end(expressions), begin(result),
86  [](auto const& e) { return e.value(); });
87 
88  switch (result.size())
89  {
90  case 1:
91  {
92  return result[0];
93  }
94  case 2:
95  {
96  return Eigen::Vector2d{result[0], result[1]};
97  }
98  case 3:
99  {
100  return Eigen::Vector3d{result[0], result[1], result[2]};
101  }
102  case 4:
103  {
104  Eigen::Matrix<double, 2, 2> m;
105  m = Eigen::Map<Eigen::Matrix<double, 2, 2> const>(result.data(), 2,
106  2);
107  return m;
108  }
109  case 9:
110  {
111  Eigen::Matrix<double, 3, 3> m;
112  m = Eigen::Map<Eigen::Matrix<double, 3, 3> const>(result.data(), 3,
113  3);
114  return m;
115  }
116  }
117  OGS_FATAL("Cannot convert a vector of size {} to a PropertyDataType",
118  result.size());
119 }
static void updateVariableValues(std::vector< std::pair< Variable, double * >> const &symbol_values, VariableArray const &variable_array)
Definition: Function.cpp:42

References OGS_FATAL, and updateVariableValues().

Referenced by MaterialPropertyLib::Function::dValue(), and MaterialPropertyLib::Function::value().

◆ fluidPhase()

◆ formEffectiveThermalConductivity()

template<int GlobalDim>
Eigen::Matrix< double, GlobalDim, GlobalDim > MaterialPropertyLib::formEffectiveThermalConductivity ( MaterialPropertyLib::PropertyDataType const &  solid_thermal_conductivity,
const double  fluid_thermal_conductivity,
const double  porosity 
)

Definition at line 19 of file FormEffectiveThermalConductivity.cpp.

22 {
23  return (1.0 - porosity) *
24  formEigenTensor<GlobalDim>(solid_thermal_conductivity) +
25  porosity * fluid_thermal_conductivity *
26  Eigen::Matrix<double, GlobalDim, GlobalDim>::Identity();
27 }

References porosity.

Referenced by ProcessLib::ThermalTwoPhaseFlowWithPP::ThermalTwoPhaseFlowWithPPLocalAssembler< ShapeFunction, GlobalDim >::assemble().

◆ formEffectiveThermalConductivity< 1 >()

template Eigen::Matrix<double, 1, 1> MaterialPropertyLib::formEffectiveThermalConductivity< 1 > ( MaterialPropertyLib::PropertyDataType const &  solid_thermal_conductivity,
const double  fluid_thermal_conductivity,
const double  porosity 
)

◆ formEffectiveThermalConductivity< 2 >()

template Eigen::Matrix<double, 2, 2> MaterialPropertyLib::formEffectiveThermalConductivity< 2 > ( MaterialPropertyLib::PropertyDataType const &  solid_thermal_conductivity,
const double  fluid_thermal_conductivity,
const double  porosity 
)

◆ formEffectiveThermalConductivity< 3 >()

template Eigen::Matrix<double, 3, 3> MaterialPropertyLib::formEffectiveThermalConductivity< 3 > ( MaterialPropertyLib::PropertyDataType const &  solid_thermal_conductivity,
const double  fluid_thermal_conductivity,
const double  porosity 
)

◆ formEigenTensor()

template<int GlobalDim>
Eigen::Matrix< double, GlobalDim, GlobalDim > MaterialPropertyLib::formEigenTensor ( MaterialPropertyLib::PropertyDataType const &  values)

Definition at line 115 of file FormEigenTensor.cpp.

117 {
118  return std::visit(FormEigenTensor<GlobalDim>(), values);
119 }

Referenced by ProcessLib::HydroMechanics::HydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assembleWithJacobian().

◆ formEigenTensor< 1 >()

template Eigen::Matrix<double, 1, 1> MaterialPropertyLib::formEigenTensor< 1 > ( MaterialPropertyLib::PropertyDataType const &  values)

◆ formEigenTensor< 2 >()

template Eigen::Matrix<double, 2, 2> MaterialPropertyLib::formEigenTensor< 2 > ( MaterialPropertyLib::PropertyDataType const &  values)

◆ formEigenTensor< 3 >()

◆ formEigenTensor< 4 >()

template Eigen::Matrix<double, 4, 4> MaterialPropertyLib::formEigenTensor< 4 > ( MaterialPropertyLib::PropertyDataType const &  values)

◆ formEigenTensor< 6 >()

template Eigen::Matrix<double, 6, 6> MaterialPropertyLib::formEigenTensor< 6 > ( MaterialPropertyLib::PropertyDataType const &  values)

◆ formEigenVector()

template<int GlobalDim>
Eigen::Matrix< double, GlobalDim, 1 > MaterialPropertyLib::formEigenVector ( MaterialPropertyLib::PropertyDataType const &  values)

Definition at line 89 of file FormEigenVector.cpp.

91 {
92  return std::visit(FormEigenVector<GlobalDim>(), values);
93 }

◆ formEigenVector< 1 >()

template Eigen::Matrix<double, 1, 1> MaterialPropertyLib::formEigenVector< 1 > ( MaterialPropertyLib::PropertyDataType const &  values)

◆ formEigenVector< 2 >()

template Eigen::Matrix<double, 2, 1> MaterialPropertyLib::formEigenVector< 2 > ( MaterialPropertyLib::PropertyDataType const &  values)

◆ formEigenVector< 3 >()

◆ formKelvinVectorFromThermalExpansivity()

template<int GlobalDim>
MathLib::KelvinVector::KelvinVectorType< GlobalDim > MaterialPropertyLib::formKelvinVectorFromThermalExpansivity ( MaterialPropertyLib::PropertyDataType const &  values)

A function to form a Kelvin vector from thermal expansivity for thermal strain.

It takes the thermal expansivity, either a scalar number for isotropic thermal expansion or a three element vector for anisotropic thermal expansion, to get a Kelvin vector for thermal strain.

Parameters
valuesThermal expansivity, which can be scalar number or a three element vector.
Returns
Thermal expansivity in Kelvin vector type.

Definition at line 83 of file FormKelvinVectorFromThermalExpansivity.cpp.

85 {
86  return std::visit(FormKelvinVectorFromThermalExpansivity<GlobalDim>(),
87  values);
88 }

◆ formKelvinVectorFromThermalExpansivity< 2 >()

◆ formKelvinVectorFromThermalExpansivity< 3 >()

◆ fromVector()

PropertyDataType MaterialPropertyLib::fromVector ( std::vector< double > const &  values)

Conversion of a vector to PropertyDataType for different sizes of the vector.

Attention
This method cannot distinguish between 2x2 matrix and 4x1 vector.
Note
If the values vector stores all elements of a 2x2 or 3x3 matrix (i.e. the general case for 2x2 and 3x3 matrices), it is assumed to be in row major storage order.

Definition at line 23 of file Property.cpp.

24 {
25  switch (values.size())
26  {
27  case 1:
28  {
29  return values[0];
30  }
31  case 2:
32  {
33  return Eigen::Vector2d{values[0], values[1]};
34  }
35  case 3:
36  {
37  return Eigen::Vector3d{values[0], values[1], values[2]};
38  }
39  case 4:
40  {
41  using M = Eigen::Matrix2d;
42  // the values vector is in row major order
43  using MRM = Eigen::Matrix<double, 2, 2, Eigen::RowMajor>;
44  return M{Eigen::Map<MRM const>{values.data(), 2, 2}};
45  }
46  case 6:
47  {
48  // Symmetric Tensor - xx, yy, zz, xy, xz, yz
49  using M = Eigen::Matrix<double, 6, 1>;
50  return M{Eigen::Map<M const>{values.data(), 6}};
51  }
52  case 9:
53  {
54  using M = Eigen::Matrix3d;
55  // the values vector is in row major order
56  using MRM = Eigen::Matrix<double, 3, 3, Eigen::RowMajor>;
57  return M{Eigen::Map<MRM const>{values.data(), 3, 3}};
58  }
59  default:
60  {
61  OGS_FATAL(
62  "Conversion of a {:d}-vector to PropertyDataType is not "
63  "implemented.",
64  values.size());
65  }
66  }
67 }

References OGS_FATAL.

Referenced by createConstant(), MaterialPropertyLib::OrthotropicEmbeddedFracturePermeability< DisplacementDim >::dValue(), MaterialPropertyLib::SoilThermalConductivitySomerton< GlobalDimension >::dValue(), MaterialPropertyLib::PorosityFromMassBalance::initialValue(), MaterialPropertyLib::TransportPorosityFromMassBalance::initialValue(), MaterialPropertyLib::DupuitPermeability::value(), MaterialPropertyLib::KozenyCarmanModel::value(), MaterialPropertyLib::VermaPruessModel::value(), MaterialPropertyLib::GasPressureDependentPermeability< DisplacementDim >::value(), MaterialPropertyLib::OrthotropicEmbeddedFracturePermeability< DisplacementDim >::value(), MaterialPropertyLib::Parameter::value(), MaterialPropertyLib::PermeabilityMohrCoulombFailureIndexModel< DisplacementDim >::value(), MaterialPropertyLib::StrainDependentPermeability< DisplacementDim >::value(), MaterialPropertyLib::SoilThermalConductivitySomerton< GlobalDimension >::value(), and MaterialPropertyLib::TemperatureDependentDiffusion::value().

◆ getLiquidThermalExpansivity()

double MaterialPropertyLib::getLiquidThermalExpansivity ( Phase const &  phase,
VariableArray const &  vars,
const double  density,
ParameterLib::SpatialPosition const &  pos,
double const  t,
double const  dt 
)

It gets the thermal expansion coefficient.

If the the thermal expansion coefficient is given in the project file via the media property of thermal_expansivity, e.g

*     <property>
*       <name>thermal_expansivity</name>
*       <type>Constant</type>
*       <value>2.07e-4</value>
*     </property>
* 

it returns the value of the given property. Otherwise it returns the value computed from the density model by the following formula

\[ (\frac{\partial \rho}{\partial T})/\rho \]

where \(\rho\) is the density, \(T\) is the temperature.

Definition at line 21 of file GetLiquidThermalExpansivity.cpp.

26 {
27  // The thermal expansivity is explicitly given in the project file.
28  if (phase.hasProperty(
30  {
31  return phase
33  .template value<double>(vars, pos, t, dt);
34  }
35 
36  // The thermal expansivity calculated by the density model directly.
37  return (density == 0.0)
38  ? 0.0
40  .template dValue<double>(
42  pos, t, dt) /
43  density;
44 }
static const double t

References density, MaterialPropertyLib::Phase::hasProperty(), MaterialPropertyLib::Phase::property(), MathLib::t, temperature, and thermal_expansivity.

Referenced by ProcessLib::ThermoRichardsFlow::ThermoRichardsFlowLocalAssembler< ShapeFunction, GlobalDim >::assemble(), ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assembleWithJacobian(), ProcessLib::ThermoRichardsFlow::ThermoRichardsFlowLocalAssembler< ShapeFunction, GlobalDim >::assembleWithJacobian(), and ProcessLib::ThermoRichardsMechanics::FluidThermalExpansionModel< DisplacementDim >::eval().

◆ getSymmetricTensor()

template<int GlobalDim>
SymmetricTensor< GlobalDim > MaterialPropertyLib::getSymmetricTensor ( MaterialPropertyLib::PropertyDataType const &  values)

Definition at line 95 of file GetSymmetricTensor.cpp.

97 {
98  return std::visit(GetSymmetricTensor<GlobalDim>(), values);
99 }

◆ getSymmetricTensor< 2 >()

template Eigen::Matrix<double, 4, 1> MaterialPropertyLib::getSymmetricTensor< 2 > ( MaterialPropertyLib::PropertyDataType const &  values)

◆ getSymmetricTensor< 3 >()

template Eigen::Matrix<double, 6, 1> MaterialPropertyLib::getSymmetricTensor< 3 > ( MaterialPropertyLib::PropertyDataType const &  values)

◆ humidity()

static double MaterialPropertyLib::humidity ( double const  T,
double const  p,
double const  water_density 
)
static

◆ newComponent()

std::unique_ptr<Component> MaterialPropertyLib::newComponent ( std::string const &  component_name,
bool &  isCustomComponent 
)

Method for creating a new component based on the specified component name.

This function creates a new component based on the (optional) component name that is given in the prj-file.

The method evaluates the string in the 'name'-object and calls the constructors of the derived component classes (if found) or that of the base class (if no name is specified).

◆ overwriteExistingProperties()

void MaterialPropertyLib::overwriteExistingProperties ( PropertyArray properties,
PropertyArray new_properties,
std::variant< Medium *, Phase *, Component * >  scale_pointer 
)
inline

Definition at line 322 of file Property.h.

327 {
328  for (std::size_t i = 0; i < properties.size(); ++i)
329  {
330  if (new_properties[i] != nullptr)
331  {
332  properties[i] = std::move(new_properties[i]);
333  properties[i]->setScale(scale_pointer);
334  }
335  }
336 }

Referenced by MaterialPropertyLib::Component::Component(), MaterialPropertyLib::Medium::Medium(), and MaterialPropertyLib::Phase::Phase().

◆ saturatedVaporDensity()

static double MaterialPropertyLib::saturatedVaporDensity ( double const  T)
static

\(\rho_{vS}\)

Definition at line 23 of file WaterVapourDensity.cpp.

24 {
25  return 1.0e-3 * std::exp(19.819 - 4975.9 / T);
26 }

Referenced by MaterialPropertyLib::WaterVapourDensity::dValue(), and MaterialPropertyLib::WaterVapourDensity::value().

◆ updatePropertiesForAllPhases()

void MaterialPropertyLib::updatePropertiesForAllPhases ( PropertyArray properties,
std::vector< std::unique_ptr< Phase >> const &  phases 
)
inline

Definition at line 338 of file Property.h.

341 {
342  for (auto& p : properties)
343  {
344  if (p != nullptr)
345  {
346  p->setProperties(phases);
347  }
348  }
349 }

Referenced by MaterialPropertyLib::Medium::Medium().

◆ updateVariableValues()

static void MaterialPropertyLib::updateVariableValues ( std::vector< std::pair< Variable, double * >> const &  symbol_values,
VariableArray const &  variable_array 
)
static

Definition at line 42 of file Function.cpp.

45 {
46  for (auto const& [variable, value_ptr] : symbol_values)
47  {
48  std::visit(
49  [&variable = variable, &value_ptr = value_ptr](auto&& v)
50  {
51  using T = std::decay_t<decltype(v)>;
52  if constexpr (std::is_same_v<T, std::monostate>)
53  {
54  OGS_FATAL(
55  "Function property: variable {:s} value needed for "
56  "evaluation of the expression was not set by the "
57  "caller.",
58  variable_enum_to_string[static_cast<int>(variable)]);
59  }
60  else if constexpr (std::is_same_v<T, double>)
61  {
62  *value_ptr = v;
63  }
64  else
65  {
66  OGS_FATAL(
67  "Function property: not implemented handling for a "
68  "type {:s} of variable {:s}.",
69  typeid(T).name(),
70  variable_enum_to_string[static_cast<int>(variable)]);
71  }
72  },
73  variable_array[variable]);
74  }
75 }
static const double v

References name, OGS_FATAL, MathLib::v, and variable_enum_to_string.

Referenced by evaluateExpressions().

Variable Documentation

◆ alpha

constexpr double MaterialPropertyLib::alpha = 1. / 8.
constexpr

Definition at line 26 of file WaterVapourLatentHeatWithCriticalTemperature.cpp.

Referenced by ProcessLib::RichardsMechanics::RichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assemble(), ProcessLib::ThermoRichardsFlow::ThermoRichardsFlowLocalAssembler< ShapeFunction, GlobalDim >::assemble(), ProcessLib::RobinBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::assemble(), ProcessLib::LIE::HydroMechanics::HydroMechanicsLocalAssemblerFracture< ShapeFunctionDisplacement, ShapeFunctionPressure, GlobalDim >::assembleBlockMatricesWithJacobian(), ProcessLib::LIE::HydroMechanics::HydroMechanicsLocalAssemblerMatrix< ShapeFunctionDisplacement, ShapeFunctionPressure, GlobalDim >::assembleBlockMatricesWithJacobian(), ProcessLib::HydroMechanics::HydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assembleWithJacobian(), ProcessLib::RichardsMechanics::RichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assembleWithJacobian(), ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assembleWithJacobian(), ProcessLib::ThermoRichardsFlow::ThermoRichardsFlowLocalAssembler< ShapeFunction, GlobalDim >::assembleWithJacobian(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianComponentTransportEquation(), ProcessLib::HydroMechanics::HydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::assembleWithJacobianForDeformationEquations(), ProcessLib::ThermoMechanicalPhaseField::ThermoMechanicalPhaseFieldLocalAssembler< ShapeFunction, DisplacementDim >::assembleWithJacobianForDeformationEquations(), ProcessLib::ThermoMechanicalPhaseField::ThermoMechanicalPhaseFieldLocalAssembler< ShapeFunction, DisplacementDim >::assembleWithJacobianForHeatConductionEquations(), MathLib::barycentricPointInTriangle(), ProcessLib::TwoPhaseFlowWithPrho::TwoPhaseFlowWithPrhoMaterialProperties::calculatedSwdP(), ProcessLib::TwoPhaseFlowWithPrho::TwoPhaseFlowWithPrhoMaterialProperties::calculatedSwdX(), ProcessLib::TES::TESFEMReactionAdaptorAdsorption::checkBounds(), ProcessLib::RichardsMechanics::RichardsMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::computeSecondaryVariableConcrete(), ProcessLib::ThermoRichardsFlow::ThermoRichardsFlowLocalAssembler< ShapeFunction, GlobalDim >::computeSecondaryVariableConcrete(), ProcessLib::HydroMechanics::HydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::computeSecondaryVariableConcrete(), MaterialLib::Solids::Ehlers::createEhlers(), ProcessLib::createRobinBoundaryCondition(), MaterialPropertyLib::WaterVapourLatentHeatWithCriticalTemperature::dValue(), ProcessLib::ThermoRichardsMechanics::FluidThermalExpansionModel< DisplacementDim >::eval(), ProcessLib::HydroMechanics::HydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::getIntPtDarcyVelocity(), ProcessLib::ThermoHydroMechanics::ThermoHydroMechanicsLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::getIntPtDarcyVelocity(), ParameterLib::TimeDependentHeterogeneousParameter::operator()(), ProcessLib::ThermoMechanicalPhaseField::IntegrationPointData< BMatricesType, ShapeMatrixType, DisplacementDim >::updateConstitutiveRelation(), ProcessLib::RichardsMechanics::updateSwellingStressAndVolumetricStrain(), and MaterialPropertyLib::WaterVapourLatentHeatWithCriticalTemperature::value().

◆ beta

◆ c

constexpr std::array MaterialPropertyLib::c
constexpr
Initial value:
= {1989.41582, 11178.45586, 26923.68994,
-28989.28947, -19797.03646, 28403.32283,
-30382.306422, 15210.380}

Definition at line 30 of file WaterVapourLatentHeatWithCriticalTemperature.cpp.

Referenced by MathLib::LinearIntervalInterpolation< NUMERIC_TYPE >::LinearIntervalInterpolation(), VtkPointsSource::VtkPointsSource(), VtkPolylinesSource::VtkPolylinesSource(), VtkStationSource::VtkStationSource(), VtkSurfacesSource::VtkSurfacesSource(), GeoLib::OctTree< POINT, MAX_POINTS >::~OctTree(), FileIO::Gocad::GocadSGridReader::addFaceSetQuad(), DetailWindow::addList(), GeoLib::OctTree< POINT, MAX_POINTS >::addPoint(), GeoLib::OctTree< POINT, MAX_POINTS >::addPoint_(), MathLib::addToMatrix(), MathLib::applyKnownSolution(), ProcessLib::TES::TESLocalAssemblerInner< Traits >::assembleIntegrationPoint(), ProcessLib::ThermoMechanics::ThermoMechanicsLocalAssembler< ShapeFunction, DisplacementDim >::assembleWithJacobian(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianComponentTransportEquation(), ProcessLib::ThermoMechanicalPhaseField::ThermoMechanicalPhaseFieldLocalAssembler< ShapeFunction, DisplacementDim >::assembleWithJacobianForHeatConductionEquations(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianHydraulicEquation(), MathLib::barycentricPointInTriangle(), MathLib::calcTetrahedronVolume(), MathLib::calcTriangleArea(), ModelTest::checkChildren(), checkRequiredProperties(), GeoLib::Triangle::containsPoint(), createComponents(), NumLib::MeshComponentMap::createParallelMeshComponentMap(), createPermeabilityMohrCoulombFailureIndexModel(), NumLib::MeshComponentMap::createSerialMeshComponentMap(), MathLib::dividedByPlane(), anonymous_namespace{CompareJacobiansJacobianAssembler.cpp}::dump_py(), MaterialPropertyLib::WaterVapourLatentHeatWithCriticalTemperature::dValue(), NumLib::SerialExecutor::executeDereferenced(), NumLib::LocalLinearLeastSquaresExtrapolator::extrapolate(), ProcessLib::TH2M::findComponentIndex(), MathLib::gaussPointInTriangle(), VtkVisPipeline::getBGColor(), ChemistryLib::PhreeqcIOData::PhreeqcIO::getComponentList(), Adsorption::AdsorptionReaction::getEquilibriumVapourPressure(), Adsorption::AdsorptionReaction::getEvaporationEnthalpy(), NumLib::LocalToGlobalIndexMap::getGlobalIndex(), NumLib::getIndices(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getIntPtMolarFlux(), VtkCompositeElementSelectionFilter::GetLookupTable(), NumLib::LocalToGlobalIndexMap::getNumberOfElementComponents(), NumLib::LocalToGlobalIndexMap::getNumberOfElementDOF(), ExactPredicates::getOrientation2d(), ExactPredicates::getOrientation2dFast(), GeoLib::Grid< POINT >::getPntVecsOfGridCellsIntersectingCube(), MeshLib::ProjectPointOnMesh::getProjectedElement(), MathLib::Nonlinear::RegulaFalsi< SubType, Function >::getResult(), NumLib::getRowColumnIndices(), VtkCompositeColorByHeightFilter::init(), MathLib::initGLTet3X(), GeoLib::SimplePolygonTree::insertSimplePolygonTree(), MathLib::isCoplanar(), MathLib::isPointInTetrahedron(), MathLib::isPointInTriangle(), MathLib::isPointInTriangleXY(), GeoLib::lineSegmentIntersect(), GeoLib::lineSegmentIntersect2d(), main(), markFaults(), anonymous_namespace{MFront.cpp}::MFrontToOGS(), anonymous_namespace{TESLocalAssembler-impl.h}::ogs5OutMat(), anonymous_namespace{MFront.cpp}::OGSToMFront(), ParameterLib::CurveScaledParameter< T >::operator()(), ParameterLib::MeshElementParameter< T >::operator()(), ParameterLib::MeshNodeParameter< T >::operator()(), ParameterLib::RandomFieldMeshElementParameter< T >::operator()(), FileIO::Gocad::IndexCalculator::operator()(), FileIO::Gocad::operator<<(), MathLib::orientation3d(), StratBar::paint(), FileIO::Gocad::GocadSGridReader::parseFaceSet(), ModelTest::rowsAboutToBeInserted(), ModelTest::rowsAboutToBeRemoved(), ModelTest::rowsInserted(), ModelTest::rowsRemoved(), DiagramList::setColor(), MeshLib::MeshElementGrid::sortElementInGridCells(), splitMaterialIdString(), GeoLib::OctTree< POINT, MAX_POINTS >::splitNode(), MathLib::Nonlinear::RegulaFalsi< SubType, Function >::step(), BaseLib::swapEndianness(), testTriangleIntersectingAABB(), NumLib::SerialExecutor::transformDereferenced(), GeoLib::triangleLineIntersection(), DiagramList::truncateToRange(), ProcessLib::TH2M::TH2MLocalAssembler< ShapeFunctionDisplacement, ShapeFunctionPressure, DisplacementDim >::updateConstitutiveVariables(), MaterialPropertyLib::AverageMolarMass::value(), and MaterialPropertyLib::WaterVapourLatentHeatWithCriticalTemperature::value().

◆ Delta

◆ error_info

constexpr const char MaterialPropertyLib::error_info[]
staticconstexpr
Initial value:
=
"The thermal expansivity can only be either a scalar number for isotropic "
"thermal expansion or a three element array for anisotropic thermal "
"expansion."

Definition at line 18 of file FormKelvinVectorFromThermalExpansivity.cpp.

Referenced by MaterialPropertyLib::FormKelvinVectorFromThermalExpansivity< GlobalDim >::operator()().

◆ property_enum_to_string

◆ symmetric_tensor_size

template<int GlobalDim>
constexpr int MaterialPropertyLib::symmetric_tensor_size
constexpr
Initial value:
=
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.
Definition: KelvinVector.h:24

Definition at line 22 of file GetSymmetricTensor.h.

◆ T_c

◆ variable_enum_to_string

const std::array<std::string, static_cast<int>Variable::number_of_variables)> MaterialPropertyLib::variable_enum_to_string
static
Initial value:
{{"capillary_pressure",
"concentration",
"density",
"effective_pore_pressure",
"enthalpy_of_evaporation",
"equivalent_plastic_strain",
"grain_compressibility",
"liquid_phase_pressure",
"liquid_saturation",
"mechanical_strain",
"molar_mass",
"molar_mass_derivative",
"molar_fraction",
"phase_pressure",
"porosity",
"solid_grain_pressure",
"stress",
"temperature",
"total_strain",
"total_stress",
"transport_porosity",
"vapour_pressure",
"volumetric_strain"}}

Definition at line 58 of file VariableType.h.

Referenced by convertStringToVariable(), MaterialPropertyLib::Function::dValue(), and updateVariableValues().