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

Material designed to provide the porosity in thermo-hydro-mechanical simulations biot + (phi0 - biot) * exp(-vol_strain. More...

#include <PorousFlowPorosityTHM.h>

Inheritance diagram for PorousFlowPorosityTHM:
[legend]

Public Member Functions

 PorousFlowPorosityTHM (const InputParameters &parameters)
 

Protected Member Functions

virtual Real atNegInfinityQp () const override
 Returns "a" at the quadpoint (porosity = a + (b - a) * exp(decay)) More...
 
virtual Real atZeroQp () const override
 Returns "b" at the quadpoint (porosity = a + (b - a) * exp(decay)) More...
 
virtual Real decayQp () const override
 Returns "decay" at the quadpoint (porosity = a + (b - a) * exp(decay)) More...
 
virtual Real ddecayQp_dvar (unsigned pvar) const override
 d(decay)/d(porous-flow variable pvar) More...
 
virtual RealGradient ddecayQp_dgradvar (unsigned pvar) const override
 d(decay)/d(grad(porous-flow variable pvar)) More...
 
virtual void initQpStatefulProperties () override
 
virtual void computeQpProperties () override
 

Protected Attributes

const VariableValue & _phi0
 porosity at zero strain and zero porepressure and zero temperature More...
 
const Real _biot
 biot coefficient More...
 
const Real _exp_coeff
 thermal expansion coefficient of the solid porous skeleton More...
 
const Real _solid_bulk
 drained bulk modulus of the porous skeleton More...
 
const Real _coeff
 short-hand number (biot-1)/solid_bulk More...
 
const VariableValue & _t_reference
 reference temperature More...
 
const VariableValue & _p_reference
 reference porepressure More...
 
const unsigned int _ndisp
 number of displacement variables More...
 
std::vector< unsigned int > _disp_var_num
 variable number of the displacements variables More...
 
const MaterialProperty< Real > & _vol_strain_qp
 strain More...
 
const MaterialProperty< std::vector< RealGradient > > & _dvol_strain_qp_dvar
 d(strain)/(dvar) More...
 
const MaterialProperty< Real > & _pf
 effective porepressure at the quadpoints or nodes More...
 
const MaterialProperty< std::vector< Real > > & _dpf_dvar
 d(effective porepressure)/(d porflow variable) More...
 
const MaterialProperty< Real > & _temperature
 temperature at the quadpoints or nodes More...
 
const MaterialProperty< std::vector< Real > > & _dtemperature_dvar
 d(temperature)/(d porflow variable) More...
 
const bool _strain_at_nearest_qp
 When calculating nodal porosity, use the strain at the nearest quadpoint to the node. More...
 
const bool _ensure_positive
 for decayQp() > 0, porosity can be negative when using porosity = a + (b - a) * exp(decay). More...
 
MaterialProperty< Real > & _porosity
 computed porosity at the nodes or quadpoints More...
 
MaterialProperty< std::vector< Real > > & _dporosity_dvar
 d(porosity)/d(PorousFlow variable) More...
 
MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
 d(porosity)/d(grad PorousFlow variable) More...
 
const unsigned int _num_phases
 Number of phases. More...
 
const unsigned int _num_components
 Number of fluid components. More...
 
const unsigned int _num_var
 Number of PorousFlow variables. More...
 

Detailed Description

Material designed to provide the porosity in thermo-hydro-mechanical simulations biot + (phi0 - biot) * exp(-vol_strain.

Definition at line 25 of file PorousFlowPorosityTHM.h.

Constructor & Destructor Documentation

PorousFlowPorosityTHM::PorousFlowPorosityTHM ( const InputParameters &  parameters)

Definition at line 38 of file PorousFlowPorosityTHM.C.

40 
41  _phi0(_nodal_material ? coupledNodalValue("porosity_zero") : coupledValue("porosity_zero")),
42  _biot(getParam<Real>("biot_coefficient")),
43  _exp_coeff(getParam<Real>("thermal_expansion_coeff")),
44  _solid_bulk(getParam<Real>("solid_bulk")),
45  _coeff((_biot - 1.0) / _solid_bulk),
46 
47  _t_reference(_nodal_material ? coupledNodalValue("reference_temperature")
48  : coupledValue("reference_temperature")),
49  _p_reference(_nodal_material ? coupledNodalValue("reference_porepressure")
50  : coupledValue("reference_porepressure")),
51 
52  _ndisp(coupledComponents("displacements")),
54 
55  _vol_strain_qp(getMaterialProperty<Real>("PorousFlow_total_volumetric_strain_qp")),
56  _dvol_strain_qp_dvar(getMaterialProperty<std::vector<RealGradient>>(
57  "dPorousFlow_total_volumetric_strain_qp_dvar")),
58 
59  _pf(_nodal_material ? getMaterialProperty<Real>("PorousFlow_effective_fluid_pressure_nodal")
60  : getMaterialProperty<Real>("PorousFlow_effective_fluid_pressure_qp")),
61  _dpf_dvar(_nodal_material ? getMaterialProperty<std::vector<Real>>(
62  "dPorousFlow_effective_fluid_pressure_nodal_dvar")
63  : getMaterialProperty<std::vector<Real>>(
64  "dPorousFlow_effective_fluid_pressure_qp_dvar")),
65 
66  _temperature(_nodal_material ? getMaterialProperty<Real>("PorousFlow_temperature_nodal")
67  : getMaterialProperty<Real>("PorousFlow_temperature_qp")),
69  _nodal_material
70  ? getMaterialProperty<std::vector<Real>>("dPorousFlow_temperature_nodal_dvar")
71  : getMaterialProperty<std::vector<Real>>("dPorousFlow_temperature_qp_dvar"))
72 {
73  for (unsigned int i = 0; i < _ndisp; ++i)
74  _disp_var_num[i] = coupled("displacements", i);
75 }
const MaterialProperty< Real > & _pf
effective porepressure at the quadpoints or nodes
const Real _coeff
short-hand number (biot-1)/solid_bulk
const unsigned int _ndisp
number of displacement variables
const MaterialProperty< std::vector< RealGradient > > & _dvol_strain_qp_dvar
d(strain)/(dvar)
const MaterialProperty< std::vector< Real > > & _dtemperature_dvar
d(temperature)/(d porflow variable)
const MaterialProperty< std::vector< Real > > & _dpf_dvar
d(effective porepressure)/(d porflow variable)
const Real _solid_bulk
drained bulk modulus of the porous skeleton
PorousFlowPorosityExponentialBase(const InputParameters &parameters)
const VariableValue & _phi0
porosity at zero strain and zero porepressure and zero temperature
std::vector< unsigned int > _disp_var_num
variable number of the displacements variables
const VariableValue & _p_reference
reference porepressure
const VariableValue & _t_reference
reference temperature
const Real _biot
biot coefficient
const MaterialProperty< Real > & _vol_strain_qp
strain
const MaterialProperty< Real > & _temperature
temperature at the quadpoints or nodes
const Real _exp_coeff
thermal expansion coefficient of the solid porous skeleton

Member Function Documentation

Real PorousFlowPorosityTHM::atNegInfinityQp ( ) const
overrideprotectedvirtual

Returns "a" at the quadpoint (porosity = a + (b - a) * exp(decay))

Implements PorousFlowPorosityExponentialBase.

Definition at line 78 of file PorousFlowPorosityTHM.C.

79 {
80  return _biot;
81 }
const Real _biot
biot coefficient
Real PorousFlowPorosityTHM::atZeroQp ( ) const
overrideprotectedvirtual

Returns "b" at the quadpoint (porosity = a + (b - a) * exp(decay))

Implements PorousFlowPorosityExponentialBase.

Definition at line 84 of file PorousFlowPorosityTHM.C.

85 {
86  return _phi0[_qp];
87 }
const VariableValue & _phi0
porosity at zero strain and zero porepressure and zero temperature
void PorousFlowPorosityExponentialBase::computeQpProperties ( )
overrideprotectedvirtualinherited

Reimplemented in PorousFlowPorosityHMBiotModulus.

Definition at line 60 of file PorousFlowPorosityExponentialBase.C.

61 {
62  const Real a = atNegInfinityQp();
63  const Real b = atZeroQp();
64  const Real decay = decayQp();
65 
66  Real deriv = 0.0; // = d(porosity)/d(decay)
67  if (decay <= 0.0 || !_ensure_positive)
68  {
69  _porosity[_qp] = a + (b - a) * std::exp(decay);
70  deriv = _porosity[_qp] - a;
71  }
72  else
73  {
74  const Real c = std::log(a / (a - b));
75  const Real expx = std::exp(-decay / c);
76  // note that at decay = 0, we have expx = 1, so porosity = a + b - a = b
77  // and at decay = infinity, expx = 0, so porosity = a + (b - a) * a / (a - b) = 0
78  _porosity[_qp] = a + (b - a) * std::exp(c * (1.0 - expx));
79  deriv = (_porosity[_qp] - a) * expx;
80  }
81 
82  _dporosity_dvar[_qp].resize(_num_var);
83  _dporosity_dgradvar[_qp].resize(_num_var);
84  for (unsigned int v = 0; v < _num_var; ++v)
85  {
86  _dporosity_dvar[_qp][v] = ddecayQp_dvar(v) * deriv;
87  _dporosity_dgradvar[_qp][v] = ddecayQp_dgradvar(v) * deriv;
88  }
89 }
const bool _ensure_positive
for decayQp() > 0, porosity can be negative when using porosity = a + (b - a) * exp(decay).
virtual Real atNegInfinityQp() const =0
Returns "a" at the quadpoint (porosity = a + (b - a) * exp(decay))
MaterialProperty< std::vector< Real > > & _dporosity_dvar
d(porosity)/d(PorousFlow variable)
MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
d(porosity)/d(grad PorousFlow variable)
virtual Real decayQp() const =0
Returns "decay" at the quadpoint (porosity = a + (b - a) * exp(decay))
MaterialProperty< Real > & _porosity
computed porosity at the nodes or quadpoints
virtual Real ddecayQp_dvar(unsigned pvar) const =0
d(decay)/d(porous-flow variable pvar)
const unsigned int _num_var
Number of PorousFlow variables.
virtual RealGradient ddecayQp_dgradvar(unsigned pvar) const =0
d(decay)/d(grad(porous-flow variable pvar))
virtual Real atZeroQp() const =0
Returns "b" at the quadpoint (porosity = a + (b - a) * exp(decay))
RealGradient PorousFlowPorosityTHM::ddecayQp_dgradvar ( unsigned  pvar) const
overrideprotectedvirtual

d(decay)/d(grad(porous-flow variable pvar))

Implements PorousFlowPorosityExponentialBase.

Definition at line 110 of file PorousFlowPorosityTHM.C.

111 {
112  const unsigned qp_to_use =
113  (_nodal_material && (_bnd || _strain_at_nearest_qp) ? nearestQP(_qp) : _qp);
114  return -_dvol_strain_qp_dvar[qp_to_use][pvar];
115 }
const MaterialProperty< std::vector< RealGradient > > & _dvol_strain_qp_dvar
d(strain)/(dvar)
const bool _strain_at_nearest_qp
When calculating nodal porosity, use the strain at the nearest quadpoint to the node.
Real PorousFlowPorosityTHM::ddecayQp_dvar ( unsigned  pvar) const
overrideprotectedvirtual

d(decay)/d(porous-flow variable pvar)

Implements PorousFlowPorosityExponentialBase.

Definition at line 104 of file PorousFlowPorosityTHM.C.

105 {
106  return _coeff * _dpf_dvar[_qp][pvar] + _exp_coeff * _dtemperature_dvar[_qp][pvar];
107 }
const Real _coeff
short-hand number (biot-1)/solid_bulk
const MaterialProperty< std::vector< Real > > & _dtemperature_dvar
d(temperature)/(d porflow variable)
const MaterialProperty< std::vector< Real > > & _dpf_dvar
d(effective porepressure)/(d porflow variable)
const Real _exp_coeff
thermal expansion coefficient of the solid porous skeleton
Real PorousFlowPorosityTHM::decayQp ( ) const
overrideprotectedvirtual

Returns "decay" at the quadpoint (porosity = a + (b - a) * exp(decay))

Implements PorousFlowPorosityExponentialBase.

Definition at line 90 of file PorousFlowPorosityTHM.C.

91 {
92  // Note that in the following _strain[_qp] is evaluated at q quadpoint
93  // So _porosity_nodal[_qp], which should be the nodal value of porosity
94  // actually uses the strain at a quadpoint. This
95  // is OK for LINEAR elements, as strain is constant over the element anyway.
96  const unsigned qp_to_use =
97  (_nodal_material && (_bnd || _strain_at_nearest_qp) ? nearestQP(_qp) : _qp);
98 
99  return -_vol_strain_qp[qp_to_use] + _coeff * (_pf[_qp] - _p_reference[_qp]) +
100  _exp_coeff * (_temperature[_qp] - _t_reference[_qp]);
101 }
const MaterialProperty< Real > & _pf
effective porepressure at the quadpoints or nodes
const Real _coeff
short-hand number (biot-1)/solid_bulk
const bool _strain_at_nearest_qp
When calculating nodal porosity, use the strain at the nearest quadpoint to the node.
const VariableValue & _p_reference
reference porepressure
const VariableValue & _t_reference
reference temperature
const MaterialProperty< Real > & _vol_strain_qp
strain
const MaterialProperty< Real > & _temperature
temperature at the quadpoints or nodes
const Real _exp_coeff
thermal expansion coefficient of the solid porous skeleton
void PorousFlowPorosityExponentialBase::initQpStatefulProperties ( )
overrideprotectedvirtualinherited

Definition at line 42 of file PorousFlowPorosityExponentialBase.C.

43 {
44  const Real a = atNegInfinityQp();
45  const Real b = atZeroQp();
46  mooseAssert(a > b, "PorousFlowPorosityExponentialBase a must be larger than b");
47  const Real decay = decayQp();
48 
49  if (decay <= 0.0 || !_ensure_positive)
50  _porosity[_qp] = a + (b - a) * std::exp(decay);
51  else
52  {
53  const Real c = std::log(a / (a - b));
54  const Real expx = std::exp(-decay / c);
55  _porosity[_qp] = a + (b - a) * std::exp(c * (1.0 - expx));
56  }
57 }
const bool _ensure_positive
for decayQp() > 0, porosity can be negative when using porosity = a + (b - a) * exp(decay).
virtual Real atNegInfinityQp() const =0
Returns "a" at the quadpoint (porosity = a + (b - a) * exp(decay))
virtual Real decayQp() const =0
Returns "decay" at the quadpoint (porosity = a + (b - a) * exp(decay))
MaterialProperty< Real > & _porosity
computed porosity at the nodes or quadpoints
virtual Real atZeroQp() const =0
Returns "b" at the quadpoint (porosity = a + (b - a) * exp(decay))

Member Data Documentation

const Real PorousFlowPorosityTHM::_biot
protected

biot coefficient

Definition at line 41 of file PorousFlowPorosityTHM.h.

Referenced by atNegInfinityQp().

const Real PorousFlowPorosityTHM::_coeff
protected

short-hand number (biot-1)/solid_bulk

Definition at line 50 of file PorousFlowPorosityTHM.h.

Referenced by ddecayQp_dvar(), and decayQp().

std::vector<unsigned int> PorousFlowPorosityTHM::_disp_var_num
protected

variable number of the displacements variables

Definition at line 62 of file PorousFlowPorosityTHM.h.

Referenced by PorousFlowPorosityTHM().

const MaterialProperty<std::vector<Real> >& PorousFlowPorosityTHM::_dpf_dvar
protected

d(effective porepressure)/(d porflow variable)

Definition at line 74 of file PorousFlowPorosityTHM.h.

Referenced by ddecayQp_dvar().

MaterialProperty<std::vector<RealGradient> >& PorousFlowPorosityBase::_dporosity_dgradvar
protectedinherited
MaterialProperty<std::vector<Real> >& PorousFlowPorosityBase::_dporosity_dvar
protectedinherited
const MaterialProperty<std::vector<Real> >& PorousFlowPorosityTHM::_dtemperature_dvar
protected

d(temperature)/(d porflow variable)

Definition at line 80 of file PorousFlowPorosityTHM.h.

Referenced by ddecayQp_dvar().

const MaterialProperty<std::vector<RealGradient> >& PorousFlowPorosityTHM::_dvol_strain_qp_dvar
protected

d(strain)/(dvar)

Definition at line 68 of file PorousFlowPorosityTHM.h.

Referenced by ddecayQp_dgradvar().

const bool PorousFlowPorosityExponentialBase::_ensure_positive
protectedinherited

for decayQp() > 0, porosity can be negative when using porosity = a + (b - a) * exp(decay).

This expression is modified if ensure_positive = true to read porosity = a + (b - a) * exp(c * (1 - Exp(- decay / c))) where c = log(a/(b-a))

Definition at line 70 of file PorousFlowPorosityExponentialBase.h.

Referenced by PorousFlowPorosityExponentialBase::computeQpProperties(), and PorousFlowPorosityExponentialBase::initQpStatefulProperties().

const Real PorousFlowPorosityTHM::_exp_coeff
protected

thermal expansion coefficient of the solid porous skeleton

Definition at line 44 of file PorousFlowPorosityTHM.h.

Referenced by ddecayQp_dvar(), and decayQp().

const unsigned int PorousFlowPorosityTHM::_ndisp
protected

number of displacement variables

Definition at line 59 of file PorousFlowPorosityTHM.h.

Referenced by PorousFlowPorosityTHM().

const unsigned int PorousFlowMaterialVectorBase::_num_components
protectedinherited
const unsigned int PorousFlowMaterialVectorBase::_num_phases
protectedinherited
const unsigned int PorousFlowMaterialVectorBase::_num_var
protectedinherited
const VariableValue& PorousFlowPorosityTHM::_p_reference
protected

reference porepressure

Definition at line 56 of file PorousFlowPorosityTHM.h.

Referenced by decayQp().

const MaterialProperty<Real>& PorousFlowPorosityTHM::_pf
protected

effective porepressure at the quadpoints or nodes

Definition at line 71 of file PorousFlowPorosityTHM.h.

Referenced by decayQp().

const VariableValue& PorousFlowPorosityTHM::_phi0
protected

porosity at zero strain and zero porepressure and zero temperature

Definition at line 38 of file PorousFlowPorosityTHM.h.

Referenced by atZeroQp().

MaterialProperty<Real>& PorousFlowPorosityBase::_porosity
protectedinherited
const Real PorousFlowPorosityTHM::_solid_bulk
protected

drained bulk modulus of the porous skeleton

Definition at line 47 of file PorousFlowPorosityTHM.h.

const bool PorousFlowPorosityExponentialBase::_strain_at_nearest_qp
protectedinherited
const VariableValue& PorousFlowPorosityTHM::_t_reference
protected

reference temperature

Definition at line 53 of file PorousFlowPorosityTHM.h.

Referenced by decayQp().

const MaterialProperty<Real>& PorousFlowPorosityTHM::_temperature
protected

temperature at the quadpoints or nodes

Definition at line 77 of file PorousFlowPorosityTHM.h.

Referenced by decayQp().

const MaterialProperty<Real>& PorousFlowPorosityTHM::_vol_strain_qp
protected

strain

Definition at line 65 of file PorousFlowPorosityTHM.h.

Referenced by decayQp().


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