29 double const dt)
const
31 auto phase = std::get<Phase*>(
scale_);
32 auto const numberOfComponents = phase->numberOfComponents();
33 if (numberOfComponents < 1)
39 else if (numberOfComponents > 2)
42 "AverageMolarMass::value only allows for phases consisting of up "
43 "to two components.");
62 for (
size_t c = 0;
c < numberOfComponents;
c++)
70 M += xn_zeta * M_zeta;
79 double const dt)
const
85 "AverageMolarMass::dValue is implemented for derivatives with "
86 "respect to phase_pressure or temperature only.");
89 auto phase = std::get<Phase*>(
scale_);
91 auto const numberOfComponents = phase->numberOfComponents();
92 if (numberOfComponents <= 1)
96 else if (numberOfComponents > 2)
99 "AverageMolarMass::dValue is currently implemented two or less "
100 "phase components only.");
108 variable_array, variable, pos, t, dt)[0];
110 auto const M_0 = phase->component(0)
113 auto const M_1 = phase->component(1)
117 return dxnC * (M_0 - M_1);
PropertyDataType d2Value(VariableArray const &variable_array, Variable const variable1, Variable const variable2, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
Default implementation: 2nd derivative of any constant property is zero.
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