www.mooseframework.org
PoroFullSatTimeDerivative.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
9 
10 template <>
11 InputParameters
13 {
14  InputParameters params = validParams<TimeDerivative>();
15  params.addRequiredCoupledVar(
16  "displacements",
17  "The displacements appropriate for the simulation geometry and coordinate system");
18  params.addClassDescription("Kernel = biot_coefficient*d(volumetric_strain)/dt + "
19  "(1/biot_modulus)*d(porepressure)/dt. This is the time-derivative "
20  "for poromechanics for a single-phase, fully-saturated fluid with "
21  "constant bulk modulus");
22  return params;
23 }
24 
25 PoroFullSatTimeDerivative::PoroFullSatTimeDerivative(const InputParameters & parameters)
26  : DerivativeMaterialInterface<TimeDerivative>(parameters),
27  _u_old(valueOld()),
28  _volstrain(getMaterialProperty<Real>("volumetric_strain")),
29  _volstrain_old(getMaterialPropertyOld<Real>("volumetric_strain")),
30 
31  _ndisp(coupledComponents("displacements")),
32  _disp_var_num(_ndisp),
33 
34  _alpha(getMaterialProperty<Real>("biot_coefficient")),
35 
36  _one_over_biot_modulus(getMaterialProperty<Real>("one_over_biot_modulus")),
37  _done_over_biot_modulus_dP(
38  getMaterialPropertyDerivative<Real>("one_over_biot_modulus", _var.name())),
39  _done_over_biot_modulus_dep(
40  getMaterialPropertyDerivative<Real>("one_over_biot_modulus", "volumetric_strain"))
41 {
42  for (unsigned i = 0; i < _ndisp; ++i)
43  _disp_var_num[i] = coupled("displacements", i);
44 }
45 
46 Real
48 {
49  // here, "_u" is the porepressure
50  Real res = _one_over_biot_modulus[_qp] * (_u[_qp] - _u_old[_qp]);
51  res += _alpha[_qp] * (_volstrain[_qp] - _volstrain_old[_qp]);
52  return _test[_i][_qp] * res / _dt;
53 }
54 
55 Real
57 {
58  Real jac = _one_over_biot_modulus[_qp] * _phi[_j][_qp];
59  jac += _done_over_biot_modulus_dP[_qp] * _phi[_j][_qp] * (_u[_qp] - _u_old[_qp]);
60  return _test[_i][_qp] * jac / _dt;
61 }
62 
63 Real
65 {
66  Real jac = 0;
67  for (unsigned i = 0; i < _ndisp; ++i)
68  if (jvar == _disp_var_num[i])
69  jac = _grad_phi[_j][_qp](i);
70 
71  jac *= _done_over_biot_modulus_dep[_qp] * (_u[_qp] - _u_old[_qp]) + _alpha[_qp];
72 
73  return _test[_i][_qp] * jac / _dt;
74 }
const MaterialProperty< Real > & _done_over_biot_modulus_dep
d(1/M)/d(volumetric strain)
const VariableValue & _u_old
old value of porepressure
std::vector< unsigned int > _disp_var_num
variable number of the displacements variables
const MaterialProperty< Real > & _volstrain
volumetric strain
const MaterialProperty< Real > & _alpha
Biot coefficient.
const MaterialProperty< Real > & _volstrain_old
old value of volumetric strain
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
const MaterialProperty< Real > & _one_over_biot_modulus
1/M, where M is the Biot modulus
PoroFullSatTimeDerivative(const InputParameters &parameters)
const MaterialProperty< Real > & _done_over_biot_modulus_dP
d(1/M)/d(porepressure)
InputParameters validParams< PoroFullSatTimeDerivative >()
unsigned int _ndisp
number of displacement variables