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
 PorousFlowDictator UserObject. 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(PorousFlow variable) - these derivatives will be wrt variables at the qps More...
 
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
 d(porosity)/d(grad PorousFlow 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::PorousFlowDesorpedMassTimeDerivative ( const InputParameters &  parameters)

Definition at line 31 of file PorousFlowDesorpedMassTimeDerivative.C.

33  : TimeKernel(parameters),
34  _dictator(getUserObject<PorousFlowDictator>("PorousFlowDictator")),
35  _conc_var_number(coupled("conc_var")),
36  _conc(coupledValue("conc_var")),
37  _conc_old(coupledValueOld("conc_var")),
38  _porosity(getMaterialProperty<Real>("PorousFlow_porosity_qp")),
39  _porosity_old(getMaterialPropertyOld<Real>("PorousFlow_porosity_qp")),
40  _dporosity_dvar(getMaterialProperty<std::vector<Real>>("dPorousFlow_porosity_qp_dvar")),
42  getMaterialProperty<std::vector<RealGradient>>("dPorousFlow_porosity_qp_dgradvar"))
43 {
44 }

Member Function Documentation

◆ computeQpJac()

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 67 of file PorousFlowDesorpedMassTimeDerivative.C.

68 {
69  Real deriv = 0.0;
70 
71  if (jvar == _conc_var_number)
72  deriv = (1.0 - _porosity[_qp]) * _phi[_j][_qp];
73 
75  return _test[_i][_qp] * deriv / _dt;
76  const unsigned int pvar = _dictator.porousFlowVariableNum(jvar);
77 
78  deriv -= _dporosity_dgradvar[_qp][pvar] * _grad_phi[_j][_qp] * _conc[_qp];
79  deriv -= _dporosity_dvar[_qp][pvar] * _phi[_j][_qp] * _conc[_qp];
80 
81  return _test[_i][_qp] * deriv / _dt;
82 }

Referenced by computeQpJacobian(), and computeQpOffDiagJacobian().

◆ computeQpJacobian()

Real PorousFlowDesorpedMassTimeDerivative::computeQpJacobian ( )
overrideprotectedvirtual

Definition at line 55 of file PorousFlowDesorpedMassTimeDerivative.C.

56 {
57  return computeQpJac(_var.number());
58 }

◆ computeQpOffDiagJacobian()

Real PorousFlowDesorpedMassTimeDerivative::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Definition at line 61 of file PorousFlowDesorpedMassTimeDerivative.C.

62 {
63  return computeQpJac(jvar);
64 }

◆ computeQpResidual()

Real PorousFlowDesorpedMassTimeDerivative::computeQpResidual ( )
overrideprotectedvirtual

Definition at line 47 of file PorousFlowDesorpedMassTimeDerivative.C.

48 {
49  Real c = (1.0 - _porosity[_qp]) * _conc[_qp];
50  Real c_old = (1.0 - _porosity_old[_qp]) * _conc_old[_qp];
51  return _test[_i][_qp] * (c - c_old) / _dt;
52 }

Member Data Documentation

◆ _conc

const VariableValue& PorousFlowDesorpedMassTimeDerivative::_conc
protected

The concentration variable.

Definition at line 41 of file PorousFlowDesorpedMassTimeDerivative.h.

Referenced by computeQpJac(), and computeQpResidual().

◆ _conc_old

const VariableValue& PorousFlowDesorpedMassTimeDerivative::_conc_old
protected

Old value of the concentration variable.

Definition at line 44 of file PorousFlowDesorpedMassTimeDerivative.h.

Referenced by computeQpResidual().

◆ _conc_var_number

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().

◆ _dictator

const PorousFlowDictator& PorousFlowDesorpedMassTimeDerivative::_dictator
protected

PorousFlowDictator UserObject.

Definition at line 35 of file PorousFlowDesorpedMassTimeDerivative.h.

Referenced by computeQpJac().

◆ _dporosity_dgradvar

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

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

Definition at line 56 of file PorousFlowDesorpedMassTimeDerivative.h.

Referenced by computeQpJac().

◆ _dporosity_dvar

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

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

Definition at line 53 of file PorousFlowDesorpedMassTimeDerivative.h.

Referenced by computeQpJac().

◆ _porosity

const MaterialProperty<Real>& PorousFlowDesorpedMassTimeDerivative::_porosity
protected

Porosity at the qps.

Definition at line 47 of file PorousFlowDesorpedMassTimeDerivative.h.

Referenced by computeQpJac(), and computeQpResidual().

◆ _porosity_old

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:
PorousFlowDesorpedMassTimeDerivative::_conc_old
const VariableValue & _conc_old
Old value of the concentration variable.
Definition: PorousFlowDesorpedMassTimeDerivative.h:44
PorousFlowDictator::notPorousFlowVariable
bool notPorousFlowVariable(unsigned int moose_var_num) const
Returns true if moose_var_num is not a porous flow variabe.
Definition: PorousFlowDictator.C:161
PorousFlowDesorpedMassTimeDerivative::computeQpJac
Real computeQpJac(unsigned int jvar) const
Derivative of residual with respect to variable number jvar This is used by both computeQpJacobian an...
Definition: PorousFlowDesorpedMassTimeDerivative.C:67
PorousFlowDictator::porousFlowVariableNum
unsigned int porousFlowVariableNum(unsigned int moose_var_num) const
The PorousFlow variable number.
Definition: PorousFlowDictator.C:135
PorousFlowDesorpedMassTimeDerivative::_porosity
const MaterialProperty< Real > & _porosity
Porosity at the qps.
Definition: PorousFlowDesorpedMassTimeDerivative.h:47
PorousFlowDesorpedMassTimeDerivative::_dictator
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
Definition: PorousFlowDesorpedMassTimeDerivative.h:35
PorousFlowDesorpedMassTimeDerivative::_conc_var_number
const unsigned int _conc_var_number
The MOOSE variable number of the concentration variable.
Definition: PorousFlowDesorpedMassTimeDerivative.h:38
PorousFlowDesorpedMassTimeDerivative::_dporosity_dvar
const MaterialProperty< std::vector< Real > > & _dporosity_dvar
d(porosity)/d(PorousFlow variable) - these derivatives will be wrt variables at the qps
Definition: PorousFlowDesorpedMassTimeDerivative.h:53
PorousFlowDesorpedMassTimeDerivative::_porosity_old
const MaterialProperty< Real > & _porosity_old
Old value of porosity.
Definition: PorousFlowDesorpedMassTimeDerivative.h:50
PorousFlowDesorpedMassTimeDerivative::_conc
const VariableValue & _conc
The concentration variable.
Definition: PorousFlowDesorpedMassTimeDerivative.h:41
PorousFlowDesorpedMassTimeDerivative::_dporosity_dgradvar
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
d(porosity)/d(grad PorousFlow variable) - these derivatives will be wrt grad(vars) at qps
Definition: PorousFlowDesorpedMassTimeDerivative.h:56