www.mooseframework.org
RichardsSeffRSC.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 // Rogers-Stallybrass-Clements version of effective saturation as a function of CAPILLARY pressure,
11 // and derivs wrt that capillary pressure.
12 // valid for residual saturations = 0, and viscosityOil = 2*viscosityWater. (the "2" is important
13 // here!).
14 // C Rogers, MP Stallybrass and DL Clements "On two phase filtration under gravity and with boundary
15 // infiltration: application of a Backlund transformation" Nonlinear Analysis Theory Methods and
16 // Applications 7 (1983) 785--799.
17 //
18 #include "RichardsSeffRSC.h"
19 
20 Real
21 RichardsSeffRSC::seff(Real pc, Real shift, Real scale)
22 {
23  Real x = (pc - shift) / scale;
24  Real ex = std::exp(x);
25  return std::pow(1 + ex, -0.5);
26 }
27 
28 Real
29 RichardsSeffRSC::dseff(Real pc, Real shift, Real scale)
30 {
31  Real x = (pc - shift) / scale;
32  Real ex = std::exp(x);
33  return -0.5 * ex * std::pow(1 + ex, -1.5) / scale;
34 }
35 
36 Real
37 RichardsSeffRSC::d2seff(Real pc, Real shift, Real scale)
38 {
39  Real x = (pc - shift) / scale;
40  Real ex = std::exp(x);
41  return (0.75 * ex * ex * std::pow(1 + ex, -2.5) - 0.5 * ex * std::pow(1 + ex, -1.5)) / scale /
42  scale;
43 }
static Real d2seff(Real pc, Real shift, Real scale)
2nd derivative of effective saturation wrt capillary pressure
void scale(MeshBase &mesh, const Real xs, const Real ys=0., const Real zs=0.)
const std::vector< double > x
static Real seff(Real pc, Real shift, Real scale)
effective saturation as a function of capillary pressure
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static Real dseff(Real pc, Real shift, Real scale)
derivative of effective saturation wrt capillary pressure
MooseUnits pow(const MooseUnits &, int)