OGS
IdealGasLawBinaryMixture.cpp
Go to the documentation of this file.
1
15
17
18namespace MaterialPropertyLib
19{
24
26 VariableArray const& variable_array,
27 ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/,
28 double const /*dt*/) const
29{
31 const double pGR = variable_array.gas_phase_pressure;
32 const double T = variable_array.temperature;
33 const double MG = variable_array.molar_mass;
34
35 return pGR * MG / R / T;
36}
37
39 VariableArray const& variable_array, Variable const variable,
40 ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/,
41 double const /*dt*/) const
42{
44 const double pGR = variable_array.gas_phase_pressure;
45 const double T = variable_array.temperature;
46 const double MG = variable_array.molar_mass;
47 const double dMG_dx = variable_array.molar_mass_derivative;
48
49 switch (variable)
50 {
52 return MG / R / T + pGR / R / T * dMG_dx;
54 return pGR / R / T * dMG_dx;
56 return pGR / R / T / T * (T * dMG_dx - MG);
57 default:
59 "IdealGasLawBinaryMixture::dValue is implemented only for "
60 "derivatives "
61 "w.r.t. gas_pressure, capillary_pressure, and temperature.");
62 break;
63 }
64 return 0.;
65}
66
68 VariableArray const& /*variable_array*/, Variable const /*variable1*/,
69 Variable const /*variable2*/, ParameterLib::SpatialPosition const& /*pos*/,
70 double const /*t*/, double const /*dt*/) const
71{
72 OGS_FATAL("IdealGasLawBinaryMixture::d2Value is not implemented.");
73
74 return 0.;
75}
76
77} // namespace MaterialPropertyLib
#define OGS_FATAL(...)
Definition Error.h:26
PropertyDataType d2Value(VariableArray const &variable_array, Variable const variable1, Variable const variable2, ParameterLib::SpatialPosition const &, double const, double const) const override
Default implementation: 2nd derivative of any constant property is zero.
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &, double const, double const) const override
virtual PropertyDataType value() const
Definition Property.cpp:76
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 > PropertyDataType
Definition Property.h:31