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 27 of file Q2PNegativeNodalMassOld.h.

Constructor & Destructor Documentation

◆ Q2PNegativeNodalMassOld()

Q2PNegativeNodalMassOld::Q2PNegativeNodalMassOld ( const InputParameters &  parameters)

Definition at line 43 of file Q2PNegativeNodalMassOld.C.

44  : TimeKernel(parameters),
45  _density(getUserObject<RichardsDensity>("fluid_density")),
46  _other_var_nodal_old(coupledNodalValueOld("other_var")),
47  _var_is_pp(getParam<bool>("var_is_porepressure")),
48  _porosity_old(getMaterialProperty<Real>("porosity_old"))
49 {
50 }
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

◆ computeQpResidual()

Real Q2PNegativeNodalMassOld::computeQpResidual ( )
protectedvirtual

Definition at line 53 of file Q2PNegativeNodalMassOld.C.

54 {
55  Real density_old;
56  Real mass_old;
57 
58  if (_var_is_pp)
59  {
60  density_old = _density.density(_var.dofValuesOld()[_i]);
61  mass_old = _porosity_old[_qp] * density_old * (1 - _other_var_nodal_old[_i]);
62  }
63  else
64  {
65  density_old = _density.density(_other_var_nodal_old[_i]);
66  mass_old = _porosity_old[_qp] * density_old * _var.dofValuesOld()[_i];
67  }
68 
69  return _test[_i][_qp] * (-mass_old) / _dt;
70 }
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

◆ _density

const RichardsDensity& Q2PNegativeNodalMassOld::_density
protected

Definition at line 35 of file Q2PNegativeNodalMassOld.h.

Referenced by computeQpResidual().

◆ _other_var_nodal_old

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 38 of file Q2PNegativeNodalMassOld.h.

Referenced by computeQpResidual().

◆ _porosity_old

const MaterialProperty<Real>& Q2PNegativeNodalMassOld::_porosity_old
protected

value of the porosity at the start of the timestep

Definition at line 44 of file Q2PNegativeNodalMassOld.h.

Referenced by computeQpResidual().

◆ _var_is_pp

bool Q2PNegativeNodalMassOld::_var_is_pp
protected

whether the "other variable" is actually porepressure

Definition at line 41 of file Q2PNegativeNodalMassOld.h.

Referenced by computeQpResidual().


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