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

Kernel = (desorped_mass - desorped_mass_old)/dt It is NOT lumped to the nodes. More...

#include <PorousFlowDesorpedMassTimeDerivative.h>

Inheritance diagram for PorousFlowDesorpedMassTimeDerivative:
[legend]

Public Member Functions

 PorousFlowDesorpedMassTimeDerivative (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpResidual () override
 
virtual Real computeQpJacobian () override
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar) override
 
Real computeQpJac (unsigned int jvar) const
 Derivative of residual with respect to variable number jvar This is used by both computeQpJacobian and computeQpOffDiagJacobian. More...
 

Protected Attributes

const PorousFlowDictator_dictator
 holds info on the PorousFlow variables More...
 
const unsigned int _conc_var_number
 The MOOSE variable number of the concentration variable. More...
 
const VariableValue & _conc
 The concentration variable. More...
 
const VariableValue & _conc_old
 Old value of the concentration variable. More...
 
const MaterialProperty< Real > & _porosity
 porosity at the qps More...
 
const MaterialProperty< Real > & _porosity_old
 old value of porosity More...
 
const MaterialProperty< std::vector< Real > > & _dporosity_dvar
 d(porosity)/d(porous-flow variable) - these derivatives will be wrt variables at the qps More...
 
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
 d(porosity)/d(grad porous-flow variable) - these derivatives will be wrt grad(vars) at qps More...
 

Detailed Description

Kernel = (desorped_mass - desorped_mass_old)/dt It is NOT lumped to the nodes.

Definition at line 24 of file PorousFlowDesorpedMassTimeDerivative.h.

Constructor & Destructor Documentation

PorousFlowDesorpedMassTimeDerivative::PorousFlowDesorpedMassTimeDerivative ( const InputParameters &  parameters)

Definition at line 28 of file PorousFlowDesorpedMassTimeDerivative.C.

30  : TimeKernel(parameters),
31  _dictator(getUserObject<PorousFlowDictator>("PorousFlowDictator")),
32  _conc_var_number(coupled("conc_var")),
33  _conc(coupledValue("conc_var")),
34  _conc_old(coupledValueOld("conc_var")),
35  _porosity(getMaterialProperty<Real>("PorousFlow_porosity_qp")),
36  _porosity_old(getMaterialPropertyOld<Real>("PorousFlow_porosity_qp")),
37  _dporosity_dvar(getMaterialProperty<std::vector<Real>>("dPorousFlow_porosity_qp_dvar")),
39  getMaterialProperty<std::vector<RealGradient>>("dPorousFlow_porosity_qp_dgradvar"))
40 {
41 }
const VariableValue & _conc_old
Old value of the concentration variable.
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
d(porosity)/d(grad porous-flow variable) - these derivatives will be wrt grad(vars) at qps ...
const MaterialProperty< Real > & _porosity_old
old value of porosity
const MaterialProperty< std::vector< Real > > & _dporosity_dvar
d(porosity)/d(porous-flow variable) - these derivatives will be wrt variables at the qps ...
const VariableValue & _conc
The concentration variable.
const PorousFlowDictator & _dictator
holds info on the PorousFlow variables
const unsigned int _conc_var_number
The MOOSE variable number of the concentration variable.
const MaterialProperty< Real > & _porosity
porosity at the qps

Member Function Documentation

Real PorousFlowDesorpedMassTimeDerivative::computeQpJac ( unsigned int  jvar) const
protected

Derivative of residual with respect to variable number jvar This is used by both computeQpJacobian and computeQpOffDiagJacobian.

Parameters
jvartake the derivative of the residual wrt this Moose variable

Definition at line 64 of file PorousFlowDesorpedMassTimeDerivative.C.

Referenced by computeQpJacobian(), and computeQpOffDiagJacobian().

65 {
66  Real deriv = 0.0;
67 
68  if (jvar == _conc_var_number)
69  deriv = (1.0 - _porosity[_qp]) * _phi[_j][_qp];
70 
72  return _test[_i][_qp] * deriv / _dt;
73  const unsigned int pvar = _dictator.porousFlowVariableNum(jvar);
74 
75  deriv -= _dporosity_dgradvar[_qp][pvar] * _grad_phi[_j][_qp] * _conc[_qp];
76  deriv -= _dporosity_dvar[_qp][pvar] * _phi[_j][_qp] * _conc[_qp];
77 
78  return _test[_i][_qp] * deriv / _dt;
79 }
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
d(porosity)/d(grad porous-flow variable) - these derivatives will be wrt grad(vars) at qps ...
const MaterialProperty< std::vector< Real > > & _dporosity_dvar
d(porosity)/d(porous-flow variable) - these derivatives will be wrt variables at the qps ...
const VariableValue & _conc
The concentration variable.
const PorousFlowDictator & _dictator
holds info on the PorousFlow variables
const unsigned int _conc_var_number
The MOOSE variable number of the concentration variable.
const MaterialProperty< Real > & _porosity
porosity at the qps
bool notPorousFlowVariable(unsigned int moose_var_num) const
returns true if moose_var_num is not a porous flow variabe
unsigned int porousFlowVariableNum(unsigned int moose_var_num) const
the PorousFlow variable number
Real PorousFlowDesorpedMassTimeDerivative::computeQpJacobian ( )
overrideprotectedvirtual

Definition at line 52 of file PorousFlowDesorpedMassTimeDerivative.C.

53 {
54  return computeQpJac(_var.number());
55 }
Real computeQpJac(unsigned int jvar) const
Derivative of residual with respect to variable number jvar This is used by both computeQpJacobian an...
Real PorousFlowDesorpedMassTimeDerivative::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Definition at line 58 of file PorousFlowDesorpedMassTimeDerivative.C.

59 {
60  return computeQpJac(jvar);
61 }
Real computeQpJac(unsigned int jvar) const
Derivative of residual with respect to variable number jvar This is used by both computeQpJacobian an...
Real PorousFlowDesorpedMassTimeDerivative::computeQpResidual ( )
overrideprotectedvirtual

Definition at line 44 of file PorousFlowDesorpedMassTimeDerivative.C.

45 {
46  Real c = (1.0 - _porosity[_qp]) * _conc[_qp];
47  Real c_old = (1.0 - _porosity_old[_qp]) * _conc_old[_qp];
48  return _test[_i][_qp] * (c - c_old) / _dt;
49 }
const VariableValue & _conc_old
Old value of the concentration variable.
const MaterialProperty< Real > & _porosity_old
old value of porosity
const VariableValue & _conc
The concentration variable.
const MaterialProperty< Real > & _porosity
porosity at the qps

Member Data Documentation

const VariableValue& PorousFlowDesorpedMassTimeDerivative::_conc
protected

The concentration variable.

Definition at line 41 of file PorousFlowDesorpedMassTimeDerivative.h.

Referenced by computeQpJac(), and computeQpResidual().

const VariableValue& PorousFlowDesorpedMassTimeDerivative::_conc_old
protected

Old value of the concentration variable.

Definition at line 44 of file PorousFlowDesorpedMassTimeDerivative.h.

Referenced by computeQpResidual().

const unsigned int PorousFlowDesorpedMassTimeDerivative::_conc_var_number
protected

The MOOSE variable number of the concentration variable.

Definition at line 38 of file PorousFlowDesorpedMassTimeDerivative.h.

Referenced by computeQpJac().

const PorousFlowDictator& PorousFlowDesorpedMassTimeDerivative::_dictator
protected

holds info on the PorousFlow variables

Definition at line 35 of file PorousFlowDesorpedMassTimeDerivative.h.

Referenced by computeQpJac().

const MaterialProperty<std::vector<RealGradient> >& PorousFlowDesorpedMassTimeDerivative::_dporosity_dgradvar
protected

d(porosity)/d(grad porous-flow variable) - these derivatives will be wrt grad(vars) at qps

Definition at line 56 of file PorousFlowDesorpedMassTimeDerivative.h.

Referenced by computeQpJac().

const MaterialProperty<std::vector<Real> >& PorousFlowDesorpedMassTimeDerivative::_dporosity_dvar
protected

d(porosity)/d(porous-flow variable) - these derivatives will be wrt variables at the qps

Definition at line 53 of file PorousFlowDesorpedMassTimeDerivative.h.

Referenced by computeQpJac().

const MaterialProperty<Real>& PorousFlowDesorpedMassTimeDerivative::_porosity
protected

porosity at the qps

Definition at line 47 of file PorousFlowDesorpedMassTimeDerivative.h.

Referenced by computeQpJac(), and computeQpResidual().

const MaterialProperty<Real>& PorousFlowDesorpedMassTimeDerivative::_porosity_old
protected

old value of porosity

Definition at line 50 of file PorousFlowDesorpedMassTimeDerivative.h.

Referenced by computeQpResidual().


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