OGS
WaterViscosityIAPWS.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
7
9{
10class Phase;
11
27class WaterViscosityIAPWS final : public Property
28{
29public:
30 explicit WaterViscosityIAPWS(std::string name) { name_ = std::move(name); }
31 void checkScale() const override
32 {
33 if (!std::holds_alternative<Phase*>(scale_))
34 {
36 "The property 'WaterViscosityIAPWS' is "
37 "implemented on the 'Phase' scale only.");
38 }
39 }
40
42 PropertyDataType value(VariableArray const& variable_array,
44 double const t, double const dt) const override;
47 PropertyDataType dValue(VariableArray const& variable_array,
48 Variable const variable,
50 double const t, double const dt) const override;
51
52private:
53 static constexpr double ref_T_ = 647.096;
54 static constexpr double ref_rho_ =
55 322.0;
56 static constexpr double ref_mu_ = 1.0e-6;
57
58 // Coefficients Hi and Hij are given in two static arrays in the cpp file.
59};
60} // namespace MaterialPropertyLib
#define OGS_FATAL(...)
Definition Error.h:19
virtual PropertyDataType value() const
std::variant< Medium *, Phase *, Component * > scale_
static constexpr double ref_mu_
reference viscosity in Pa.s
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
static constexpr double ref_T_
reference temperature in K
static constexpr double ref_rho_
reference density in kg/m^3
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