OGS
RelativePermeabilityCurve.h
Go to the documentation of this file.
1
13#pragma once
14
15#include <algorithm>
16#include <memory>
17
20
21namespace MaterialLib
22{
23namespace PorousMedium
24{
26{
27public:
29 std::unique_ptr<MathLib::PiecewiseLinearInterpolation>&& curve_data)
30 : RelativePermeability(curve_data->getSupportMin(),
31 curve_data->getSupportMax()),
32 _curve_data(std::move(curve_data))
33 {
34 }
35
37 std::string getName() const override
38 {
39 return "Relative permeability curve.";
40 }
41
43 double getValue(const double saturation) const override
44 {
45 const double S = std::clamp(saturation, _saturation_r + _minor_offset,
47
48 return _curve_data->getValue(S);
49 }
50
53 double getdValue(const double saturation) const override
54 {
55 const double S = std::clamp(saturation, _saturation_r + _minor_offset,
57
58 return _curve_data->getDerivative(S);
59 }
60
61private:
62 std::unique_ptr<MathLib::PiecewiseLinearInterpolation> _curve_data;
63};
64} // namespace PorousMedium
65} // namespace MaterialLib
Definition of the PiecewiseLinearInterpolation class.
double getdValue(const double saturation) const override
std::string getName() const override
Get model name.
std::unique_ptr< MathLib::PiecewiseLinearInterpolation > _curve_data
RelativePermeabilityCurve(std::unique_ptr< MathLib::PiecewiseLinearInterpolation > &&curve_data)
double getValue(const double saturation) const override
Get relative permeability value.
Base class of relative permeability models.