www.mooseframework.org
PoroFullSatMaterial.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "PoroFullSatMaterial.h"
11 
13 
16 {
18 
19  params.addRequiredParam<Real>(
20  "porosity0",
21  "The porosity of the material when porepressure and volumetric strain are zero. Eg, 0.1");
22  params.addRequiredRangeCheckedParam<Real>("biot_coefficient",
23  "biot_coefficient>=0 & biot_coefficient<=1",
24  "The Biot coefficient. Eg, 0.9");
26  "solid_bulk_compliance",
27  "solid_bulk_compliance>=0",
28  "The solid bulk compliance (the reciprocal of the solid bulk modulus)");
30  "fluid_bulk_compliance",
31  "fluid_bulk_compliance>=0",
32  "The fluid bulk compliance (the reciprocal of the fluid bulk modulus)");
33  params.addRequiredCoupledVar("porepressure", "The porepressure");
34  params.addRequiredCoupledVar(
35  "displacements",
36  "The displacements appropriate for the simulation geometry and coordinate system");
37  params.addParam<bool>("constant_porosity", false, "Set the porosity equal to porosity0 always");
38  params.addClassDescription("This Material is designed to calculate and store all the quantities "
39  "needed for the fluid-flow part of poromechanics, assuming a "
40  "fully-saturated, single-phase fluid with constant bulk modulus");
41  return params;
42 }
43 
46 
47  _phi0(getParam<Real>("porosity0")),
48  _alpha(getParam<Real>("biot_coefficient")),
49  _one_over_K(getParam<Real>("solid_bulk_compliance")),
50  _one_over_Kf(getParam<Real>("fluid_bulk_compliance")),
51  _constant_porosity(getParam<bool>("constant_porosity")),
52 
53  _porepressure(coupledValue("porepressure")),
54  _porepressure_name(coupledName("porepressure", 0)),
55 
56  _ndisp(coupledComponents("displacements")),
57  _grad_disp(_ndisp),
58 
59  _vol_strain(declareProperty<Real>("volumetric_strain")),
60 
61  _biot_coefficient(declareProperty<Real>("biot_coefficient")),
62 
63  _porosity(declareProperty<Real>("porosity")),
64  _dporosity_dP(declarePropertyDerivative<Real>("porosity", _porepressure_name)),
65  _dporosity_dep(declarePropertyDerivative<Real>("porosity", "volumetric_strain")),
66 
67  _one_over_biot_modulus(declareProperty<Real>("one_over_biot_modulus")),
68  _done_over_biot_modulus_dP(
69  declarePropertyDerivative<Real>("one_over_biot_modulus", _porepressure_name)),
70  _done_over_biot_modulus_dep(
71  declarePropertyDerivative<Real>("one_over_biot_modulus", "volumetric_strain"))
72 {
73  for (unsigned int i = 0; i < _ndisp; ++i)
74  _grad_disp[i] = &coupledGradient("displacements", i);
75 }
76 
77 void
79 {
80  _vol_strain[_qp] = 0.0;
81 }
82 
83 void
85 {
87 
88  _vol_strain[_qp] = 0;
89  for (unsigned i = 0; i < _ndisp; ++i)
90  _vol_strain[_qp] += (*_grad_disp[i])[_qp](i); // cartesian coordinates?
91 
93  {
94  _porosity[_qp] = _phi0;
95  _dporosity_dP[_qp] = 0;
96  _dporosity_dep[_qp] = 0;
97 
102  }
103  else
104  {
105  _porosity[_qp] =
106  _alpha + (_phi0 - _alpha) *
107  std::exp(-(1 - _alpha) * _one_over_K * _porepressure[_qp] - _vol_strain[_qp]);
108  _dporosity_dP[_qp] =
109  (_phi0 - _alpha) * (_alpha - 1) * _one_over_K *
110  std::exp(-(1 - _alpha) * _one_over_K * _porepressure[_qp] - _vol_strain[_qp]);
112  -(_phi0 - _alpha) *
113  std::exp(-(1 - _alpha) * _one_over_K * _porepressure[_qp] - _vol_strain[_qp]);
114 
121  }
122 }
virtual void initQpStatefulProperties()
void addRequiredRangeCheckedParam(const std::string &name, const std::string &parsed_function, const std::string &doc_string)
unsigned int _ndisp
number of displacement variables supplied
Real _one_over_K
1/K, where K is the solid bulk modulus. Usually 1/K = C_iijj, where C is the compliance matrix: strai...
virtual void computeQpProperties()
MaterialProperty< Real > & _one_over_biot_modulus
1/M, where M is the Biot modulus
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
Material designed to calculate and store all the quantities needed for the fluid-flow part of poromec...
bool _constant_porosity
whether to use constant porosity (set _porosity = _phi0 always)
MaterialProperty< Real > & _biot_coefficient
Biot coefficient.
static InputParameters validParams()
MaterialProperty< Real > & _done_over_biot_modulus_dep
d(1/M)/d(volumetric_strain)
virtual const VariableGradient & coupledGradient(const std::string &var_name, unsigned int comp=0) const
void addRequiredParam(const std::string &name, const std::string &doc_string)
Real _alpha
Biot coefficient.
static InputParameters validParams()
std::vector< const VariableGradient * > _grad_disp
grad(displacement)
const VariableValue & _porepressure
porepressure variable
Real _one_over_Kf
1/Kf, where Kf is the fluid bulk modulus.
MaterialProperty< Real > & _vol_strain
volumetric strain = strain_ii
Real _phi0
porosity at zero porepressure and volumetric strain
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
registerMooseObject("RichardsApp", PoroFullSatMaterial)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MaterialProperty< Real > & _porosity
porosity
MaterialProperty< Real > & _dporosity_dep
d(porosity)/d(volumetric_strain)
void addClassDescription(const std::string &doc_string)
MaterialProperty< Real > & _dporosity_dP
d(porosity)/d(porepressure)
MaterialProperty< Real > & _done_over_biot_modulus_dP
d(1/M)/d(porepressure)
PoroFullSatMaterial(const InputParameters &parameters)