www.mooseframework.org
RichardsSeff1VG.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 // van-Genuchten effective saturation as a function of single pressure, and its derivs wrt to that
11 // pressure
12 //
13 #include "RichardsSeff1VG.h"
14 
15 registerMooseObject("RichardsApp", RichardsSeff1VG);
16 
17 template <>
18 InputParameters
20 {
21  InputParameters params = validParams<RichardsSeff>();
22  params.addRequiredRangeCheckedParam<Real>("al",
23  "al > 0",
24  "van-Genuchten alpha parameter. Must "
25  "be positive. Single-phase VG seff = "
26  "(1 + (-al*c)^(1/(1-m)))^(-m)");
27  params.addRequiredRangeCheckedParam<Real>(
28  "m",
29  "m > 0 & m < 1",
30  "van-Genuchten m parameter. Must be between 0 and 1, and optimally "
31  "should be set to >0.5 Single-phase VG seff = (1 + "
32  "(-al*p)^(1/(1-m)))^(-m)");
33  params.addClassDescription("van-Genuchten effective saturation as a function of pressure "
34  "suitable for use in single-phase simulations.. seff = (1 + "
35  "(-al*p)^(1/(1-m)))^(-m)");
36  return params;
37 }
38 
39 RichardsSeff1VG::RichardsSeff1VG(const InputParameters & parameters)
40  : RichardsSeff(parameters), _al(getParam<Real>("al")), _m(getParam<Real>("m"))
41 {
42 }
43 
44 Real
45 RichardsSeff1VG::seff(std::vector<const VariableValue *> p, unsigned int qp) const
46 {
47  return RichardsSeffVG::seff((*p[0])[qp], _al, _m);
48 }
49 
50 void
51 RichardsSeff1VG::dseff(std::vector<const VariableValue *> p,
52  unsigned int qp,
53  std::vector<Real> & result) const
54 {
55  result[0] = RichardsSeffVG::dseff((*p[0])[qp], _al, _m);
56 }
57 
58 void
59 RichardsSeff1VG::d2seff(std::vector<const VariableValue *> p,
60  unsigned int qp,
61  std::vector<std::vector<Real>> & result) const
62 {
63  result[0][0] = RichardsSeffVG::d2seff((*p[0])[qp], _al, _m);
64 }
RichardsSeff1VG::_al
Real _al
van Genuchten alpha parameter
Definition: RichardsSeff1VG.h:62
RichardsSeff1VG::_m
Real _m
van Genuchten m parameter
Definition: RichardsSeff1VG.h:65
RichardsSeff1VG::d2seff
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
Definition: RichardsSeff1VG.C:59
registerMooseObject
registerMooseObject("RichardsApp", RichardsSeff1VG)
RichardsSeff1VG.h
RichardsSeff
Base class for effective saturation as a function of porepressure(s) The functions seff,...
Definition: RichardsSeff.h:23
RichardsSeffVG::dseff
static Real dseff(Real p, Real al, Real m)
derivative of effective saturation wrt porepressure
Definition: RichardsSeffVG.C:30
RichardsSeff1VG::dseff
void dseff(std::vector< const VariableValue * > p, unsigned int qp, std::vector< Real > &result) const
derivative of effective saturation as a function of porepressure
Definition: RichardsSeff1VG.C:51
RichardsSeff1VG
Effective saturation as a function of porepressure using the van Genuchten formula.
Definition: RichardsSeff1VG.h:26
validParams< RichardsSeff1VG >
InputParameters validParams< RichardsSeff1VG >()
Definition: RichardsSeff1VG.C:19
RichardsSeffVG::d2seff
static Real d2seff(Real p, Real al, Real m)
2nd derivative of effective saturation wrt porepressure
Definition: RichardsSeffVG.C:45
RichardsSeff1VG::seff
Real seff(std::vector< const VariableValue * > p, unsigned int qp) const
effective saturation as a function of porepressure
Definition: RichardsSeff1VG.C:45
validParams< RichardsSeff >
InputParameters validParams< RichardsSeff >()
Definition: RichardsSeff.C:16
RichardsSeff1VG::RichardsSeff1VG
RichardsSeff1VG(const InputParameters &parameters)
Definition: RichardsSeff1VG.C:39
RichardsSeffVG::seff
static Real seff(Real p, Real al, Real m)
effective saturation as a fcn of porepressure
Definition: RichardsSeffVG.C:15