OGS 6.2.0-244-g47b8a9a9d
MaterialLib::Fluid Namespace Reference

Classes

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

Enumerations

enum  FluidPropertyType {
  FluidPropertyType::Density = 0, FluidPropertyType::Viscosity = 1, FluidPropertyType::HeatCapacity = 2, FluidPropertyType::ThermalConductivity = 3,
  FluidPropertyType::Concentration = 4, FluidPropertyType::number_of_property_types = 5
}
 Fluid property type. More...
 
enum  PropertyVariableType {
  PropertyVariableType::T = 0, PropertyVariableType::p = 1, PropertyVariableType::rho = p, PropertyVariableType::C = 2,
  PropertyVariableType::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

◆ 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 };
density. For some models, rho substitutes p
static const double p

Function Documentation

◆ computeBarMu0Factor()

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

Definition at line 78 of file WaterViscosityIAPWS.cpp.

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

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]

◆ 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.

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

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]

◆ computedBarMu_dbarRho()

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

Definition at line 173 of file WaterViscosityIAPWS.cpp.

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

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

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 std::array< double, 6 > computeSeriesFactorTForMu1(const double barT)
static const double Hij[6][7]
static std::array< double, 7 > computeSeriesFactorRhoForMu1(const double bar_rho)
static double computeBarMu0Factor(const double barT)
static double computeBarMu1Factor(const std::array< double, 6 > &series_factorT, const std::array< double, 7 > &series_factorRho)

◆ computedBarMu_dbarT()

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

Definition at line 132 of file WaterViscosityIAPWS.cpp.

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

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

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 }
static std::array< double, 6 > computeSeriesFactorTForMu1(const double barT)
static const double Hij[6][7]
static std::array< double, 7 > computeSeriesFactorRhoForMu1(const double bar_rho)
static double computeBarMu0Factor(const double barT)
static double computeBarMu1Factor(const std::array< double, 6 > &series_factorT, const std::array< double, 7 > &series_factorRho)
static const double Hi[4]

◆ computeSeriesFactorRhoForMu1()

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

Definition at line 103 of file WaterViscosityIAPWS.cpp.

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

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 }

◆ computeSeriesFactorTForMu1()

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

Definition at line 90 of file WaterViscosityIAPWS.cpp.

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

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 }

◆ 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 127 of file CreateFluidDensityModel.cpp.

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

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

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

◆ 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 31 of file CreateFluidProperties.cpp.

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

Referenced by ProcessLib::ComponentTransport::createComponentTransportProcess(), ProcessLib::LiquidFlow::createLiquidFlowMaterialProperties(), ProcessLib::RichardsComponentTransport::createRichardsComponentTransportProcess(), and ProcessLib::RichardsFlow::createRichardsFlowMaterialProperties().

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

◆ 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 26 of file CreateFluidThermalConductivityModel.cpp.

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

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

28 {
30  auto const type = config.getConfigParameter<std::string>("type");
31 
32  if (type == "Constant")
33  {
34  return std::make_unique<ConstantFluidProperty>(
36  config.getConfigParameter<double>("value"));
37  }
38  // TODO: add more models
39 
40  OGS_FATAL(
41  "The viscosity type %s is unavailable.\n"
42  "The available type is \n\tConstant\n",
43  type.data());
44 }
#define OGS_FATAL(fmt,...)
Definition: Error.h:63

◆ 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 96 of file CreateFluidDensityModel.cpp.

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

Referenced by createFluidDensityModel().

98 {
100  config.checkConfigParameter("type", "ConcentrationAndPressureDependent");
101 
102  const auto reference_density =
104  config.getConfigParameter<double>("reference_density");
105  const auto reference_concentration =
107  config.getConfigParameter<double>("reference_concentration");
108  const auto fluid_density_concentration_difference_ratio =
110  config.getConfigParameter<double>(
111  "fluid_density_concentration_difference_ratio");
112  const auto reference_pressure =
114  config.getConfigParameter<double>("reference_pressure");
115  const auto fluid_density_pressure_difference_ratio =
117  config.getConfigParameter<double>(
118  "fluid_density_pressure_difference_ratio");
119  return std::make_unique<LinearConcentrationAndPressureDependentDensity>(
121  reference_concentration,
122  fluid_density_concentration_difference_ratio,
124  fluid_density_pressure_difference_ratio);
125 }

◆ 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 75 of file CreateFluidDensityModel.cpp.

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

Referenced by createFluidDensityModel().

77 {
79  config.checkConfigParameter("type", "ConcentrationDependent");
80 
81  const auto reference_density =
83  config.getConfigParameter<double>("reference_density");
84  const auto reference_concentration =
86  config.getConfigParameter<double>("reference_concentration");
87  const auto fluid_density_difference_ratio =
89  config.getConfigParameter<double>("fluid_density_difference_ratio");
90  return std::make_unique<LinearConcentrationDependentDensity>(
92  reference_concentration,
93  fluid_density_difference_ratio);
94 }

◆ 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 33 of file CreateViscosityModel.cpp.

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

Referenced by createViscosityModel().

35 {
37  config.checkConfigParameter("type", "LinearPressure");
38 
40  const auto mu0 = config.getConfigParameter<double>("mu0");
41 
43  const auto p0 = config.getConfigParameter<double>("p0");
44 
46  const auto gamma = config.getConfigParameter<double>("gamma");
47 
48  return std::make_unique<LinearPressureDependentViscosity>(mu0, p0, gamma);
49 }

◆ 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 60 of file CreateFluidDensityModel.cpp.

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

Referenced by createFluidDensityModel().

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

◆ 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 36 of file CreateFluidDensityModel.cpp.

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

Referenced by createFluidDensityModel().

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

◆ 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 26 of file CreateSpecificFluidHeatCapacityModel.cpp.

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

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

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

◆ 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 56 of file CreateViscosityModel.cpp.

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

Referenced by createViscosityModel().

58 {
60  config.checkConfigParameter("type", "TemperatureDependent");
61 
63  const auto mu0 = config.getConfigParameter<double>("mu0");
64 
66  const auto Tc = config.getConfigParameter<double>("tc");
67 
69  const auto Tv = config.getConfigParameter<double>("tv");
70 
71  return std::make_unique<TemperatureDependentViscosity>(mu0, Tc, Tv);
72 }

◆ 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 74 of file CreateViscosityModel.cpp.

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

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

76 {
78  auto const type = config.peekConfigParameter<std::string>("type");
79 
80  if (type == "Constant")
81  {
83  config.checkConfigParameter("type", "Constant");
84  return std::make_unique<ConstantFluidProperty>(
86  config.getConfigParameter<double>("value"));
87  }
88  if (type == "LinearPressure")
89  {
91  }
92  if (type == "TemperatureDependent")
93  {
95  }
96  if (type == "Vogels")
97  {
99  config.checkConfigParameter("type", "Vogels");
100 
101  INFO("Using Vogels model, which gives viscosity in SI unit, Pa s");
102  auto const fluid_type =
104  config.peekConfigParameter<std::string>("liquid_type");
105  if (fluid_type == "Water")
106  {
108  config.checkConfigParameter("liquid_type", "Water");
109 
110  const VogelsViscosityConstantsWater constants;
111  return std::make_unique<
112  VogelsLiquidDynamicViscosity<VogelsViscosityConstantsWater>>(
113  constants);
114  }
115  if (fluid_type == "CO2")
116  {
118  config.checkConfigParameter("liquid_type", "CO2");
119  const VogelsViscosityConstantsCO2 constants;
120  return std::make_unique<
121  VogelsLiquidDynamicViscosity<VogelsViscosityConstantsCO2>>(
122  constants);
123  }
124  if (fluid_type == "CH4")
125  {
127  config.checkConfigParameter("liquid_type", "CH4");
128  const VogelsViscosityConstantsCH4 constants;
129  return std::make_unique<
130  VogelsLiquidDynamicViscosity<VogelsViscosityConstantsCH4>>(
131  constants);
132  }
133 
134  OGS_FATAL(
135  "The fluid type %s for Vogels model is unavailable.\n"
136  "The available fluid types are Water, CO2 and CH4\n",
137  fluid_type.data());
138  }
139  if (type == "WaterViscosityIAPWS")
140  {
142  config.checkConfigParameter("type", "WaterViscosityIAPWS");
143  return std::make_unique<WaterViscosityIAPWS>();
144  }
145 
146  OGS_FATAL(
147  "The viscosity type %s is unavailable.\n"
148  "The available types are \n\tConstant, \n\tLinearPressure "
149  "\n\tTemperatureDependent, \n\tVogels\n",
150  type.data());
151 }
static std::unique_ptr< FluidProperty > createTemperatureDependentViscosity(BaseLib::ConfigTree const &config)
static std::unique_ptr< FluidProperty > createLinearPressureDependentViscosity(BaseLib::ConfigTree const &config)
#define OGS_FATAL(fmt,...)
Definition: Error.h:63

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

const double MaterialLib::Fluid::h_wg = 2258000.0
static

reference pressure

Definition at line 27 of file WaterVaporProperties.cpp.

◆ Hi

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

Definition at line 22 of file WaterViscosityIAPWS.cpp.

◆ 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.

◆ ji

const double MaterialLib::Fluid::ji[34]
static
Initial value:
= {
-2, -1, 0, 1, 2, 3, 4, 5, -9, -7, -1, 0, 1, 3, -3, 0, 1,
3, 17, -4, 0, 6, -5, -2, 10, -8, -11, -6, -29, -31, -38, -39, -40, -41}

Definition at line 41 of file DimensionLessGibbsFreeEnergyRegion1.cpp.

◆ li

const double MaterialLib::Fluid::li[34]
static
Initial value:
= {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4,
4, 5, 8, 8, 21, 23, 29, 30, 31, 32}

Definition at line 37 of file DimensionLessGibbsFreeEnergyRegion1.cpp.

◆ 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.

◆ p_0

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

reference temperature in [K]

Definition at line 26 of file WaterVaporProperties.cpp.

◆ 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

Definition at line 25 of file WaterVaporProperties.cpp.