https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PorousFlowBrooksCorey.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12#include "MooseTypes.h"
13
28{
37Real effectiveSaturation(Real pc, Real pe, Real lambda);
38
46Real dEffectiveSaturation(Real pc, Real pe, Real lambda);
47
55Real d2EffectiveSaturation(Real pc, Real pe, Real lambda);
56
66Real capillaryPressure(Real seff, Real pe, Real lambda, Real pc_max);
67
77Real dCapillaryPressure(Real seff, Real pe, Real lambda, Real pc_max);
78
88Real d2CapillaryPressure(Real seff, Real pe, Real lambda, Real pc_max);
89
96template <typename T>
97T
98relativePermeabilityW(const T & seff, Real lambda)
99{
100 if (MetaPhysicL::raw_value(seff) <= 0.0)
101 return 0.0;
102 else if (MetaPhysicL::raw_value(seff) >= 1.0)
103 return 1.0;
104
105 using std::pow;
106 return pow(seff, (2.0 + 3.0 * lambda) / lambda);
107}
108
115Real dRelativePermeabilityW(Real seff, Real lambda);
116
123template <typename T>
124T
125relativePermeabilityNW(const T & seff, Real lambda)
126{
127 if (MetaPhysicL::raw_value(seff) <= 0.0)
128 return 0.0;
129 else if (MetaPhysicL::raw_value(seff) >= 1.0)
130 return 1.0;
131
132 using std::pow;
133 return seff * seff * (1.0 - pow(1.0 - seff, (2.0 + lambda) / lambda));
134}
135
142Real dRelativePermeabilityNW(Real seff, Real lambda);
143}
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const double T
auto raw_value(const Eigen::Map< T > &in)
Brooks-Corey effective saturation, capillary pressure and relative permeability functions.
Real dRelativePermeabilityNW(Real seff, Real lambda)
Derivative of relative permeability of the non-wetting phase wrt to effective saturation.
T relativePermeabilityW(const T &seff, Real lambda)
Relative permeability of the wetting phase as a function of effective saturation.
Real capillaryPressure(Real seff, Real pe, Real lambda, Real pc_max)
Capillary pressure as a function of effective saturation.
Real d2EffectiveSaturation(Real pc, Real pe, Real lambda)
Second derivative of effective saturation wrt porepressure.
Real dCapillaryPressure(Real seff, Real pe, Real lambda, Real pc_max)
Derivative of capillary pressure wrt effective saturation.
Real dRelativePermeabilityW(Real seff, Real lambda)
Derivative of relative permeability of the wetting phase wrt to effective saturation.
Real dEffectiveSaturation(Real pc, Real pe, Real lambda)
Derivative of effective saturation wrt porepressure.
Real d2CapillaryPressure(Real seff, Real pe, Real lambda, Real pc_max)
Second derivative of capillary pressure wrt effective saturation.
Real effectiveSaturation(Real pc, Real pe, Real lambda)
Effective saturation as a function of capillary pressure Note: seff = 1 for p >= 0.
T relativePermeabilityNW(const T &seff, Real lambda)
Relative permeability of the non-wetting phase as a function of effective saturation.