www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
RichardsPiecewiseLinearSink Class Reference

Applies a flux sink to a boundary The sink is a piecewise linear function of porepressure (the "variable") at the quad points. More...

#include <RichardsPiecewiseLinearSink.h>

Inheritance diagram for RichardsPiecewiseLinearSink:
[legend]

Public Member Functions

 RichardsPiecewiseLinearSink (const InputParameters &parameters)
 

Protected Member Functions

virtual void computeResidual () override
 
virtual Real computeQpResidual () override
 
virtual void computeJacobian () override
 
virtual Real computeQpJacobian () override
 
virtual void computeJacobianBlock (MooseVariableFEBase &jvar) override
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar) override
 
void prepareNodalValues ()
 calculates the nodal values of pressure, mobility, and derivatives thereof More...
 
Real jac (unsigned int wrt_num)
 derivative of residual wrt the wrt_num Richards variable More...
 

Protected Attributes

bool _use_mobility
 whether to multiply the sink flux by permeability*density/viscosity More...
 
bool _use_relperm
 whether to multiply the sink flux by relative permeability More...
 
bool _fully_upwind
 whether to use full upwinding More...
 
LinearInterpolation _sink_func
 piecewise-linear function of porepressure (this defines the strength of the sink) More...
 
Function & _m_func
 sink flux gets multiplied by this function More...
 
const RichardsVarNames_richards_name_UO
 holds info about the names and values of richards variable in the simulation More...
 
unsigned int _num_p
 number of richards variables More...
 
unsigned int _pvar
 the moose internal variable number corresponding to the porepressure of this sink flux More...
 
const RichardsDensity_density_UO
 user object defining the density. Only used if _fully_upwind = true More...
 
const RichardsSeff_seff_UO
 user object defining the effective saturation. Only used if _fully_upwind = true More...
 
const RichardsRelPerm_relperm_UO
 user object defining the relative permeability. Only used if _fully_upwind = true More...
 
const PostprocessorValue & _area_pp
 area postprocessor. if given then all bare_fluxes are divided by this quantity More...
 
unsigned int _num_nodes
 number of nodes in this element. Only used if _fully_upwind = true More...
 
std::vector< Real > _nodal_density
 nodal values of fluid density These are used if _fully_upwind = true More...
 
std::vector< std::vector< Real > > _dnodal_density_dv
 d(_nodal_density)/d(variable_ph) (variable_ph is the variable for phase=ph) These are used in the jacobian calculations if _fully_upwind = true More...
 
std::vector< Real > _nodal_relperm
 nodal values of relative permeability These are used if _fully_upwind = true More...
 
std::vector< std::vector< Real > > _dnodal_relperm_dv
 d(_nodal_relperm)/d(variable_ph) (variable_ph is the variable for phase=ph) These are used in the jacobian calculations if _fully_upwind = true More...
 
const MaterialProperty< std::vector< Real > > & _pp
 porepressure values (only the _pvar component is used) More...
 
const MaterialProperty< std::vector< std::vector< Real > > > & _dpp_dv
 d(porepressure_i)/d(variable_j) More...
 
const MaterialProperty< std::vector< Real > > & _viscosity
 viscosity (only the _pvar component is used) More...
 
const MaterialProperty< RealTensorValue > & _permeability
 permeability More...
 
const MaterialProperty< std::vector< std::vector< Real > > > & _dseff_dv
 derivative of effective saturation wrt variables only _dseff_dv[_pvar][i] is used for i being all variables More...
 
const MaterialProperty< std::vector< Real > > & _rel_perm
 relative permeability (only the _pvar component is used) More...
 
const MaterialProperty< std::vector< std::vector< Real > > > & _drel_perm_dv
 d(relperm_i)/d(variable_j) More...
 
const MaterialProperty< std::vector< Real > > & _density
 fluid density (only the _pvar component is used) More...
 
const MaterialProperty< std::vector< std::vector< Real > > > & _ddensity_dv
 d(density_i)/d(variable_j) More...
 
std::vector< const VariableValue * > _ps_at_nodes
 Holds the values of pressures at all the nodes of the element Only used if _fully_upwind = true Eg: _ps_at_nodes[_pvar] is a pointer to this variable's nodal porepressure values So: (*_ps_at_nodes[_pvar])[i] = _var.dofValues()[i] = porepressure of pressure-variable _pvar at node i. More...
 

Detailed Description

Applies a flux sink to a boundary The sink is a piecewise linear function of porepressure (the "variable") at the quad points.

This is specified by _sink_func. In addition, this sink can be multiplied by: (1) the relative permeability of the fluid at the quad point. (2) perm_nn*density/viscosity, where perm_nn is the permeability tensor projected in the normal direction. (3) a Function (which can be time-dependent, for instance) and divided by: (4) an area Postprocessor

Definition at line 40 of file RichardsPiecewiseLinearSink.h.

Constructor & Destructor Documentation

◆ RichardsPiecewiseLinearSink()

RichardsPiecewiseLinearSink::RichardsPiecewiseLinearSink ( const InputParameters &  parameters)

Definition at line 78 of file RichardsPiecewiseLinearSink.C.

79  : IntegratedBC(parameters),
80  _use_mobility(getParam<bool>("use_mobility")),
81  _use_relperm(getParam<bool>("use_relperm")),
82  _fully_upwind(getParam<bool>("fully_upwind")),
83 
84  _sink_func(getParam<std::vector<Real>>("pressures"),
85  getParam<std::vector<Real>>("bare_fluxes")),
86 
87  _m_func(getFunction("multiplying_fcn")),
88 
89  _richards_name_UO(getUserObject<RichardsVarNames>("richardsVarNames_UO")),
92 
93  // in the following, getUserObjectByName returns a reference (an alias) to a RichardsBLAH user
94  // object, and the & turns it into a pointer
95  _density_UO(_fully_upwind ? &getUserObjectByName<RichardsDensity>(
96  getParam<std::vector<UserObjectName>>("density_UO")[_pvar])
97  : NULL),
98  _seff_UO(_fully_upwind ? &getUserObjectByName<RichardsSeff>(
99  getParam<std::vector<UserObjectName>>("seff_UO")[_pvar])
100  : NULL),
101  _relperm_UO(_fully_upwind ? &getUserObjectByName<RichardsRelPerm>(
102  getParam<std::vector<UserObjectName>>("relperm_UO")[_pvar])
103  : NULL),
104 
105  _area_pp(getPostprocessorValue("area_pp")),
106 
107  _num_nodes(0),
108  _nodal_density(0),
110  _nodal_relperm(0),
112 
113  _pp(getMaterialProperty<std::vector<Real>>("porepressure")),
114  _dpp_dv(getMaterialProperty<std::vector<std::vector<Real>>>("dporepressure_dv")),
115 
116  _viscosity(getMaterialProperty<std::vector<Real>>("viscosity")),
117  _permeability(getMaterialProperty<RealTensorValue>("permeability")),
118 
119  _dseff_dv(getMaterialProperty<std::vector<std::vector<Real>>>("ds_eff_dv")),
120 
121  _rel_perm(getMaterialProperty<std::vector<Real>>("rel_perm")),
122  _drel_perm_dv(getMaterialProperty<std::vector<std::vector<Real>>>("drel_perm_dv")),
123 
124  _density(getMaterialProperty<std::vector<Real>>("density")),
125  _ddensity_dv(getMaterialProperty<std::vector<std::vector<Real>>>("ddensity_dv"))
126 {
127  _ps_at_nodes.resize(_num_p);
128  for (unsigned int pnum = 0; pnum < _num_p; ++pnum)
130 }
const MaterialProperty< std::vector< Real > > & _rel_perm
relative permeability (only the _pvar component is used)
LinearInterpolation _sink_func
piecewise-linear function of porepressure (this defines the strength of the sink) ...
const MaterialProperty< std::vector< Real > > & _viscosity
viscosity (only the _pvar component is used)
bool _use_relperm
whether to multiply the sink flux by relative permeability
bool _use_mobility
whether to multiply the sink flux by permeability*density/viscosity
std::vector< Real > _nodal_density
nodal values of fluid density These are used if _fully_upwind = true
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 ...
const MaterialProperty< std::vector< Real > > & _density
fluid density (only the _pvar component is used)
std::vector< Real > _nodal_relperm
nodal values of relative permeability These are used if _fully_upwind = true
unsigned int num_v() const
the number of porepressure variables
std::vector< std::vector< Real > > _dnodal_density_dv
d(_nodal_density)/d(variable_ph) (variable_ph is the variable for phase=ph) These are used in the jac...
const RichardsVarNames & _richards_name_UO
holds info about the names and values of richards variable in the simulation
const RichardsSeff * _seff_UO
user object defining the effective saturation. Only used if _fully_upwind = true
const PostprocessorValue & _area_pp
area postprocessor. if given then all bare_fluxes are divided by this quantity
std::vector< const VariableValue * > _ps_at_nodes
Holds the values of pressures at all the nodes of the element Only used if _fully_upwind = true Eg: _...
const MaterialProperty< std::vector< std::vector< Real > > > & _drel_perm_dv
d(relperm_i)/d(variable_j)
unsigned int _pvar
the moose internal variable number corresponding to the porepressure of this sink flux ...
const MaterialProperty< std::vector< std::vector< Real > > > & _dseff_dv
derivative of effective saturation wrt variables only _dseff_dv[_pvar][i] is used for i being all var...
bool _fully_upwind
whether to use full upwinding
const MaterialProperty< std::vector< Real > > & _pp
porepressure values (only the _pvar component is used)
const MaterialProperty< std::vector< std::vector< Real > > > & _dpp_dv
d(porepressure_i)/d(variable_j)
unsigned int _num_nodes
number of nodes in this element. Only used if _fully_upwind = true
const RichardsRelPerm * _relperm_UO
user object defining the relative permeability. Only used if _fully_upwind = true ...
unsigned int richards_var_num(unsigned int moose_var_num) const
the richards variable number
unsigned int _num_p
number of richards variables
std::vector< std::vector< Real > > _dnodal_relperm_dv
d(_nodal_relperm)/d(variable_ph) (variable_ph is the variable for phase=ph) These are used in the jac...
const MaterialProperty< RealTensorValue > & _permeability
permeability
const RichardsDensity * _density_UO
user object defining the density. Only used if _fully_upwind = true
const MaterialProperty< std::vector< std::vector< Real > > > & _ddensity_dv
d(density_i)/d(variable_j)
Function & _m_func
sink flux gets multiplied by this function

Member Function Documentation

◆ computeJacobian()

void RichardsPiecewiseLinearSink::computeJacobian ( )
overrideprotectedvirtual

Definition at line 230 of file RichardsPiecewiseLinearSink.C.

231 {
232  if (_fully_upwind)
234  IntegratedBC::computeJacobian();
235 }
bool _fully_upwind
whether to use full upwinding
void prepareNodalValues()
calculates the nodal values of pressure, mobility, and derivatives thereof

◆ computeJacobianBlock()

void RichardsPiecewiseLinearSink::computeJacobianBlock ( MooseVariableFEBase &  jvar)
overrideprotectedvirtual

Definition at line 244 of file RichardsPiecewiseLinearSink.C.

245 {
246  if (_fully_upwind)
248  IntegratedBC::computeJacobianBlock(jvar);
249 }
bool _fully_upwind
whether to use full upwinding
void prepareNodalValues()
calculates the nodal values of pressure, mobility, and derivatives thereof

◆ computeQpJacobian()

Real RichardsPiecewiseLinearSink::computeQpJacobian ( )
overrideprotectedvirtual

Definition at line 238 of file RichardsPiecewiseLinearSink.C.

239 {
240  return jac(_pvar);
241 }
unsigned int _pvar
the moose internal variable number corresponding to the porepressure of this sink flux ...
Real jac(unsigned int wrt_num)
derivative of residual wrt the wrt_num Richards variable

◆ computeQpOffDiagJacobian()

Real RichardsPiecewiseLinearSink::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Definition at line 252 of file RichardsPiecewiseLinearSink.C.

253 {
255  return 0.0;
256  unsigned int dvar = _richards_name_UO.richards_var_num(jvar);
257  return jac(dvar);
258 }
bool not_richards_var(unsigned int moose_var_num) const
returns true if moose_var_num is not a richards var
const RichardsVarNames & _richards_name_UO
holds info about the names and values of richards variable in the simulation
unsigned int richards_var_num(unsigned int moose_var_num) const
the richards variable number
Real jac(unsigned int wrt_num)
derivative of residual wrt the wrt_num Richards variable

◆ computeQpResidual()

Real RichardsPiecewiseLinearSink::computeQpResidual ( )
overrideprotectedvirtual

Definition at line 184 of file RichardsPiecewiseLinearSink.C.

185 {
186  Real flux = 0;
187  Real k = 0;
188 
189  if (!_fully_upwind)
190  {
191  flux = _test[_i][_qp] * _sink_func.sample(_pp[_qp][_pvar]);
192  if (_use_mobility)
193  {
194  k = (_permeability[_qp] * _normals[_qp]) * _normals[_qp];
195  flux *= _density[_qp][_pvar] * k / _viscosity[_qp][_pvar];
196  }
197  if (_use_relperm)
198  flux *= _rel_perm[_qp][_pvar];
199  }
200  else
201  {
202  flux = _test[_i][_qp] * _sink_func.sample((*_ps_at_nodes[_pvar])[_i]);
203  if (_use_mobility)
204  {
205  k = (_permeability[0] * _normals[_qp]) * _normals[_qp]; // assume that _permeability is
206  // constant throughout element so
207  // doesn't need to be upwinded
208  flux *= _nodal_density[_i] * k /
209  _viscosity[0][_pvar]; // assume that viscosity is constant throughout element
210  }
211  if (_use_relperm)
212  flux *= _nodal_relperm[_i];
213  }
214 
215  flux *= _m_func.value(_t, _q_point[_qp]);
216 
217  if (_area_pp == 0.0)
218  {
219  if (flux != 0)
220  mooseError("RichardsPiecewiseLinearSink: flux is nonzero, but area is zero!\n");
221  // if flux == 0, then leave it as zero.
222  }
223  else
224  flux /= _area_pp;
225 
226  return flux;
227 }
const MaterialProperty< std::vector< Real > > & _rel_perm
relative permeability (only the _pvar component is used)
LinearInterpolation _sink_func
piecewise-linear function of porepressure (this defines the strength of the sink) ...
const MaterialProperty< std::vector< Real > > & _viscosity
viscosity (only the _pvar component is used)
bool _use_relperm
whether to multiply the sink flux by relative permeability
bool _use_mobility
whether to multiply the sink flux by permeability*density/viscosity
std::vector< Real > _nodal_density
nodal values of fluid density These are used if _fully_upwind = true
const MaterialProperty< std::vector< Real > > & _density
fluid density (only the _pvar component is used)
std::vector< Real > _nodal_relperm
nodal values of relative permeability These are used if _fully_upwind = true
const PostprocessorValue & _area_pp
area postprocessor. if given then all bare_fluxes are divided by this quantity
std::vector< const VariableValue * > _ps_at_nodes
Holds the values of pressures at all the nodes of the element Only used if _fully_upwind = true Eg: _...
unsigned int _pvar
the moose internal variable number corresponding to the porepressure of this sink flux ...
bool _fully_upwind
whether to use full upwinding
const MaterialProperty< std::vector< Real > > & _pp
porepressure values (only the _pvar component is used)
const MaterialProperty< RealTensorValue > & _permeability
permeability
Function & _m_func
sink flux gets multiplied by this function

◆ computeResidual()

void RichardsPiecewiseLinearSink::computeResidual ( )
overrideprotectedvirtual

Definition at line 176 of file RichardsPiecewiseLinearSink.C.

177 {
178  if (_fully_upwind)
180  IntegratedBC::computeResidual();
181 }
bool _fully_upwind
whether to use full upwinding
void prepareNodalValues()
calculates the nodal values of pressure, mobility, and derivatives thereof

◆ jac()

Real RichardsPiecewiseLinearSink::jac ( unsigned int  wrt_num)
protected

derivative of residual wrt the wrt_num Richards variable

Definition at line 261 of file RichardsPiecewiseLinearSink.C.

Referenced by computeQpJacobian(), and computeQpOffDiagJacobian().

262 {
263  Real flux = 0;
264  Real deriv = 0;
265  Real k = 0;
266  Real mob = 0;
267  Real mobp = 0;
268  Real phi = 0;
269 
270  if (!_fully_upwind)
271  {
272  flux = _sink_func.sample(_pp[_qp][_pvar]);
273  deriv = _sink_func.sampleDerivative(_pp[_qp][_pvar]) * _dpp_dv[_qp][_pvar][wrt_num];
274  phi = _phi[_j][_qp];
275  if (_use_mobility)
276  {
277  k = (_permeability[_qp] * _normals[_qp]) * _normals[_qp];
278  mob = _density[_qp][_pvar] * k / _viscosity[_qp][_pvar];
279  mobp = _ddensity_dv[_qp][_pvar][wrt_num] * k / _viscosity[_qp][_pvar];
280  deriv = mob * deriv + mobp * flux;
281  flux *= mob;
282  }
283  if (_use_relperm)
284  deriv = _rel_perm[_qp][_pvar] * deriv + _drel_perm_dv[_qp][_pvar][wrt_num] * flux;
285  }
286  else
287  {
288  if (_i != _j)
289  return 0.0; // residual at node _i only depends on variables at that node
290  flux = _sink_func.sample((*_ps_at_nodes[_pvar])[_i]);
291  deriv = (_pvar == wrt_num ? _sink_func.sampleDerivative((*_ps_at_nodes[_pvar])[_i])
292  : 0); // NOTE: i'm assuming that the variables are pressure variables
293  phi = 1;
294  if (_use_mobility)
295  {
296  k = (_permeability[0] * _normals[_qp]) * _normals[_qp];
297  mob = _nodal_density[_i] * k / _viscosity[0][_pvar];
298  mobp = _dnodal_density_dv[_i][wrt_num] * k / _viscosity[0][_pvar];
299  deriv = mob * deriv + mobp * flux;
300  flux *= mob;
301  }
302  if (_use_relperm)
303  deriv = _nodal_relperm[_i] * deriv + _dnodal_relperm_dv[_i][wrt_num] * flux;
304  }
305 
306  deriv *= _m_func.value(_t, _q_point[_qp]);
307 
308  if (_area_pp == 0.0)
309  {
310  if (deriv != 0)
311  mooseError("RichardsPiecewiseLinearSink: deriv is nonzero, but area is zero!\n");
312  // if deriv == 0, then leave it as zero.
313  }
314  else
315  deriv /= _area_pp;
316 
317  return _test[_i][_qp] * deriv * phi;
318 }
const MaterialProperty< std::vector< Real > > & _rel_perm
relative permeability (only the _pvar component is used)
LinearInterpolation _sink_func
piecewise-linear function of porepressure (this defines the strength of the sink) ...
const MaterialProperty< std::vector< Real > > & _viscosity
viscosity (only the _pvar component is used)
bool _use_relperm
whether to multiply the sink flux by relative permeability
bool _use_mobility
whether to multiply the sink flux by permeability*density/viscosity
std::vector< Real > _nodal_density
nodal values of fluid density These are used if _fully_upwind = true
const MaterialProperty< std::vector< Real > > & _density
fluid density (only the _pvar component is used)
std::vector< Real > _nodal_relperm
nodal values of relative permeability These are used if _fully_upwind = true
std::vector< std::vector< Real > > _dnodal_density_dv
d(_nodal_density)/d(variable_ph) (variable_ph is the variable for phase=ph) These are used in the jac...
const PostprocessorValue & _area_pp
area postprocessor. if given then all bare_fluxes are divided by this quantity
std::vector< const VariableValue * > _ps_at_nodes
Holds the values of pressures at all the nodes of the element Only used if _fully_upwind = true Eg: _...
const MaterialProperty< std::vector< std::vector< Real > > > & _drel_perm_dv
d(relperm_i)/d(variable_j)
unsigned int _pvar
the moose internal variable number corresponding to the porepressure of this sink flux ...
bool _fully_upwind
whether to use full upwinding
const MaterialProperty< std::vector< Real > > & _pp
porepressure values (only the _pvar component is used)
const MaterialProperty< std::vector< std::vector< Real > > > & _dpp_dv
d(porepressure_i)/d(variable_j)
std::vector< std::vector< Real > > _dnodal_relperm_dv
d(_nodal_relperm)/d(variable_ph) (variable_ph is the variable for phase=ph) These are used in the jac...
const MaterialProperty< RealTensorValue > & _permeability
permeability
const MaterialProperty< std::vector< std::vector< Real > > > & _ddensity_dv
d(density_i)/d(variable_j)
Function & _m_func
sink flux gets multiplied by this function

◆ prepareNodalValues()

void RichardsPiecewiseLinearSink::prepareNodalValues ( )
protected

calculates the nodal values of pressure, mobility, and derivatives thereof

Definition at line 133 of file RichardsPiecewiseLinearSink.C.

Referenced by computeJacobian(), computeJacobianBlock(), and computeResidual().

134 {
135  // NOTE: i'm assuming that all the richards variables are pressure values
136 
137  _num_nodes = (*_ps_at_nodes[_pvar]).size();
138 
139  Real p;
140  Real seff;
141  std::vector<Real> dseff_dp;
142  Real drelperm_ds;
143 
144  _nodal_density.resize(_num_nodes);
146  _nodal_relperm.resize(_num_nodes);
148  dseff_dp.resize(_num_p);
149  for (unsigned int nodenum = 0; nodenum < _num_nodes; ++nodenum)
150  {
151  // retrieve and calculate basic things at the node
152  p = (*_ps_at_nodes[_pvar])[nodenum]; // pressure of fluid _pvar at node nodenum
153 
154  _nodal_density[nodenum] = _density_UO->density(p); // density of fluid _pvar at node nodenum
155  _dnodal_density_dv[nodenum].resize(_num_p);
156  for (unsigned int ph = 0; ph < _num_p; ++ph)
157  _dnodal_density_dv[nodenum][ph] = 0;
158  _dnodal_density_dv[nodenum][_pvar] = _density_UO->ddensity(p); // d(density)/dP
159 
160  seff = _seff_UO->seff(_ps_at_nodes,
161  nodenum); // effective saturation of fluid _pvar at node nodenum
162  _seff_UO->dseff(
163  _ps_at_nodes, nodenum, dseff_dp); // d(seff)/d(P_ph), for ph = 0, ..., _num_p - 1
164 
165  _nodal_relperm[nodenum] =
166  _relperm_UO->relperm(seff); // relative permeability of fluid _pvar at node nodenum
167  drelperm_ds = _relperm_UO->drelperm(seff); // d(relperm)/dseff
168 
169  _dnodal_relperm_dv[nodenum].resize(_num_p);
170  for (unsigned int ph = 0; ph < _num_p; ++ph)
171  _dnodal_relperm_dv[nodenum][ph] = drelperm_ds * dseff_dp[ph];
172  }
173 }
virtual void dseff(std::vector< const VariableValue *> p, unsigned int qp, std::vector< Real > &result) const =0
derivative(s) of effective saturation as a function of porepressure(s) at given quadpoint of the elem...
virtual Real drelperm(Real seff) const =0
derivative of relative permeability wrt effective saturation This must be over-ridden in your derived...
virtual Real ddensity(Real p) const =0
derivative of fluid density wrt porepressure This must be over-ridden in derived classes to provide a...
std::vector< Real > _nodal_density
nodal values of fluid density These are used if _fully_upwind = true
std::vector< Real > _nodal_relperm
nodal values of relative permeability These are used if _fully_upwind = true
std::vector< std::vector< Real > > _dnodal_density_dv
d(_nodal_density)/d(variable_ph) (variable_ph is the variable for phase=ph) These are used in the jac...
virtual Real density(Real p) const =0
fluid density as a function of porepressure This must be over-ridden in derived classes to provide an...
const RichardsSeff * _seff_UO
user object defining the effective saturation. Only used if _fully_upwind = true
virtual Real seff(std::vector< const VariableValue *> p, unsigned int qp) const =0
effective saturation as a function of porepressure(s) at given quadpoint of the element ...
std::vector< const VariableValue * > _ps_at_nodes
Holds the values of pressures at all the nodes of the element Only used if _fully_upwind = true Eg: _...
virtual Real relperm(Real seff) const =0
relative permeability as a function of effective saturation This must be over-ridden in your derived ...
unsigned int _pvar
the moose internal variable number corresponding to the porepressure of this sink flux ...
unsigned int _num_nodes
number of nodes in this element. Only used if _fully_upwind = true
const RichardsRelPerm * _relperm_UO
user object defining the relative permeability. Only used if _fully_upwind = true ...
unsigned int _num_p
number of richards variables
std::vector< std::vector< Real > > _dnodal_relperm_dv
d(_nodal_relperm)/d(variable_ph) (variable_ph is the variable for phase=ph) These are used in the jac...
const RichardsDensity * _density_UO
user object defining the density. Only used if _fully_upwind = true

Member Data Documentation

◆ _area_pp

const PostprocessorValue& RichardsPiecewiseLinearSink::_area_pp
protected

area postprocessor. if given then all bare_fluxes are divided by this quantity

Definition at line 93 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), and jac().

◆ _ddensity_dv

const MaterialProperty<std::vector<std::vector<Real> > >& RichardsPiecewiseLinearSink::_ddensity_dv
protected

d(density_i)/d(variable_j)

Definition at line 150 of file RichardsPiecewiseLinearSink.h.

Referenced by jac().

◆ _density

const MaterialProperty<std::vector<Real> >& RichardsPiecewiseLinearSink::_density
protected

fluid density (only the _pvar component is used)

Definition at line 147 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), and jac().

◆ _density_UO

const RichardsDensity* RichardsPiecewiseLinearSink::_density_UO
protected

user object defining the density. Only used if _fully_upwind = true

Definition at line 84 of file RichardsPiecewiseLinearSink.h.

Referenced by prepareNodalValues().

◆ _dnodal_density_dv

std::vector<std::vector<Real> > RichardsPiecewiseLinearSink::_dnodal_density_dv
protected

d(_nodal_density)/d(variable_ph) (variable_ph is the variable for phase=ph) These are used in the jacobian calculations if _fully_upwind = true

Definition at line 108 of file RichardsPiecewiseLinearSink.h.

Referenced by jac(), and prepareNodalValues().

◆ _dnodal_relperm_dv

std::vector<std::vector<Real> > RichardsPiecewiseLinearSink::_dnodal_relperm_dv
protected

d(_nodal_relperm)/d(variable_ph) (variable_ph is the variable for phase=ph) These are used in the jacobian calculations if _fully_upwind = true

Definition at line 120 of file RichardsPiecewiseLinearSink.h.

Referenced by jac(), and prepareNodalValues().

◆ _dpp_dv

const MaterialProperty<std::vector<std::vector<Real> > >& RichardsPiecewiseLinearSink::_dpp_dv
protected

d(porepressure_i)/d(variable_j)

Definition at line 126 of file RichardsPiecewiseLinearSink.h.

Referenced by jac().

◆ _drel_perm_dv

const MaterialProperty<std::vector<std::vector<Real> > >& RichardsPiecewiseLinearSink::_drel_perm_dv
protected

d(relperm_i)/d(variable_j)

Definition at line 144 of file RichardsPiecewiseLinearSink.h.

Referenced by jac().

◆ _dseff_dv

const MaterialProperty<std::vector<std::vector<Real> > >& RichardsPiecewiseLinearSink::_dseff_dv
protected

derivative of effective saturation wrt variables only _dseff_dv[_pvar][i] is used for i being all variables

Definition at line 138 of file RichardsPiecewiseLinearSink.h.

◆ _fully_upwind

bool RichardsPiecewiseLinearSink::_fully_upwind
protected

whether to use full upwinding

Definition at line 66 of file RichardsPiecewiseLinearSink.h.

Referenced by computeJacobian(), computeJacobianBlock(), computeQpResidual(), computeResidual(), and jac().

◆ _m_func

Function& RichardsPiecewiseLinearSink::_m_func
protected

sink flux gets multiplied by this function

Definition at line 72 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), and jac().

◆ _nodal_density

std::vector<Real> RichardsPiecewiseLinearSink::_nodal_density
protected

nodal values of fluid density These are used if _fully_upwind = true

Definition at line 102 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), jac(), and prepareNodalValues().

◆ _nodal_relperm

std::vector<Real> RichardsPiecewiseLinearSink::_nodal_relperm
protected

nodal values of relative permeability These are used if _fully_upwind = true

Definition at line 114 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), jac(), and prepareNodalValues().

◆ _num_nodes

unsigned int RichardsPiecewiseLinearSink::_num_nodes
protected

number of nodes in this element. Only used if _fully_upwind = true

Definition at line 96 of file RichardsPiecewiseLinearSink.h.

Referenced by prepareNodalValues().

◆ _num_p

unsigned int RichardsPiecewiseLinearSink::_num_p
protected

number of richards variables

Definition at line 78 of file RichardsPiecewiseLinearSink.h.

Referenced by prepareNodalValues(), and RichardsPiecewiseLinearSink().

◆ _permeability

const MaterialProperty<RealTensorValue>& RichardsPiecewiseLinearSink::_permeability
protected

permeability

Definition at line 132 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), and jac().

◆ _pp

const MaterialProperty<std::vector<Real> >& RichardsPiecewiseLinearSink::_pp
protected

porepressure values (only the _pvar component is used)

Definition at line 123 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), and jac().

◆ _ps_at_nodes

std::vector<const VariableValue *> RichardsPiecewiseLinearSink::_ps_at_nodes
protected

Holds the values of pressures at all the nodes of the element Only used if _fully_upwind = true Eg: _ps_at_nodes[_pvar] is a pointer to this variable's nodal porepressure values So: (*_ps_at_nodes[_pvar])[i] = _var.dofValues()[i] = porepressure of pressure-variable _pvar at node i.

Definition at line 160 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), jac(), prepareNodalValues(), and RichardsPiecewiseLinearSink().

◆ _pvar

unsigned int RichardsPiecewiseLinearSink::_pvar
protected

the moose internal variable number corresponding to the porepressure of this sink flux

Definition at line 81 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpJacobian(), computeQpResidual(), jac(), and prepareNodalValues().

◆ _rel_perm

const MaterialProperty<std::vector<Real> >& RichardsPiecewiseLinearSink::_rel_perm
protected

relative permeability (only the _pvar component is used)

Definition at line 141 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), and jac().

◆ _relperm_UO

const RichardsRelPerm* RichardsPiecewiseLinearSink::_relperm_UO
protected

user object defining the relative permeability. Only used if _fully_upwind = true

Definition at line 90 of file RichardsPiecewiseLinearSink.h.

Referenced by prepareNodalValues().

◆ _richards_name_UO

const RichardsVarNames& RichardsPiecewiseLinearSink::_richards_name_UO
protected

holds info about the names and values of richards variable in the simulation

Definition at line 75 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpOffDiagJacobian(), and RichardsPiecewiseLinearSink().

◆ _seff_UO

const RichardsSeff* RichardsPiecewiseLinearSink::_seff_UO
protected

user object defining the effective saturation. Only used if _fully_upwind = true

Definition at line 87 of file RichardsPiecewiseLinearSink.h.

Referenced by prepareNodalValues().

◆ _sink_func

LinearInterpolation RichardsPiecewiseLinearSink::_sink_func
protected

piecewise-linear function of porepressure (this defines the strength of the sink)

Definition at line 69 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), and jac().

◆ _use_mobility

bool RichardsPiecewiseLinearSink::_use_mobility
protected

whether to multiply the sink flux by permeability*density/viscosity

Definition at line 60 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), and jac().

◆ _use_relperm

bool RichardsPiecewiseLinearSink::_use_relperm
protected

whether to multiply the sink flux by relative permeability

Definition at line 63 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), and jac().

◆ _viscosity

const MaterialProperty<std::vector<Real> >& RichardsPiecewiseLinearSink::_viscosity
protected

viscosity (only the _pvar component is used)

Definition at line 129 of file RichardsPiecewiseLinearSink.h.

Referenced by computeQpResidual(), and jac().


The documentation for this class was generated from the following files: