www.mooseframework.org
PoroFullSatTimeDerivative.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 
11 
13 
14 template <>
15 InputParameters
17 {
18  InputParameters params = validParams<TimeDerivative>();
19  params.addRequiredCoupledVar(
20  "displacements",
21  "The displacements appropriate for the simulation geometry and coordinate system");
22  params.addClassDescription("Kernel = biot_coefficient*d(volumetric_strain)/dt + "
23  "(1/biot_modulus)*d(porepressure)/dt. This is the time-derivative "
24  "for poromechanics for a single-phase, fully-saturated fluid with "
25  "constant bulk modulus");
26  return params;
27 }
28 
29 PoroFullSatTimeDerivative::PoroFullSatTimeDerivative(const InputParameters & parameters)
30  : DerivativeMaterialInterface<TimeDerivative>(parameters),
31  _u_old(valueOld()),
32  _volstrain(getMaterialProperty<Real>("volumetric_strain")),
33  _volstrain_old(getMaterialPropertyOld<Real>("volumetric_strain")),
34 
35  _ndisp(coupledComponents("displacements")),
36  _disp_var_num(_ndisp),
37 
38  _alpha(getMaterialProperty<Real>("biot_coefficient")),
39 
40  _one_over_biot_modulus(getMaterialProperty<Real>("one_over_biot_modulus")),
41  _done_over_biot_modulus_dP(
42  getMaterialPropertyDerivative<Real>("one_over_biot_modulus", _var.name())),
43  _done_over_biot_modulus_dep(
44  getMaterialPropertyDerivative<Real>("one_over_biot_modulus", "volumetric_strain"))
45 {
46  for (unsigned i = 0; i < _ndisp; ++i)
47  _disp_var_num[i] = coupled("displacements", i);
48 }
49 
50 Real
52 {
53  // here, "_u" is the porepressure
54  Real res = _one_over_biot_modulus[_qp] * (_u[_qp] - _u_old[_qp]);
55  res += _alpha[_qp] * (_volstrain[_qp] - _volstrain_old[_qp]);
56  return _test[_i][_qp] * res / _dt;
57 }
58 
59 Real
61 {
62  Real jac = _one_over_biot_modulus[_qp] * _phi[_j][_qp];
63  jac += _done_over_biot_modulus_dP[_qp] * _phi[_j][_qp] * (_u[_qp] - _u_old[_qp]);
64  return _test[_i][_qp] * jac / _dt;
65 }
66 
67 Real
69 {
70  Real jac = 0;
71  for (unsigned i = 0; i < _ndisp; ++i)
72  if (jvar == _disp_var_num[i])
73  jac = _grad_phi[_j][_qp](i);
74 
75  jac *= _done_over_biot_modulus_dep[_qp] * (_u[_qp] - _u_old[_qp]) + _alpha[_qp];
76 
77  return _test[_i][_qp] * jac / _dt;
78 }
PoroFullSatTimeDerivative::_volstrain_old
const MaterialProperty< Real > & _volstrain_old
old value of volumetric strain
Definition: PoroFullSatTimeDerivative.h:46
PoroFullSatTimeDerivative::_disp_var_num
std::vector< unsigned int > _disp_var_num
variable number of the displacements variables
Definition: PoroFullSatTimeDerivative.h:52
PoroFullSatTimeDerivative::_one_over_biot_modulus
const MaterialProperty< Real > & _one_over_biot_modulus
1/M, where M is the Biot modulus
Definition: PoroFullSatTimeDerivative.h:58
PoroFullSatTimeDerivative::_done_over_biot_modulus_dP
const MaterialProperty< Real > & _done_over_biot_modulus_dP
d(1/M)/d(porepressure)
Definition: PoroFullSatTimeDerivative.h:61
PoroFullSatTimeDerivative::_alpha
const MaterialProperty< Real > & _alpha
Biot coefficient.
Definition: PoroFullSatTimeDerivative.h:55
PoroFullSatTimeDerivative::computeQpOffDiagJacobian
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Definition: PoroFullSatTimeDerivative.C:68
PoroFullSatTimeDerivative::computeQpJacobian
virtual Real computeQpJacobian()
Definition: PoroFullSatTimeDerivative.C:60
registerMooseObject
registerMooseObject("RichardsApp", PoroFullSatTimeDerivative)
PoroFullSatTimeDerivative::PoroFullSatTimeDerivative
PoroFullSatTimeDerivative(const InputParameters &parameters)
Definition: PoroFullSatTimeDerivative.C:29
name
const std::string name
Definition: Setup.h:21
PoroFullSatTimeDerivative::_done_over_biot_modulus_dep
const MaterialProperty< Real > & _done_over_biot_modulus_dep
d(1/M)/d(volumetric strain)
Definition: PoroFullSatTimeDerivative.h:64
PoroFullSatTimeDerivative::_ndisp
unsigned int _ndisp
number of displacement variables
Definition: PoroFullSatTimeDerivative.h:49
PoroFullSatTimeDerivative::_u_old
const VariableValue & _u_old
old value of porepressure
Definition: PoroFullSatTimeDerivative.h:40
PoroFullSatTimeDerivative::computeQpResidual
virtual Real computeQpResidual()
Definition: PoroFullSatTimeDerivative.C:51
validParams< PoroFullSatTimeDerivative >
InputParameters validParams< PoroFullSatTimeDerivative >()
Definition: PoroFullSatTimeDerivative.C:16
PoroFullSatTimeDerivative
Kernel = biot_coefficient*d(volumetric_strain)/dt + (1/biot_modulus)*d(porepressure)/dt this is the t...
Definition: PoroFullSatTimeDerivative.h:26
PoroFullSatTimeDerivative.h
PoroFullSatTimeDerivative::_volstrain
const MaterialProperty< Real > & _volstrain
volumetric strain
Definition: PoroFullSatTimeDerivative.h:43