OGS
MaterialLib::Fluid Namespace Reference

Classes

class  ConstantFluidProperty
 Constant fluid properties. More...
 
class  IdealGasLaw
 Fluid density by ideal gas law. More...
 
class  LinearConcentrationAndPressureDependentDensity
 
class  LinearConcentrationDependentDensity
 
class  LinearTemperatureDependentDensity
 Linear temperature dependent density model. More...
 
class  LiquidDensity
 
class  WaterDensityIAPWSIF97Region1
 
class  FluidProperties
 Base class of fluid properties. More...
 
class  FluidPropertiesWithDensityDependentModels
 
class  PrimaryVariableDependentFluidProperties
 
class  FluidProperty
 Base class of fluid properties. More...
 
struct  DimensionLessGibbsFreeEnergyRegion1
 
class  LinearPressureDependentViscosity
 
class  TemperatureDependentViscosity
 
class  VogelsLiquidDynamicViscosity
 
struct  VogelsViscosityConstantsWater
 
struct  VogelsViscosityConstantsCO2
 
struct  VogelsViscosityConstantsCH4
 
class  WaterViscosityIAPWS
 A class for viscosity model that is defined by The International Association for the Properties of Water and Steam IAPWS More...
 
class  WaterVaporProperties
 

Enumerations

enum class  FluidPropertyType {
  Density = 0 , Viscosity = 1 , HeatCapacity = 2 , ThermalConductivity = 3 ,
  Concentration = 4 , number_of_property_types = 5
}
 Fluid property type. More...
 
enum class  PropertyVariableType {
  T = 0 , p = 1 , rho = p , C = 2 ,
  number_of_variables = 3
}
 Variable that determine the property. More...
 

Functions

static std::unique_ptr< FluidPropertycreateLiquidDensity (BaseLib::ConfigTree const &config)
 
static std::unique_ptr< FluidPropertycreateLinearTemperatureDependentDensity (BaseLib::ConfigTree const &config)
 
static std::unique_ptr< FluidPropertycreateLinearConcentrationDependentDensity (BaseLib::ConfigTree const &config)
 
static std::unique_ptr< FluidPropertycreateLinearConcentrationAndPressureDependentDensity (BaseLib::ConfigTree const &config)
 
std::unique_ptr< FluidPropertycreateFluidDensityModel (BaseLib::ConfigTree const &config)
 
std::unique_ptr< FluidPropertiescreateFluidProperties (BaseLib::ConfigTree const &config)
 
std::unique_ptr< FluidPropertycreateSpecificFluidHeatCapacityModel (BaseLib::ConfigTree const &config)
 
std::unique_ptr< FluidPropertycreateFluidThermalConductivityModel (BaseLib::ConfigTree const &config)
 
static std::unique_ptr< FluidPropertycreateLinearPressureDependentViscosity (BaseLib::ConfigTree const &config)
 
static std::unique_ptr< FluidPropertycreateTemperatureDependentViscosity (BaseLib::ConfigTree const &config)
 
std::unique_ptr< FluidPropertycreateViscosityModel (BaseLib::ConfigTree const &config)
 
static double computeBarMu0Factor (const double barT)
 
static std::array< double, 6 > computeSeriesFactorTForMu1 (const double barT)
 
static std::array< double, 7 > computeSeriesFactorRhoForMu1 (const double bar_rho)
 
static double computeBarMu1Factor (const std::array< double, 6 > &series_factorT, const std::array< double, 7 > &series_factorRho)
 
static double computedBarMu_dbarT (const double barT, double bar_rho)
 
static double computedBarMu_dbarRho (const double barT, double bar_rho)
 

Variables

const unsigned FluidPropertyTypeNumber
 
static const double ni [34]
 
static const double li [34]
 
static const double ji [34]
 
const unsigned PropertyVariableNumber
 
static const double Hi [4] = {1.67752, 2.20462, 0.6366564, -0.241605}
 
static const double Hij [6][7]
 
static const double temperature_0 = 373.15
 
static const double p_0 = 101325.0
 reference temperature in [K] More...
 
static const double h_wg = 2258000.0
 reference pressure More...
 

Enumeration Type Documentation

◆ FluidPropertyType

Fluid property type.

Enumerator
Density 
Viscosity 
HeatCapacity 
ThermalConductivity 
Concentration 
number_of_property_types 

Number of property types.

Definition at line 26 of file FluidProperties.h.

◆ PropertyVariableType

Variable that determine the property.

Enumerator

temperature.

pressure.

rho 

density. For some models, rho substitutes p

concentration.

number_of_variables 

Number of property variables.

Definition at line 20 of file PropertyVariableType.h.

21 {
22  T = 0,
23  p = 1,
24  rho = p,
25  C = 2,
27 };
@ rho
density. For some models, rho substitutes p
@ number_of_variables
Number of property variables.
static const double p

Function Documentation

◆ computeBarMu0Factor()

double MaterialLib::Fluid::computeBarMu0Factor ( const double  barT)
static

Definition at line 78 of file WaterViscosityIAPWS.cpp.

79 {
80  double sum_val = 0.;
81  double barT_i = 1.;
82  for (double value : Hi)
83  {
84  sum_val += (value / barT_i);
85  barT_i *= barT;
86  }
87  return sum_val;
88 }
static const double Hi[4]

References Hi.

Referenced by computedBarMu_dbarRho(), computedBarMu_dbarT(), and MaterialLib::Fluid::WaterViscosityIAPWS::getValue().

◆ computeBarMu1Factor()

double MaterialLib::Fluid::computeBarMu1Factor ( const std::array< double, 6 > &  series_factorT,
const std::array< double, 7 > &  series_factorRho 
)
static

Definition at line 115 of file WaterViscosityIAPWS.cpp.

117 {
118  double sum_val = 0.;
119  for (int i = 0; i < 6; i++)
120  {
121  double sum_val_j = 0;
122  for (int j = 0; j < 7; j++)
123  {
124  sum_val_j += Hij[i][j] * series_factorRho[j];
125  }
126  sum_val += series_factorT[i] * sum_val_j;
127  }
128 
129  return sum_val;
130 }
static const double Hij[6][7]

References Hij.

Referenced by computedBarMu_dbarRho(), computedBarMu_dbarT(), and MaterialLib::Fluid::WaterViscosityIAPWS::getValue().

◆ computedBarMu_dbarRho()

double MaterialLib::Fluid::computedBarMu_dbarRho ( const double  barT,
double  bar_rho 
)
static

Definition at line 173 of file WaterViscosityIAPWS.cpp.

174 {
175  const auto& series_factorT = computeSeriesFactorTForMu1(barT);
176  const auto& series_factorRho = computeSeriesFactorRhoForMu1(bar_rho);
177 
178  double dmu1_factor_dbar_rho = 0.0;
179  for (int i = 0; i < 6; i++)
180  {
181  double sum_val_j = 0;
182  for (int j = 1; j < 7; j++)
183  {
184  sum_val_j +=
185  static_cast<double>(j) * Hij[i][j] * series_factorRho[j - 1];
186  }
187  dmu1_factor_dbar_rho += series_factorT[i] * sum_val_j;
188  }
189 
190  const double mu0 = 100. * std::sqrt(barT) / computeBarMu0Factor(barT);
191 
192  const double mu1_factor =
193  computeBarMu1Factor(series_factorT, series_factorRho);
194  return mu0 * std::exp(bar_rho * mu1_factor) *
195  (mu1_factor + bar_rho * dmu1_factor_dbar_rho);
196 }
static double computeBarMu0Factor(const double barT)
static std::array< double, 7 > computeSeriesFactorRhoForMu1(const double bar_rho)
static double computeBarMu1Factor(const std::array< double, 6 > &series_factorT, const std::array< double, 7 > &series_factorRho)
static std::array< double, 6 > computeSeriesFactorTForMu1(const double barT)

References computeBarMu0Factor(), computeBarMu1Factor(), computeSeriesFactorRhoForMu1(), computeSeriesFactorTForMu1(), and Hij.

Referenced by MaterialLib::Fluid::WaterViscosityIAPWS::getdValue().

◆ computedBarMu_dbarT()

double MaterialLib::Fluid::computedBarMu_dbarT ( const double  barT,
double  bar_rho 
)
static

Definition at line 132 of file WaterViscosityIAPWS.cpp.

133 {
134  const double mu0_factor = computeBarMu0Factor(barT);
135  const double sqrt_barT = std::sqrt(barT);
136 
137  double dmu0_factor_dbarT = 0.0;
138  double barT_i = barT * barT;
139  for (int i = 1; i < 4; i++)
140  {
141  dmu0_factor_dbarT -= static_cast<double>(i) * (Hi[i] / barT_i);
142  barT_i *= barT;
143  }
144 
145  const double dbar_mu0_dbarT =
146  50. / (mu0_factor * sqrt_barT) -
147  100. * sqrt_barT * dmu0_factor_dbarT / (mu0_factor * mu0_factor);
148 
149  const auto& series_factorT = computeSeriesFactorTForMu1(barT);
150  const auto& series_factorRho = computeSeriesFactorRhoForMu1(bar_rho);
151 
152  double dmu1_factor_dbarT = 0.0;
153  for (int i = 1; i < 6; i++)
154  {
155  double sum_val_j = 0;
156  for (int j = 0; j < 7; j++)
157  {
158  sum_val_j += Hij[i][j] * series_factorRho[j];
159  }
160  dmu1_factor_dbarT -= static_cast<double>(i) * series_factorT[i - 1] *
161  sum_val_j / (barT * barT);
162  }
163 
164  const double mu1_factor =
165  computeBarMu1Factor(series_factorT, series_factorRho);
166  const double dbar_mu1_dbarT =
167  bar_rho * std::exp(bar_rho * mu1_factor) * dmu1_factor_dbarT;
168 
169  return dbar_mu0_dbarT * std::exp(bar_rho * mu1_factor) +
170  dbar_mu1_dbarT * 100. * sqrt_barT / mu0_factor;
171 }

References computeBarMu0Factor(), computeBarMu1Factor(), computeSeriesFactorRhoForMu1(), computeSeriesFactorTForMu1(), Hi, and Hij.

Referenced by MaterialLib::Fluid::WaterViscosityIAPWS::getdValue().

◆ computeSeriesFactorRhoForMu1()

std::array< double, 7 > MaterialLib::Fluid::computeSeriesFactorRhoForMu1 ( const double  bar_rho)
static

Definition at line 103 of file WaterViscosityIAPWS.cpp.

104 {
105  std::array<double, 7> series_factorRho;
106  series_factorRho[0] = 1.;
107  for (int i = 1; i < 7; i++)
108  {
109  series_factorRho[i] = series_factorRho[i - 1] * (bar_rho - 1.0);
110  }
111 
112  return series_factorRho;
113 }

Referenced by computedBarMu_dbarRho(), computedBarMu_dbarT(), and MaterialLib::Fluid::WaterViscosityIAPWS::getValue().

◆ computeSeriesFactorTForMu1()

std::array< double, 6 > MaterialLib::Fluid::computeSeriesFactorTForMu1 ( const double  barT)
static

Definition at line 90 of file WaterViscosityIAPWS.cpp.

91 {
92  std::array<double, 6> series_factorT;
93  series_factorT[0] = 1.;
94  const double barT_fac = 1 / barT - 1.0;
95  for (int i = 1; i < 6; i++)
96  {
97  series_factorT[i] = series_factorT[i - 1] * barT_fac;
98  }
99 
100  return series_factorT;
101 }

Referenced by computedBarMu_dbarRho(), computedBarMu_dbarT(), and MaterialLib::Fluid::WaterViscosityIAPWS::getValue().

◆ createFluidDensityModel()

std::unique_ptr< FluidProperty > MaterialLib::Fluid::createFluidDensityModel ( BaseLib::ConfigTree const &  config)

Create a density model

Parameters
configConfigTree object has a tag of <density>
Input File Parameter:
material__fluid__density__type
Input File Parameter:
material__fluid__density__type
Input File Parameter:
material__fluid__density__Constant__value
Input File Parameter:
material__fluid__density__type
Input File Parameter:
material__fluid__density__IdealGasLaw__molar_mass

Definition at line 125 of file CreateFluidDensityModel.cpp.

127 {
129  auto const type = config.peekConfigParameter<std::string>("type");
130 
131  if (type == "Constant")
132  {
134  config.checkConfigParameter("type", "Constant");
135  return std::make_unique<ConstantFluidProperty>(
137  config.getConfigParameter<double>("value"));
138  }
139  if (type == "LiquidDensity")
140  {
141  return createLiquidDensity(config);
142  }
143  if (type == "TemperatureDependent")
144  {
146  }
147  if (type == "ConcentrationDependent")
148  {
150  }
151  if (type == "ConcentrationAndPressureDependent")
152  {
154  }
155  if (type == "IdealGasLaw")
156  {
158  config.checkConfigParameter("type", "IdealGasLaw");
159  return std::make_unique<IdealGasLaw>(
161  config.getConfigParameter<double>("molar_mass"));
162  }
163  if (type == "WaterDensityIAPWSIF97Region1")
164  {
165  return std::make_unique<WaterDensityIAPWSIF97Region1>();
166  }
167 
168  OGS_FATAL(
169  "The density type {:s} is unavailable.\n"
170  "The available types are: \n\tConstant, \n\tLiquidDensity, "
171  "\n\tTemperatureDependent, \n\tIdealGasLaw."
172  "\n\tWaterDensityIAPWSIF97Region1\n",
173  type.data());
174 }
#define OGS_FATAL(...)
Definition: Error.h:26
static std::unique_ptr< FluidProperty > createLinearConcentrationAndPressureDependentDensity(BaseLib::ConfigTree const &config)
static std::unique_ptr< FluidProperty > createLiquidDensity(BaseLib::ConfigTree const &config)
static std::unique_ptr< FluidProperty > createLinearConcentrationDependentDensity(BaseLib::ConfigTree const &config)
static std::unique_ptr< FluidProperty > createLinearTemperatureDependentDensity(BaseLib::ConfigTree const &config)

References BaseLib::ConfigTree::checkConfigParameter(), createLinearConcentrationAndPressureDependentDensity(), createLinearConcentrationDependentDensity(), createLinearTemperatureDependentDensity(), createLiquidDensity(), BaseLib::ConfigTree::getConfigParameter(), OGS_FATAL, and BaseLib::ConfigTree::peekConfigParameter().

Referenced by createFluidProperties(), MaterialLib::TwoPhaseFlowWithPP::createTwoPhaseFlowMaterialProperties(), and ProcessLib::TwoPhaseFlowWithPrho::createTwoPhaseFlowPrhoMaterialProperties().

◆ createFluidProperties()

std::unique_ptr< FluidProperties > MaterialLib::Fluid::createFluidProperties ( BaseLib::ConfigTree const &  config)

Create an instance of class FluidProperties

Parameters
configConfigTree object has tags of <fluid>
Input File Parameter:
material__fluid__density
Input File Parameter:
material__fluid__viscosity
Input File Parameter:
material__fluid__specific_heat_capacity
Input File Parameter:
material__fluid__thermal_conductivity

Definition at line 29 of file CreateFluidProperties.cpp.

31 {
33  auto const& rho_conf = config.getConfigSubtree("density");
34  auto liquid_density = MaterialLib::Fluid::createFluidDensityModel(rho_conf);
35 
37  auto const& mu_conf = config.getConfigSubtree("viscosity");
39  const bool is_mu_density_dependent =
40  (viscosity->getName().find("density dependent") != std::string::npos);
41 
42  bool is_cp_density_dependent = false;
43  std::unique_ptr<MaterialLib::Fluid::FluidProperty> specific_heat_capacity =
44  nullptr;
45  auto heat_capacity__opt_conf =
47  config.getConfigSubtreeOptional("specific_heat_capacity");
48  if (heat_capacity__opt_conf)
49  {
50  const auto& heat_capacity_conf = *heat_capacity__opt_conf;
52  createSpecificFluidHeatCapacityModel(heat_capacity_conf);
53  is_cp_density_dependent =
54  (specific_heat_capacity->getName().find("density dependent") !=
55  std::string::npos);
56  }
57 
58  bool is_KT_density_dependent = false;
59  std::unique_ptr<MaterialLib::Fluid::FluidProperty> thermal_conductivity =
60  nullptr;
61  auto const& thermal_conductivity_opt_conf =
63  config.getConfigSubtreeOptional("thermal_conductivity");
64  if (thermal_conductivity_opt_conf)
65  {
66  auto const& thermal_conductivity_conf = *thermal_conductivity_opt_conf;
69  thermal_conductivity_conf);
70  is_KT_density_dependent =
71  (specific_heat_capacity->getName().find("density dependent") !=
72  std::string::npos);
73  }
74 
75  if (is_mu_density_dependent || is_cp_density_dependent ||
76  is_KT_density_dependent)
77  {
78  return std::make_unique<
80  std::move(liquid_density), std::move(viscosity),
81  std::move(specific_heat_capacity), std::move(thermal_conductivity),
82  is_mu_density_dependent, is_cp_density_dependent,
83  is_KT_density_dependent);
84  }
85 
86  return std::make_unique<
88  std::move(liquid_density), std::move(viscosity),
89  std::move(specific_heat_capacity), std::move(thermal_conductivity));
90 }
std::unique_ptr< FluidProperty > createFluidDensityModel(BaseLib::ConfigTree const &config)
std::unique_ptr< FluidProperty > createSpecificFluidHeatCapacityModel(BaseLib::ConfigTree const &config)
std::unique_ptr< FluidProperty > createFluidThermalConductivityModel(BaseLib::ConfigTree const &config)
std::unique_ptr< FluidProperty > createViscosityModel(BaseLib::ConfigTree const &config)

References createFluidDensityModel(), createFluidThermalConductivityModel(), createSpecificFluidHeatCapacityModel(), createViscosityModel(), BaseLib::ConfigTree::getConfigSubtree(), BaseLib::ConfigTree::getConfigSubtreeOptional(), MaterialPropertyLib::specific_heat_capacity, MaterialPropertyLib::thermal_conductivity, and MaterialPropertyLib::viscosity.

◆ createFluidThermalConductivityModel()

std::unique_ptr< FluidProperty > MaterialLib::Fluid::createFluidThermalConductivityModel ( BaseLib::ConfigTree const &  config)

Create a thermal conductivity model

Parameters
configConfigTree object has a tag of <thermal_conductivity>
Input File Parameter:
material__fluid__thermal_conductivity__type
Input File Parameter:
material__fluid__thermal_conductivity__Constant__value

Definition at line 24 of file CreateFluidThermalConductivityModel.cpp.

26 {
28  auto const type = config.getConfigParameter<std::string>("type");
29 
30  if (type == "Constant")
31  {
32  return std::make_unique<ConstantFluidProperty>(
34  config.getConfigParameter<double>("value"));
35  }
36  // TODO: add more models
37 
38  OGS_FATAL(
39  "The viscosity type {:s} is unavailable.\n"
40  "The available type is \n\tConstant\n",
41  type.data());
42 }

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

Referenced by createFluidProperties(), and ProcessLib::ThermalTwoPhaseFlowWithPP::createThermalTwoPhaseFlowWithPPMaterialProperties().

◆ createLinearConcentrationAndPressureDependentDensity()

static std::unique_ptr<FluidProperty> MaterialLib::Fluid::createLinearConcentrationAndPressureDependentDensity ( BaseLib::ConfigTree const &  config)
static
Input File Parameter:
material__fluid__density__type
Input File Parameter:
material__fluid__density__ConcentrationAndPressureDependent__reference_density
Input File Parameter:
material__fluid__density__ConcentrationAndPressureDependent__reference_concentration
Input File Parameter:
material__fluid__density__ConcentrationAndPressureDependent__fluid_density_concentration_difference_ratio
Input File Parameter:
material__fluid__density__ConcentrationAndPressureDependent__reference_pressure
Input File Parameter:
material__fluid__density__ConcentrationAndPressureDependent__fluid_density_pressure_difference_ratio

Definition at line 94 of file CreateFluidDensityModel.cpp.

96 {
98  config.checkConfigParameter("type", "ConcentrationAndPressureDependent");
99 
100  const auto reference_density =
102  config.getConfigParameter<double>("reference_density");
103  const auto reference_concentration =
105  config.getConfigParameter<double>("reference_concentration");
106  const auto fluid_density_concentration_difference_ratio =
108  config.getConfigParameter<double>(
109  "fluid_density_concentration_difference_ratio");
110  const auto reference_pressure =
112  config.getConfigParameter<double>("reference_pressure");
113  const auto fluid_density_pressure_difference_ratio =
115  config.getConfigParameter<double>(
116  "fluid_density_pressure_difference_ratio");
117  return std::make_unique<LinearConcentrationAndPressureDependentDensity>(
119  reference_concentration,
120  fluid_density_concentration_difference_ratio,
122  fluid_density_pressure_difference_ratio);
123 }

References BaseLib::ConfigTree::checkConfigParameter(), BaseLib::ConfigTree::getConfigParameter(), MaterialPropertyLib::reference_density, and MaterialPropertyLib::reference_pressure.

Referenced by createFluidDensityModel().

◆ createLinearConcentrationDependentDensity()

static std::unique_ptr<FluidProperty> MaterialLib::Fluid::createLinearConcentrationDependentDensity ( BaseLib::ConfigTree const &  config)
static
Input File Parameter:
material__fluid__density__type
Input File Parameter:
material__fluid__density__ConcentrationDependent__reference_density
Input File Parameter:
material__fluid__density__ConcentrationDependent__reference_concentration
Input File Parameter:
material__fluid__density__ConcentrationDependent__fluid_density_difference_ratio

Definition at line 73 of file CreateFluidDensityModel.cpp.

75 {
77  config.checkConfigParameter("type", "ConcentrationDependent");
78 
79  const auto reference_density =
81  config.getConfigParameter<double>("reference_density");
82  const auto reference_concentration =
84  config.getConfigParameter<double>("reference_concentration");
85  const auto fluid_density_difference_ratio =
87  config.getConfigParameter<double>("fluid_density_difference_ratio");
88  return std::make_unique<LinearConcentrationDependentDensity>(
90  reference_concentration,
91  fluid_density_difference_ratio);
92 }

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

Referenced by createFluidDensityModel().

◆ createLinearPressureDependentViscosity()

static std::unique_ptr<FluidProperty> MaterialLib::Fluid::createLinearPressureDependentViscosity ( BaseLib::ConfigTree const &  config)
static
Parameters
configConfigTree object which contains the input data including <type>LinearPressure</type> and it has a tag of <viscosity>
Input File Parameter:
material__fluid__viscosity__type
Input File Parameter:
material__fluid__viscosity__LinearPressure__mu0
Input File Parameter:
material__fluid__viscosity__LinearPressure__p0
Input File Parameter:
material__fluid__viscosity__LinearPressure__gamma

Definition at line 31 of file CreateViscosityModel.cpp.

33 {
35  config.checkConfigParameter("type", "LinearPressure");
36 
38  const auto mu0 = config.getConfigParameter<double>("mu0");
39 
41  const auto p0 = config.getConfigParameter<double>("p0");
42 
44  const auto gamma = config.getConfigParameter<double>("gamma");
45 
46  return std::make_unique<LinearPressureDependentViscosity>(mu0, p0, gamma);
47 }

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

Referenced by createViscosityModel().

◆ createLinearTemperatureDependentDensity()

static std::unique_ptr<FluidProperty> MaterialLib::Fluid::createLinearTemperatureDependentDensity ( BaseLib::ConfigTree const &  config)
static
Parameters
configConfigTree object which contains the input data <type>TemperatureDependent</type> and it has a tag of <density>
Input File Parameter:
material__fluid__density__type
Input File Parameter:
material__fluid__density__TemperatureDependent__rho0
Input File Parameter:
material__fluid__density__TemperatureDependent__temperature0
Input File Parameter:
material__fluid__density__TemperatureDependent__beta

Definition at line 58 of file CreateFluidDensityModel.cpp.

60 {
62  config.checkConfigParameter("type", "TemperatureDependent");
63 
65  const auto rho0 = config.getConfigParameter<double>("rho0");
67  const auto T0 = config.getConfigParameter<double>("temperature0");
69  const auto beta = config.getConfigParameter<double>("beta");
70  return std::make_unique<LinearTemperatureDependentDensity>(rho0, T0, beta);
71 }

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

Referenced by createFluidDensityModel().

◆ createLiquidDensity()

static std::unique_ptr<FluidProperty> MaterialLib::Fluid::createLiquidDensity ( BaseLib::ConfigTree const &  config)
static
Parameters
configConfigTree object which contains the input data including <type>LiquidDensity</type> and it has a tag of <density>
Input File Parameter:
material__fluid__density__type
Input File Parameter:
material__fluid__density__LiquidDensity__beta
Input File Parameter:
material__fluid__density__LiquidDensity__rho0
Input File Parameter:
material__fluid__density__LiquidDensity__temperature0
Input File Parameter:
material__fluid__density__LiquidDensity__p0
Input File Parameter:
material__fluid__density__LiquidDensity__bulk_modulus

Definition at line 34 of file CreateFluidDensityModel.cpp.

36 {
38  config.checkConfigParameter("type", "LiquidDensity");
39 
41  const auto beta = config.getConfigParameter<double>("beta");
43  const auto rho0 = config.getConfigParameter<double>("rho0");
45  const auto T0 = config.getConfigParameter<double>("temperature0");
47  const auto p0 = config.getConfigParameter<double>("p0");
49  const auto E = config.getConfigParameter<double>("bulk_modulus");
50  return std::make_unique<LiquidDensity>(beta, rho0, T0, p0, E);
51 }

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

Referenced by createFluidDensityModel().

◆ createSpecificFluidHeatCapacityModel()

std::unique_ptr< FluidProperty > MaterialLib::Fluid::createSpecificFluidHeatCapacityModel ( BaseLib::ConfigTree const &  config)

Create a specific heat capacity model

Parameters
configConfigTree object has a tag of <specific_heat_capacity>
Input File Parameter:
material__fluid__specific_heat_capacity__type
Input File Parameter:
material__fluid__specific_heat_capacity__Constant__value

Definition at line 24 of file CreateSpecificFluidHeatCapacityModel.cpp.

26 {
28  auto const type = config.getConfigParameter<std::string>("type");
29 
30  if (type == "Constant")
31  {
32  return std::make_unique<ConstantFluidProperty>(
34  config.getConfigParameter<double>("value"));
35  }
36  // TODO: add more models
37 
38  OGS_FATAL(
39  "The specific heat capacity type {:s} is unavailable.\n"
40  "The available type is \n\tConstant\n",
41  type.data());
42 }

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

Referenced by createFluidProperties(), and ProcessLib::ThermalTwoPhaseFlowWithPP::createThermalTwoPhaseFlowWithPPMaterialProperties().

◆ createTemperatureDependentViscosity()

static std::unique_ptr<FluidProperty> MaterialLib::Fluid::createTemperatureDependentViscosity ( BaseLib::ConfigTree const &  config)
static
Parameters
configConfigTree object which contains the input data <type>TemperatureDependent</type> and it has a tag of <viscosity>
Input File Parameter:
material__fluid__viscosity__type
Input File Parameter:
material__fluid__viscosity__TemperatureDependent__mu0
Input File Parameter:
material__fluid__viscosity__TemperatureDependent__tc
Input File Parameter:
material__fluid__viscosity__TemperatureDependent__tv

Definition at line 54 of file CreateViscosityModel.cpp.

56 {
58  config.checkConfigParameter("type", "TemperatureDependent");
59 
61  const auto mu0 = config.getConfigParameter<double>("mu0");
62 
64  const auto Tc = config.getConfigParameter<double>("tc");
65 
67  const auto Tv = config.getConfigParameter<double>("tv");
68 
69  return std::make_unique<TemperatureDependentViscosity>(mu0, Tc, Tv);
70 }

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

Referenced by createViscosityModel().

◆ createViscosityModel()

std::unique_ptr< FluidProperty > MaterialLib::Fluid::createViscosityModel ( BaseLib::ConfigTree const &  config)

Create a viscosity model

Parameters
configConfigTree object has a tag of <viscosity>
Input File Parameter:
material__fluid__viscosity__type
Input File Parameter:
material__fluid__viscosity__type
Input File Parameter:
material__fluid__viscosity__Constant__value
Input File Parameter:
material__fluid__viscosity__type
Input File Parameter:
material__fluid__viscosity__Vogels__liquid_type
Input File Parameter:
material__fluid__viscosity__Vogels__liquid_type
Input File Parameter:
material__fluid__viscosity__Vogels__liquid_type
Input File Parameter:
material__fluid__viscosity__Vogels__liquid_type
Input File Parameter:
material__fluid__viscosity__type

Definition at line 72 of file CreateViscosityModel.cpp.

74 {
76  auto const type = config.peekConfigParameter<std::string>("type");
77 
78  if (type == "Constant")
79  {
81  config.checkConfigParameter("type", "Constant");
82  return std::make_unique<ConstantFluidProperty>(
84  config.getConfigParameter<double>("value"));
85  }
86  if (type == "LinearPressure")
87  {
89  }
90  if (type == "TemperatureDependent")
91  {
93  }
94  if (type == "Vogels")
95  {
97  config.checkConfigParameter("type", "Vogels");
98 
99  INFO("Using Vogels model, which gives viscosity in SI unit, Pa s");
100  auto const fluid_type =
102  config.peekConfigParameter<std::string>("liquid_type");
103  if (fluid_type == "Water")
104  {
106  config.checkConfigParameter("liquid_type", "Water");
107 
108  const VogelsViscosityConstantsWater constants;
109  return std::make_unique<
110  VogelsLiquidDynamicViscosity<VogelsViscosityConstantsWater>>(
111  constants);
112  }
113  if (fluid_type == "CO2")
114  {
116  config.checkConfigParameter("liquid_type", "CO2");
117  const VogelsViscosityConstantsCO2 constants;
118  return std::make_unique<
119  VogelsLiquidDynamicViscosity<VogelsViscosityConstantsCO2>>(
120  constants);
121  }
122  if (fluid_type == "CH4")
123  {
125  config.checkConfigParameter("liquid_type", "CH4");
126  const VogelsViscosityConstantsCH4 constants;
127  return std::make_unique<
128  VogelsLiquidDynamicViscosity<VogelsViscosityConstantsCH4>>(
129  constants);
130  }
131 
132  OGS_FATAL(
133  "The fluid type {:s} for Vogels model is unavailable.\n"
134  "The available fluid types are Water, CO2 and CH4\n",
135  fluid_type.data());
136  }
137  if (type == "WaterViscosityIAPWS")
138  {
140  config.checkConfigParameter("type", "WaterViscosityIAPWS");
141  return std::make_unique<WaterViscosityIAPWS>();
142  }
143 
144  OGS_FATAL(
145  "The viscosity type {:s} is unavailable.\n"
146  "The available types are \n\tConstant, \n\tLinearPressure "
147  "\n\tTemperatureDependent, \n\tVogels\n",
148  type.data());
149 }
void INFO(char const *fmt, Args const &... args)
Definition: Logging.h:32
static std::unique_ptr< FluidProperty > createTemperatureDependentViscosity(BaseLib::ConfigTree const &config)
static std::unique_ptr< FluidProperty > createLinearPressureDependentViscosity(BaseLib::ConfigTree const &config)

References BaseLib::ConfigTree::checkConfigParameter(), createLinearPressureDependentViscosity(), createTemperatureDependentViscosity(), BaseLib::ConfigTree::getConfigParameter(), INFO(), OGS_FATAL, and BaseLib::ConfigTree::peekConfigParameter().

Referenced by createFluidProperties(), MaterialLib::TwoPhaseFlowWithPP::createTwoPhaseFlowMaterialProperties(), and ProcessLib::TwoPhaseFlowWithPrho::createTwoPhaseFlowPrhoMaterialProperties().

Variable Documentation

◆ FluidPropertyTypeNumber

const unsigned MaterialLib::Fluid::FluidPropertyTypeNumber
Initial value:
=
static_cast<unsigned>(FluidPropertyType::number_of_property_types)

Definition at line 36 of file FluidProperties.h.

◆ h_wg

◆ Hi

const double MaterialLib::Fluid::Hi[4] = {1.67752, 2.20462, 0.6366564, -0.241605}
static

Definition at line 22 of file WaterViscosityIAPWS.cpp.

Referenced by computeBarMu0Factor(), and computedBarMu_dbarT().

◆ Hij

const double MaterialLib::Fluid::Hij[6][7]
static
Initial value:
= {
{0.520094, 0.222531, -0.281378, 0.161913, -0.0325372, 0, 0},
{0.0850895, 0.999115, -0.906851, 0.257399, 0, 0, 0},
{-1.08374, 1.88797, -0.772479, 0, 0, 0, 0},
{-0.289555, 1.26613, -0.489837, 0, 0.0698452, 0, -0.00435673},
{0, 0, -0.25704, 0, 0, 0.00872102, 0},
{0, 0.120573, 0, 0, 0, 0, -0.000593264}}

Definition at line 23 of file WaterViscosityIAPWS.cpp.

Referenced by computeBarMu1Factor(), computedBarMu_dbarRho(), and computedBarMu_dbarT().

◆ ji

◆ li

◆ ni

const double MaterialLib::Fluid::ni[34]
static
Initial value:
= {
1.4632971213167E-01, -8.4548187169114E-01, -3.7563603672040E+00,
3.3855169168385E+00, -9.5791963387872E-01, 1.5772038513228E-01,
-1.6616417199501E-02, 8.1214629983568E-04, 2.8319080123804E-04,
-6.0706301565874E-04, -1.8990068218419E-02, -3.2529748770505E-02,
-2.1841717175414E-02, -5.2838357969930E-05, -4.7184321073267E-04,
-3.0001780793026E-04, 4.7661393906987E-05, -4.4141845330846E-06,
-7.2694996297594E-16, -3.1679644845054E-05, -2.8270797985312E-06,
-8.5205128120103E-10, -2.2425281908000E-06, -6.5171222895601E-07,
-1.4341729937924E-13, -4.0516996860117E-07, -1.2734301741641E-09,
-1.7424871230634E-10, -6.8762131295531E-19, 1.4478307828521E-20,
2.6335781662795E-23, -1.1947622640071E-23, 1.8228094581404E-24,
-9.35370872924580E-26}

Definition at line 23 of file DimensionLessGibbsFreeEnergyRegion1.cpp.

Referenced by MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1::get_dgamma_dpi(), MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1::get_dgamma_dpi_dpi(), MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1::get_dgamma_dtau(), MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1::get_dgamma_dtau_dpi(), MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1::get_dgamma_dtau_dtau(), and MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1::get_gamma().

◆ p_0

const double MaterialLib::Fluid::p_0 = 101325.0
static

◆ PropertyVariableNumber

const unsigned MaterialLib::Fluid::PropertyVariableNumber
Initial value:
=
static_cast<unsigned>(PropertyVariableType::number_of_variables)

Definition at line 29 of file PropertyVariableType.h.

◆ temperature_0

const double MaterialLib::Fluid::temperature_0 = 373.15
static