Line data Source code
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 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 : InputParameters 18 427 : RichardsSeff1VG::validParams() 19 : { 20 427 : InputParameters params = RichardsSeff::validParams(); 21 854 : params.addRequiredRangeCheckedParam<Real>("al", 22 : "al > 0", 23 : "van-Genuchten alpha parameter. Must " 24 : "be positive. Single-phase VG seff = " 25 : "(1 + (-al*c)^(1/(1-m)))^(-m)"); 26 854 : params.addRequiredRangeCheckedParam<Real>( 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 427 : params.addClassDescription("van-Genuchten effective saturation as a function of pressure " 33 : "suitable for use in single-phase simulations.. seff = (1 + " 34 : "(-al*p)^(1/(1-m)))^(-m)"); 35 427 : return params; 36 0 : } 37 : 38 210 : RichardsSeff1VG::RichardsSeff1VG(const InputParameters & parameters) 39 630 : : RichardsSeff(parameters), _al(getParam<Real>("al")), _m(getParam<Real>("m")) 40 : { 41 210 : } 42 : 43 : Real 44 22598702 : RichardsSeff1VG::seff(std::vector<const VariableValue *> p, unsigned int qp) const 45 : { 46 22598702 : return RichardsSeffVG::seff((*p[0])[qp], _al, _m); 47 : } 48 : 49 : void 50 7627104 : RichardsSeff1VG::dseff(std::vector<const VariableValue *> p, 51 : unsigned int qp, 52 : std::vector<Real> & result) const 53 : { 54 7627104 : result[0] = RichardsSeffVG::dseff((*p[0])[qp], _al, _m); 55 7627104 : } 56 : 57 : void 58 4321482 : RichardsSeff1VG::d2seff(std::vector<const VariableValue *> p, 59 : unsigned int qp, 60 : std::vector<std::vector<Real>> & result) const 61 : { 62 4321482 : result[0][0] = RichardsSeffVG::d2seff((*p[0])[qp], _al, _m); 63 4321482 : }