OGS
SaturationBrooksCorey.h
Go to the documentation of this file.
1
13#pragma once
14
15#include <limits>
16
18
19namespace MaterialPropertyLib
20{
21class Medium;
22class Phase;
23class Component;
30class SaturationBrooksCorey final : public Property
31{
32private:
35 const double exponent_;
36 const double entry_pressure_;
37
38public:
39 SaturationBrooksCorey(std::string name,
40 const double residual_liquid_saturation,
41 const double residual_gas_saturation,
42 const double exponent,
43 const double entry_pressure);
44
45 void checkScale() const override
46 {
47 if (!std::holds_alternative<Medium*>(scale_))
48 {
50 "The property 'SaturationBrooksCorey' is implemented on the "
51 "'media' scale only.");
52 }
53 }
54
57 PropertyDataType value(VariableArray const& variable_array,
58 ParameterLib::SpatialPosition const& /*pos*/,
59 double const /*t*/,
60 double const /*dt*/) const override;
61 PropertyDataType dValue(VariableArray const& variable_array,
62 Variable const variable,
63 ParameterLib::SpatialPosition const& /*pos*/,
64 double const /*t*/,
65 double const /*dt*/) const override;
66 PropertyDataType d2Value(VariableArray const& variable_array,
67 Variable const variable1, Variable const variable2,
68 ParameterLib::SpatialPosition const& /*pos*/,
69 double const /*t*/,
70 double const /*dt*/) const override;
71};
72} // namespace MaterialPropertyLib
#define OGS_FATAL(...)
Definition Error.h:26
virtual PropertyDataType value() const
Definition Property.cpp:76
std::variant< Medium *, Phase *, Component * > scale_
Definition Property.h:297
A well known soil characteristics function.
SaturationBrooksCorey(std::string name, const double residual_liquid_saturation, const double residual_gas_saturation, const double exponent, const double entry_pressure)
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &, double const, double const) const override
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.
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