www.mooseframework.org
RichardsSat.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 // saturation as a function of effective saturation, and its derivs wrt effective saturation
9 //
10 #include "RichardsSat.h"
11 
12 template <>
13 InputParameters
15 {
16  InputParameters params = validParams<GeneralUserObject>();
17  params.addRequiredRangeCheckedParam<Real>(
18  "s_res",
19  "s_res >= 0 & s_res < 1",
20  "Residual fluid saturation for the phase. 0 <= s_res < 1.");
21  params.addRequiredRangeCheckedParam<Real>(
22  "sum_s_res",
23  "sum_s_res < 1",
24  "Sum of s_res over all phases. s_res <= sum_s_res < 1. It is "
25  "up to you to ensure the sum is done correctly.");
26  params.addClassDescription("User object yielding saturation for a phase as a function of "
27  "effective saturation of that phase");
28  return params;
29 }
30 
31 RichardsSat::RichardsSat(const InputParameters & parameters)
32  : GeneralUserObject(parameters),
33  _s_res(getParam<Real>("s_res")),
34  _sum_s_res(getParam<Real>("sum_s_res"))
35 {
36  if (_sum_s_res < _s_res)
37  mooseError("sum_s_res set to ", _sum_s_res, " but it must obey s_res <= sum_s_res < 1");
38 }
39 
40 void
42 {
43 }
44 
45 void
47 {
48 }
49 
50 void
52 {
53 }
54 
55 Real
56 RichardsSat::sat(Real seff) const
57 {
58  return _s_res + seff * (1.0 - _sum_s_res);
59 }
60 
61 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:46
void execute()
Definition: RichardsSat.C:46
Real _s_res
residual saturation for this phase
Definition: RichardsSat.h:43
void initialize()
Definition: RichardsSat.C:41
Real dsat(Real) const
derivative of saturation wrt effective saturation
Definition: RichardsSat.C:61
RichardsSat(const InputParameters &parameters)
Definition: RichardsSat.C:31
InputParameters validParams< RichardsSat >()
Definition: RichardsSat.C:14
void finalize()
Definition: RichardsSat.C:51
Real sat(Real seff) const
saturation as a function of effective saturation
Definition: RichardsSat.C:56