https://mooseframework.inl.gov
RichardsSat.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 // saturation as a function of effective saturation, and its derivs wrt effective saturation
11 //
12 #include "RichardsSat.h"
13 
14 registerMooseObject("RichardsApp", RichardsSat);
15 
18 {
21  "s_res",
22  "s_res >= 0 & s_res < 1",
23  "Residual fluid saturation for the phase. 0 <= s_res < 1.");
25  "sum_s_res",
26  "sum_s_res < 1",
27  "Sum of s_res over all phases. s_res <= sum_s_res < 1. It is "
28  "up to you to ensure the sum is done correctly.");
29  params.addClassDescription("User object yielding saturation for a phase as a function of "
30  "effective saturation of that phase");
31  return params;
32 }
33 
35  : GeneralUserObject(parameters),
36  _s_res(getParam<Real>("s_res")),
37  _sum_s_res(getParam<Real>("sum_s_res"))
38 {
39  if (_sum_s_res < _s_res)
40  mooseError("sum_s_res set to ", _sum_s_res, " but it must obey s_res <= sum_s_res < 1");
41 }
42 
43 void
45 {
46 }
47 
48 void
50 {
51 }
52 
53 void
55 {
56 }
57 
58 Real
59 RichardsSat::sat(Real seff) const
60 {
61  return _s_res + seff * (1.0 - _sum_s_res);
62 }
63 
64 Real RichardsSat::dsat(Real /*seff*/) const { return 1.0 - _sum_s_res; }
Real _sum_s_res
sum of the residual saturations for every phase
Definition: RichardsSat.h:44
void addRequiredRangeCheckedParam(const std::string &name, const std::string &parsed_function, const std::string &doc_string)
void execute()
Definition: RichardsSat.C:49
static InputParameters validParams()
Saturation of a phase as a function of effective saturation of that phase, and its derivatives wrt ef...
Definition: RichardsSat.h:19
static InputParameters validParams()
Definition: RichardsSat.C:17
Real dsat(Real) const
derivative of saturation wrt effective saturation
Definition: RichardsSat.C:64
Real _s_res
residual saturation for this phase
Definition: RichardsSat.h:41
void initialize()
Definition: RichardsSat.C:44
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void mooseError(Args &&... args) const
RichardsSat(const InputParameters &parameters)
Definition: RichardsSat.C:34
void addClassDescription(const std::string &doc_string)
Real sat(Real seff) const
saturation as a function of effective saturation
Definition: RichardsSat.C:59
registerMooseObject("RichardsApp", RichardsSat)
void finalize()
Definition: RichardsSat.C:54