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
 holds info on the Porous Flow 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 MaterialProperty< Real > & _porosity
 porosity More...
 
const MaterialProperty< std::vector< Real > > & _dporosity_dvar
 d(porosity)/d(porous-flow variable) More...
 
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
 d(porosity)/d(grad porous-flow variable) More...
 
const MaterialProperty< Real > & _strain_rate_qp
 strain rate More...
 
const MaterialProperty< std::vector< RealGradient > > & _dstrain_rate_qp_dvar
 d(strain rate)/d(porous-flow variable) More...
 

Detailed Description

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

Definition at line 24 of file PorousFlowDesorpedMassVolumetricExpansion.h.

Constructor & Destructor Documentation

PorousFlowDesorpedMassVolumetricExpansion::PorousFlowDesorpedMassVolumetricExpansion ( const InputParameters &  parameters)

Definition at line 26 of file PorousFlowDesorpedMassVolumetricExpansion.C.

28  : TimeKernel(parameters),
29  _dictator(getUserObject<PorousFlowDictator>("PorousFlowDictator")),
30  _conc_var_number(coupled("conc_var")),
31  _conc(coupledValue("conc_var")),
32  _porosity(getMaterialProperty<Real>("PorousFlow_porosity_qp")),
33  _dporosity_dvar(getMaterialProperty<std::vector<Real>>("dPorousFlow_porosity_qp_dvar")),
35  getMaterialProperty<std::vector<RealGradient>>("dPorousFlow_porosity_qp_dgradvar")),
36  _strain_rate_qp(getMaterialProperty<Real>("PorousFlow_volumetric_strain_rate_qp")),
37  _dstrain_rate_qp_dvar(getMaterialProperty<std::vector<RealGradient>>(
38  "dPorousFlow_volumetric_strain_rate_qp_dvar"))
39 {
40 }
const MaterialProperty< Real > & _strain_rate_qp
strain rate
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
d(porosity)/d(grad porous-flow variable)
const PorousFlowDictator & _dictator
holds info on the Porous Flow variables
const unsigned int _conc_var_number
The MOOSE variable number of the concentration variable.
const MaterialProperty< std::vector< Real > > & _dporosity_dvar
d(porosity)/d(porous-flow variable)
const MaterialProperty< std::vector< RealGradient > > & _dstrain_rate_qp_dvar
d(strain rate)/d(porous-flow variable)
const VariableValue & _conc
The concentration variable.

Member Function Documentation

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 61 of file PorousFlowDesorpedMassVolumetricExpansion.C.

Referenced by computeQpJacobian(), and computeQpOffDiagJacobian().

62 {
63  Real deriv = 0.0;
64 
65  if (jvar == _conc_var_number)
66  deriv = (1.0 - _porosity[_qp]) * _phi[_j][_qp] * _strain_rate_qp[_qp];
67 
69  return _test[_i][_qp] * deriv;
70  const unsigned int pvar = _dictator.porousFlowVariableNum(jvar);
71 
72  deriv -= _dporosity_dgradvar[_qp][pvar] * _grad_phi[_j][_qp] * _conc[_qp] * _strain_rate_qp[_qp];
73  deriv -= _dporosity_dvar[_qp][pvar] * _phi[_j][_qp] * _conc[_qp] * _strain_rate_qp[_qp];
74  deriv +=
75  (1.0 - _porosity[_qp]) * _conc[_qp] * _dstrain_rate_qp_dvar[_qp][pvar] * _grad_phi[_j][_qp];
76 
77  return _test[_i][_qp] * deriv;
78 }
const MaterialProperty< Real > & _strain_rate_qp
strain rate
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
d(porosity)/d(grad porous-flow variable)
const PorousFlowDictator & _dictator
holds info on the Porous Flow variables
const unsigned int _conc_var_number
The MOOSE variable number of the concentration variable.
const MaterialProperty< std::vector< Real > > & _dporosity_dvar
d(porosity)/d(porous-flow variable)
const MaterialProperty< std::vector< RealGradient > > & _dstrain_rate_qp_dvar
d(strain rate)/d(porous-flow variable)
const VariableValue & _conc
The concentration variable.
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 PorousFlowDesorpedMassVolumetricExpansion::computeQpJacobian ( )
overrideprotectedvirtual

Definition at line 49 of file PorousFlowDesorpedMassVolumetricExpansion.C.

50 {
51  return computeQpJac(_var.number());
52 }
Real computeQpJac(unsigned int jvar) const
Derivative of the residual with respect to the Moose variable with variable number jvar...
Real PorousFlowDesorpedMassVolumetricExpansion::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Definition at line 55 of file PorousFlowDesorpedMassVolumetricExpansion.C.

56 {
57  return computeQpJac(jvar);
58 }
Real computeQpJac(unsigned int jvar) const
Derivative of the residual with respect to the Moose variable with variable number jvar...
Real PorousFlowDesorpedMassVolumetricExpansion::computeQpResidual ( )
overrideprotectedvirtual

Definition at line 43 of file PorousFlowDesorpedMassVolumetricExpansion.C.

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

Member Data Documentation

const VariableValue& PorousFlowDesorpedMassVolumetricExpansion::_conc
protected

The concentration variable.

Definition at line 41 of file PorousFlowDesorpedMassVolumetricExpansion.h.

Referenced by computeQpJac(), and computeQpResidual().

const unsigned int PorousFlowDesorpedMassVolumetricExpansion::_conc_var_number
protected

The MOOSE variable number of the concentration variable.

Definition at line 38 of file PorousFlowDesorpedMassVolumetricExpansion.h.

Referenced by computeQpJac().

const PorousFlowDictator& PorousFlowDesorpedMassVolumetricExpansion::_dictator
protected

holds info on the Porous Flow variables

Definition at line 35 of file PorousFlowDesorpedMassVolumetricExpansion.h.

Referenced by computeQpJac().

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

d(porosity)/d(grad porous-flow variable)

Definition at line 50 of file PorousFlowDesorpedMassVolumetricExpansion.h.

Referenced by computeQpJac().

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

d(porosity)/d(porous-flow variable)

Definition at line 47 of file PorousFlowDesorpedMassVolumetricExpansion.h.

Referenced by computeQpJac().

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

d(strain rate)/d(porous-flow variable)

Definition at line 56 of file PorousFlowDesorpedMassVolumetricExpansion.h.

Referenced by computeQpJac().

const MaterialProperty<Real>& PorousFlowDesorpedMassVolumetricExpansion::_porosity
protected

porosity

Definition at line 44 of file PorousFlowDesorpedMassVolumetricExpansion.h.

Referenced by computeQpJac(), and computeQpResidual().

const MaterialProperty<Real>& PorousFlowDesorpedMassVolumetricExpansion::_strain_rate_qp
protected

strain rate

Definition at line 53 of file PorousFlowDesorpedMassVolumetricExpansion.h.

Referenced by computeQpJac(), and computeQpResidual().


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