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

-fluid_mass_old/dt with the fluid mass being lumped to the nodes. More...

#include <Q2PNegativeNodalMassOld.h>

Inheritance diagram for Q2PNegativeNodalMassOld:
[legend]

Public Member Functions

 Q2PNegativeNodalMassOld (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpResidual ()
 

Protected Attributes

const RichardsDensity_density
 
const VariableValue & _other_var_nodal_old
 old value of the other variable (this is porepressure if the Variable is saturation) More...
 
bool _var_is_pp
 whether the "other variable" is actually porepressure More...
 
const MaterialProperty< Real > & _porosity_old
 value of the porosity at the start of the timestep More...
 

Detailed Description

-fluid_mass_old/dt with the fluid mass being lumped to the nodes.

Definition at line 25 of file Q2PNegativeNodalMassOld.h.

Constructor & Destructor Documentation

Q2PNegativeNodalMassOld::Q2PNegativeNodalMassOld ( const InputParameters &  parameters)

Definition at line 39 of file Q2PNegativeNodalMassOld.C.

40  : TimeKernel(parameters),
41  _density(getUserObject<RichardsDensity>("fluid_density")),
42  _other_var_nodal_old(coupledNodalValueOld("other_var")),
43  _var_is_pp(getParam<bool>("var_is_porepressure")),
44  _porosity_old(getMaterialProperty<Real>("porosity_old"))
45 {
46 }
const RichardsDensity & _density
bool _var_is_pp
whether the "other variable" is actually porepressure
const MaterialProperty< Real > & _porosity_old
value of the porosity at the start of the timestep
const VariableValue & _other_var_nodal_old
old value of the other variable (this is porepressure if the Variable is saturation) ...

Member Function Documentation

Real Q2PNegativeNodalMassOld::computeQpResidual ( )
protectedvirtual

Definition at line 49 of file Q2PNegativeNodalMassOld.C.

50 {
51  Real density_old;
52  Real mass_old;
53 
54  if (_var_is_pp)
55  {
56  density_old = _density.density(_var.nodalSlnOld()[_i]);
57  mass_old = _porosity_old[_qp] * density_old * (1 - _other_var_nodal_old[_i]);
58  }
59  else
60  {
61  density_old = _density.density(_other_var_nodal_old[_i]);
62  mass_old = _porosity_old[_qp] * density_old * _var.nodalSlnOld()[_i];
63  }
64 
65  return _test[_i][_qp] * (-mass_old) / _dt;
66 }
const RichardsDensity & _density
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...
bool _var_is_pp
whether the "other variable" is actually porepressure
const MaterialProperty< Real > & _porosity_old
value of the porosity at the start of the timestep
const VariableValue & _other_var_nodal_old
old value of the other variable (this is porepressure if the Variable is saturation) ...

Member Data Documentation

const RichardsDensity& Q2PNegativeNodalMassOld::_density
protected

Definition at line 33 of file Q2PNegativeNodalMassOld.h.

Referenced by computeQpResidual().

const VariableValue& Q2PNegativeNodalMassOld::_other_var_nodal_old
protected

old value of the other variable (this is porepressure if the Variable is saturation)

Definition at line 36 of file Q2PNegativeNodalMassOld.h.

Referenced by computeQpResidual().

const MaterialProperty<Real>& Q2PNegativeNodalMassOld::_porosity_old
protected

value of the porosity at the start of the timestep

Definition at line 42 of file Q2PNegativeNodalMassOld.h.

Referenced by computeQpResidual().

bool Q2PNegativeNodalMassOld::_var_is_pp
protected

whether the "other variable" is actually porepressure

Definition at line 39 of file Q2PNegativeNodalMassOld.h.

Referenced by computeQpResidual().


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