https://mooseframework.inl.gov
RichardsSeff2gasVG.C
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 // van-Genuchten gas effective saturation as a function of (Pwater, Pgas), and its derivs wrt to
11 // that pressure
12 //
13 #include "RichardsSeff2gasVG.h"
14 
16 
19 {
22  "al > 0",
23  "van-Genuchten alpha parameter. Must "
24  "be positive. Single-phase VG seff = "
25  "(1 + (-al*c)^(1/(1-m)))^(-m)");
27  "m",
28  "m > 0 & m < 1",
29  "van-Genuchten m parameter. Must be between 0 and 1, and optimally "
30  "should be set to >0.5 Single-phase VG seff = (1 + "
31  "(-al*p)^(1/(1-m)))^(-m)");
32  params.addClassDescription("van-Genuchten effective saturation as a function of (Pwater, Pgas) "
33  "suitable for use for the gas phase in two-phase simulations. With "
34  "Pc=Pgas-Pwater, seff = 1 - (1 + (al*pc)^(1/(1-m)))^(-m)");
35  return params;
36 }
37 
39  : RichardsSeff(parameters), _al(getParam<Real>("al")), _m(getParam<Real>("m"))
40 {
41 }
42 
43 Real
44 RichardsSeff2gasVG::seff(std::vector<const VariableValue *> p, unsigned int qp) const
45 {
46  Real negpc = (*p[0])[qp] - (*p[1])[qp];
47  return 1 - RichardsSeffVG::seff(negpc, _al, _m);
48 }
49 
50 void
51 RichardsSeff2gasVG::dseff(std::vector<const VariableValue *> p,
52  unsigned int qp,
53  std::vector<Real> & result) const
54 {
55  Real negpc = (*p[0])[qp] - (*p[1])[qp];
56  result[0] = -RichardsSeffVG::dseff(negpc, _al, _m);
57  result[1] = -result[0];
58 }
59 
60 void
61 RichardsSeff2gasVG::d2seff(std::vector<const VariableValue *> p,
62  unsigned int qp,
63  std::vector<std::vector<Real>> & result) const
64 {
65  Real negpc = (*p[0])[qp] - (*p[1])[qp];
66  result[0][0] = -RichardsSeffVG::d2seff(negpc, _al, _m);
67  result[0][1] = -result[0][0];
68  result[1][0] = -result[0][0];
69  result[1][1] = result[0][0];
70 }
void addRequiredRangeCheckedParam(const std::string &name, const std::string &parsed_function, const std::string &doc_string)
registerMooseObject("RichardsApp", RichardsSeff2gasVG)
Real _m
van Genuchten m parameter
Base class for effective saturation as a function of porepressure(s) The functions seff...
Definition: RichardsSeff.h:18
static InputParameters validParams()
Definition: RichardsSeff.C:15
static Real dseff(Real p, Real al, Real m)
derivative of effective saturation wrt porepressure
RichardsSeff2gasVG(const InputParameters &parameters)
static Real seff(Real p, Real al, Real m)
effective saturation as a fcn of porepressure
static InputParameters validParams()
van-Genuchten gas effective saturation as a function of (Pwater, Pgas), and its derivs wrt to those p...
void dseff(std::vector< const VariableValue *> p, unsigned int qp, std::vector< Real > &result) const
derivative of effective saturation as a function of porepressure
static Real d2seff(Real p, Real al, Real m)
2nd derivative of effective saturation wrt porepressure
Real _al
van Genuchten alpha parameter
void d2seff(std::vector< const VariableValue *> p, unsigned int qp, std::vector< std::vector< Real >> &result) const
second derivative of effective saturation as a function of porepressure
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real seff(std::vector< const VariableValue *> p, unsigned int qp) const
gas effective saturation
void addClassDescription(const std::string &doc_string)