Go to the documentation of this file.
21 InputParameters params = validParams<GeneralUserObject>();
22 params.addClassDescription(
"Holds information on the porepressure variable names");
23 params.addRequiredCoupledVar(
"richards_vars",
24 "List of variables that represent the porepressures or "
25 "(porepressure, saturations). In single-phase models you will just "
26 "have one (eg \'pressure\'), in two-phase models you will have two "
27 "(eg \'p_water p_gas\', or \'p_water s_water\', etc. These names "
28 "must also be used in your kernels and material.");
29 MooseEnum var_types(
"pppp",
"pppp");
30 params.addParam<MooseEnum>(
33 "Variable types for the problem. Eg, 'pppp' means all the variables are pressure variables");
39 : GeneralUserObject(parameters),
40 Coupleable(this, false),
41 _num_v(coupledComponents(
"richards_vars")),
42 _var_types(getParam<MooseEnum>(
"var_types"))
44 unsigned int max_moose_var_num_seen = 0;
52 for (
unsigned int i = 0; i <
_num_v; ++i)
55 max_moose_var_num_seen =
66 (_is_transient ? &coupledDofValuesOld(
"richards_vars", i) : &_zero);
71 for (
unsigned int i = 0; i < max_moose_var_num_seen + 1; ++i)
73 for (
unsigned int i = 0; i <
_num_v; ++i)
102 mooseError(
"The moose variable with number ",
104 " is not a richards according to the RichardsVarNames UserObject");
116 const VariableValue *
123 const VariableValue *
129 const VariableGradient *
141 const VariableValue *
147 const VariableValue *
registerMooseObject("RichardsApp", RichardsVarNames)
MooseEnum _var_types
physical meaning of the variables. Eg 'pppp' means 'all variables are pressure variables'
std::string var_types() const
return the _var_types string
unsigned int richards_var_num(unsigned int moose_var_num) const
the richards variable number
InputParameters validParams< RichardsVarNames >()
unsigned int _num_v
number of richards variables
This holds maps between pressure_var or pressure_var, sat_var used in RichardsMaterial and kernels,...
const VariableValue * nodal_var_old(unsigned int richards_var_num) const
The old nodal variable values for the given richards_var_num.
std::vector< const VariableValue * > _moose_var_value_old
moose_var_value_old[i] = old values of richards variable i
std::vector< unsigned int > _ps_var_num
_pressure_var_num[i] = the richards variable corresponding to moose variable i
const VariableValue * richards_vals(unsigned int richards_var_num) const
a vector of pointers to VariableValues
std::vector< const VariableGradient * > _moose_grad_var
moose_grad_var[i] = gradient values of richards variable i
std::vector< unsigned int > _moose_var_num
_moose_var_num[i] = the moose variable number corresponding to richards variable i
std::vector< const VariableValue * > _moose_nodal_var_value
moose_var_value[i] = values of richards variable i
std::vector< const VariableValue * > _moose_nodal_var_value_old
moose_var_value_old[i] = old values of richards variable i
const VariableValue * nodal_var(unsigned int richards_var_num) const
The nodal variable values for the given richards_var_num To extract a the value of pressure variable ...
RichardsVarNames(const InputParameters ¶meters)
std::vector< const VariableValue * > _moose_var_value
moose_var_value[i] = values of richards variable i
unsigned int num_v() const
the number of porepressure variables
const VariableValue * richards_vals_old(unsigned int richards_var_num) const
a vector of pointers to old VariableValues
const VariableGradient * grad_var(unsigned int richards_var_num) const
a vector of pointers to grad(Variable)
bool not_richards_var(unsigned int moose_var_num) const
returns true if moose_var_num is not a richards var