www.mooseframework.org
PorousFlowCapillaryPressure.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #ifndef POROUSFLOWCAPILLARYPRESSURE_H
9 #define POROUSFLOWCAPILLARYPRESSURE_H
10 
11 #include "GeneralUserObject.h"
12 
14 
15 template <>
17 
33 class PorousFlowCapillaryPressure : public GeneralUserObject
34 {
35 public:
36  PorousFlowCapillaryPressure(const InputParameters & parameters);
37 
38  virtual void initialize() final{};
39  virtual void execute() final{};
40  virtual void finalize() final{};
41  virtual void initialSetup() override;
42 
49  virtual Real capillaryPressure(Real saturation) const;
50 
56  virtual Real dCapillaryPressure(Real saturation) const;
57 
63  virtual Real d2CapillaryPressure(Real saturation) const;
64 
70  virtual Real effectiveSaturation(Real pc) const = 0;
71 
77  virtual Real dEffectiveSaturation(Real pc) const = 0;
78 
84  virtual Real d2EffectiveSaturation(Real pc) const = 0;
85 
86 protected:
95  Real effectiveSaturationFromSaturation(Real saturation) const;
96 
103  Real extensionSaturation() const;
104 
112  Real interceptFunction(Real s) const;
113 
121  Real interceptFunctionDeriv(Real s) const;
122 
129  Real capillaryPressureLogExt(Real s) const;
130 
137  Real dCapillaryPressureLogExt(Real s) const;
138 
145  Real d2CapillaryPressureLogExt(Real s) const;
146 
152  virtual Real capillaryPressureCurve(Real saturation) const = 0;
153 
159  virtual Real dCapillaryPressureCurve(Real saturation) const = 0;
160 
166  virtual Real d2CapillaryPressureCurve(Real saturation) const = 0;
167 
169  const Real _sat_lr;
171  const Real _dseff_ds;
173  bool _log_ext;
175  const Real _pc_max;
177  Real _sat_ext;
179  Real _pc_ext;
183  const Real _log10;
184 };
185 
186 #endif // POROUSFLOWCAPILLARYPRESSURE_H
InputParameters validParams< PorousFlowCapillaryPressure >()
Real d2CapillaryPressureLogExt(Real s) const
The second derivative of capillary pressure in the logarithmic extension.
virtual Real dCapillaryPressureCurve(Real saturation) const =0
Derivative of raw capillary pressure wrt true saturation.
virtual Real effectiveSaturation(Real pc) const =0
Effective saturation as a function of capillary pressure.
Base class for capillary pressure for multiphase flow in porous media.
virtual Real dCapillaryPressure(Real saturation) const
Derivative of capillary pressure wrt true saturation.
Real _slope_ext
Gradient of the logarithmic extension.
Real extensionSaturation() const
Calculates the saturation where the logarithmic extension to capillary pressure meets the raw curve u...
virtual Real d2CapillaryPressure(Real saturation) const
Second derivative of capillary pressure wrt true saturation.
const Real _pc_max
Maximum capillary pressure (Pa). Note: must be <= 0.
virtual Real capillaryPressure(Real saturation) const
Capillary pressure is calculated as a function of true saturation.
Real capillaryPressureLogExt(Real s) const
The capillary pressure in the logarithmic extension.
virtual Real dEffectiveSaturation(Real pc) const =0
Derivative of effective saturation wrt capillary pressure.
Real effectiveSaturationFromSaturation(Real saturation) const
Effective saturation of liquid phase given liquid saturation and residual liquid saturation.
PorousFlowCapillaryPressure(const InputParameters &parameters)
virtual Real d2CapillaryPressureCurve(Real saturation) const =0
Second derivative of raw capillary pressure wrt true saturation.
Real _pc_ext
Capillary pressure where the extension meets the raw curve.
Real interceptFunction(Real s) const
Calculates the saturation where the logarithmic extension to capillary pressure at low saturation...
Real _sat_ext
Saturation where the logarithmic extension meets the raw curve.
const Real _sat_lr
Liquid residual saturation.
Real interceptFunctionDeriv(Real s) const
Calculates the saturation where the logarithmic extension to capillary pressure at low saturation...
bool _log_ext
Flag to use a logarithmic extension for low saturation.
virtual Real capillaryPressureCurve(Real saturation) const =0
Raw capillary pressure curve (does not include logarithmic extension)
const Real _dseff_ds
Derivative of effective saturation with respect to saturation.
void FORTRAN_CALL() saturation(double &P, double &T, int &N, int &nerr)
virtual Real d2EffectiveSaturation(Real pc) const =0
Second derivative of effective saturation wrt capillary pressure.
Real dCapillaryPressureLogExt(Real s) const
The derivative of capillary pressure in the logarithmic extension.