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

Kernel = desorped_mass * d(volumetric_strain)/dt which is not lumped to the nodes. More...

#include <PorousFlowDesorpedMassVolumetricExpansion.h>

Inheritance diagram for PorousFlowDesorpedMassVolumetricExpansion:
[legend]

Public Member Functions

 PorousFlowDesorpedMassVolumetricExpansion (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 the residual with respect to the Moose variable with variable number jvar. 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 MaterialProperty< Real > & _porosity
 Porosity. More...
 
const MaterialProperty< std::vector< Real > > & _dporosity_dvar
 d(porosity)/d(PorousFlow variable) More...
 
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
 d(porosity)/d(grad PorousFlow variable) More...
 
const MaterialProperty< Real > & _strain_rate_qp
 strain rate More...
 
const MaterialProperty< std::vector< RealGradient > > & _dstrain_rate_qp_dvar
 d(strain rate)/d(PorousFlow variable) More...
 

Detailed Description

Kernel = desorped_mass * d(volumetric_strain)/dt which is not lumped to the nodes.

Definition at line 25 of file PorousFlowDesorpedMassVolumetricExpansion.h.

Constructor & Destructor Documentation

◆ PorousFlowDesorpedMassVolumetricExpansion()

PorousFlowDesorpedMassVolumetricExpansion::PorousFlowDesorpedMassVolumetricExpansion ( const InputParameters &  parameters)

Definition at line 29 of file PorousFlowDesorpedMassVolumetricExpansion.C.

31  : TimeKernel(parameters),
32  _dictator(getUserObject<PorousFlowDictator>("PorousFlowDictator")),
33  _conc_var_number(coupled("conc_var")),
34  _conc(coupledValue("conc_var")),
35  _porosity(getMaterialProperty<Real>("PorousFlow_porosity_qp")),
36  _dporosity_dvar(getMaterialProperty<std::vector<Real>>("dPorousFlow_porosity_qp_dvar")),
38  getMaterialProperty<std::vector<RealGradient>>("dPorousFlow_porosity_qp_dgradvar")),
39  _strain_rate_qp(getMaterialProperty<Real>("PorousFlow_volumetric_strain_rate_qp")),
40  _dstrain_rate_qp_dvar(getMaterialProperty<std::vector<RealGradient>>(
41  "dPorousFlow_volumetric_strain_rate_qp_dvar"))
42 {
43 }
const MaterialProperty< Real > & _strain_rate_qp
strain rate
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
d(porosity)/d(grad PorousFlow variable)
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
const unsigned int _conc_var_number
The MOOSE variable number of the concentration variable.
const MaterialProperty< std::vector< Real > > & _dporosity_dvar
d(porosity)/d(PorousFlow variable)
const MaterialProperty< std::vector< RealGradient > > & _dstrain_rate_qp_dvar
d(strain rate)/d(PorousFlow variable)
const VariableValue & _conc
The concentration variable.

Member Function Documentation

◆ computeQpJac()

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

Derivative of the residual with respect to the Moose variable with variable number jvar.

Parameters
jvartake the derivative of the mass part of the residual wrt this variable number

Definition at line 64 of file PorousFlowDesorpedMassVolumetricExpansion.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] * _strain_rate_qp[_qp];
70 
72  return _test[_i][_qp] * deriv;
73  const unsigned int pvar = _dictator.porousFlowVariableNum(jvar);
74 
75  deriv -= _dporosity_dgradvar[_qp][pvar] * _grad_phi[_j][_qp] * _conc[_qp] * _strain_rate_qp[_qp];
76  deriv -= _dporosity_dvar[_qp][pvar] * _phi[_j][_qp] * _conc[_qp] * _strain_rate_qp[_qp];
77  deriv +=
78  (1.0 - _porosity[_qp]) * _conc[_qp] * _dstrain_rate_qp_dvar[_qp][pvar] * _grad_phi[_j][_qp];
79 
80  return _test[_i][_qp] * deriv;
81 }
bool notPorousFlowVariable(unsigned int moose_var_num) const
Returns true if moose_var_num is not a porous flow variabe.
const MaterialProperty< Real > & _strain_rate_qp
strain rate
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
d(porosity)/d(grad PorousFlow variable)
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
const unsigned int _conc_var_number
The MOOSE variable number of the concentration variable.
const MaterialProperty< std::vector< Real > > & _dporosity_dvar
d(porosity)/d(PorousFlow variable)
const MaterialProperty< std::vector< RealGradient > > & _dstrain_rate_qp_dvar
d(strain rate)/d(PorousFlow variable)
const VariableValue & _conc
The concentration variable.
unsigned int porousFlowVariableNum(unsigned int moose_var_num) const
The PorousFlow variable number.

◆ computeQpJacobian()

Real PorousFlowDesorpedMassVolumetricExpansion::computeQpJacobian ( )
overrideprotectedvirtual

Definition at line 52 of file PorousFlowDesorpedMassVolumetricExpansion.C.

53 {
54  return computeQpJac(_var.number());
55 }
Real computeQpJac(unsigned int jvar) const
Derivative of the residual with respect to the Moose variable with variable number jvar...

◆ computeQpOffDiagJacobian()

Real PorousFlowDesorpedMassVolumetricExpansion::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Definition at line 58 of file PorousFlowDesorpedMassVolumetricExpansion.C.

59 {
60  return computeQpJac(jvar);
61 }
Real computeQpJac(unsigned int jvar) const
Derivative of the residual with respect to the Moose variable with variable number jvar...

◆ computeQpResidual()

Real PorousFlowDesorpedMassVolumetricExpansion::computeQpResidual ( )
overrideprotectedvirtual

Definition at line 46 of file PorousFlowDesorpedMassVolumetricExpansion.C.

47 {
48  return _test[_i][_qp] * (1.0 - _porosity[_qp]) * _conc[_qp] * _strain_rate_qp[_qp];
49 }
const MaterialProperty< Real > & _strain_rate_qp
strain rate
const VariableValue & _conc
The concentration variable.

Member Data Documentation

◆ _conc

const VariableValue& PorousFlowDesorpedMassVolumetricExpansion::_conc
protected

The concentration variable.

Definition at line 42 of file PorousFlowDesorpedMassVolumetricExpansion.h.

Referenced by computeQpJac(), and computeQpResidual().

◆ _conc_var_number

const unsigned int PorousFlowDesorpedMassVolumetricExpansion::_conc_var_number
protected

The MOOSE variable number of the concentration variable.

Definition at line 39 of file PorousFlowDesorpedMassVolumetricExpansion.h.

Referenced by computeQpJac().

◆ _dictator

const PorousFlowDictator& PorousFlowDesorpedMassVolumetricExpansion::_dictator
protected

PorousFlowDictator UserObject.

Definition at line 36 of file PorousFlowDesorpedMassVolumetricExpansion.h.

Referenced by computeQpJac().

◆ _dporosity_dgradvar

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

d(porosity)/d(grad PorousFlow variable)

Definition at line 51 of file PorousFlowDesorpedMassVolumetricExpansion.h.

Referenced by computeQpJac().

◆ _dporosity_dvar

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

d(porosity)/d(PorousFlow variable)

Definition at line 48 of file PorousFlowDesorpedMassVolumetricExpansion.h.

Referenced by computeQpJac().

◆ _dstrain_rate_qp_dvar

const MaterialProperty<std::vector<RealGradient> >& PorousFlowDesorpedMassVolumetricExpansion::_dstrain_rate_qp_dvar
protected

d(strain rate)/d(PorousFlow variable)

Definition at line 57 of file PorousFlowDesorpedMassVolumetricExpansion.h.

Referenced by computeQpJac().

◆ _porosity

const MaterialProperty<Real>& PorousFlowDesorpedMassVolumetricExpansion::_porosity
protected

Porosity.

Definition at line 45 of file PorousFlowDesorpedMassVolumetricExpansion.h.

Referenced by computeQpJac(), and computeQpResidual().

◆ _strain_rate_qp

const MaterialProperty<Real>& PorousFlowDesorpedMassVolumetricExpansion::_strain_rate_qp
protected

strain rate

Definition at line 54 of file PorousFlowDesorpedMassVolumetricExpansion.h.

Referenced by computeQpJac(), and computeQpResidual().


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