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 25 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 }
const VariableValue & _conc_old
Old value of the concentration variable.
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
d(porosity)/d(grad PorousFlow 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(PorousFlow variable) - these derivatives will be wrt variables at the qps ...
const VariableValue & _conc
The concentration variable.
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
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

◆ 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.

Referenced by computeQpJacobian(), and computeQpOffDiagJacobian().

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 }
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
d(porosity)/d(grad PorousFlow variable) - these derivatives will be wrt grad(vars) at qps ...
bool notPorousFlowVariable(unsigned int moose_var_num) const
Returns true if moose_var_num is not a porous flow variabe.
const MaterialProperty< std::vector< Real > > & _dporosity_dvar
d(porosity)/d(PorousFlow variable) - these derivatives will be wrt variables at the qps ...
const VariableValue & _conc
The concentration variable.
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
const unsigned int _conc_var_number
The MOOSE variable number of the concentration variable.
const MaterialProperty< Real > & _porosity
Porosity at the qps.
unsigned int porousFlowVariableNum(unsigned int moose_var_num) const
The PorousFlow variable number.

◆ computeQpJacobian()

Real PorousFlowDesorpedMassTimeDerivative::computeQpJacobian ( )
overrideprotectedvirtual

Definition at line 55 of file PorousFlowDesorpedMassTimeDerivative.C.

56 {
57  return computeQpJac(_var.number());
58 }
Real computeQpJac(unsigned int jvar) const
Derivative of residual with respect to variable number jvar This is used by both computeQpJacobian an...

◆ computeQpOffDiagJacobian()

Real PorousFlowDesorpedMassTimeDerivative::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Definition at line 61 of file PorousFlowDesorpedMassTimeDerivative.C.

62 {
63  return computeQpJac(jvar);
64 }
Real computeQpJac(unsigned int jvar) const
Derivative of residual with respect to variable number jvar This is used by both computeQpJacobian an...

◆ 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 }
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

◆ _conc

const VariableValue& PorousFlowDesorpedMassTimeDerivative::_conc
protected

The concentration variable.

Definition at line 42 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 45 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 39 of file PorousFlowDesorpedMassTimeDerivative.h.

Referenced by computeQpJac().

◆ _dictator

const PorousFlowDictator& PorousFlowDesorpedMassTimeDerivative::_dictator
protected

PorousFlowDictator UserObject.

Definition at line 36 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 57 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 54 of file PorousFlowDesorpedMassTimeDerivative.h.

Referenced by computeQpJac().

◆ _porosity

const MaterialProperty<Real>& PorousFlowDesorpedMassTimeDerivative::_porosity
protected

Porosity at the qps.

Definition at line 48 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 51 of file PorousFlowDesorpedMassTimeDerivative.h.

Referenced by computeQpResidual().


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