www.mooseframework.org
PoroMechanicsCoupling.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 "PoroMechanicsCoupling.h"
11 
12 // MOOSE includes
13 #include "Function.h"
14 #include "MooseMesh.h"
15 #include "MooseVariable.h"
16 
17 registerMooseObject("SolidMechanicsApp", PoroMechanicsCoupling);
18 
21 {
23  params.addClassDescription(
24  "Adds $-Bi \\cdot p_s \\cdot \\nabla \\Psi_c$, where the subscript $c$ is the component.");
25  params.addRequiredCoupledVar("porepressure", "Pore pressure, $p_s$.");
26  params.addRequiredParam<unsigned int>("component",
27  "The gradient direction (0 for x, 1 for y and 2 for z)");
28  return params;
29 }
30 
32  : Kernel(parameters),
33  _coefficient(getMaterialProperty<Real>("biot_coefficient")),
34  _porepressure(coupledValue("porepressure")),
35  _porepressure_var_num(coupled("porepressure")),
36  _component(getParam<unsigned int>("component"))
37 {
38  if (_component >= _mesh.dimension())
39  mooseError("PoroMechanicsCoupling: component should not be greater than the mesh dimension\n");
40 }
41 
42 Real
44 {
46 }
47 
48 Real
50 {
52  return 0.0;
53  return -_coefficient[_qp] * _phi[_j][_qp] * _grad_test[_i][_qp](_component);
54 }
55 
56 Real
58 {
59  if (jvar != _porepressure_var_num)
60  return 0.0;
61  return -_coefficient[_qp] * _phi[_j][_qp] * _grad_test[_i][_qp](_component);
62 }
MooseMesh & _mesh
static InputParameters validParams()
unsigned int _component
An integer corresponding to the direction this kernel acts in.
static InputParameters validParams()
MooseVariable & _var
unsigned int number() const
PoroMechanicsCoupling(const InputParameters &parameters)
const VariableValue & _porepressure
void addRequiredParam(const std::string &name, const std::string &doc_string)
registerMooseObject("SolidMechanicsApp", PoroMechanicsCoupling)
virtual unsigned int dimension() const
unsigned int _i
virtual Real computeQpResidual()
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
unsigned int _j
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableTestGradient & _grad_test
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
const MaterialProperty< Real > & _coefficient
Biot coefficient.
const VariablePhiValue & _phi
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
void ErrorVector unsigned int
virtual Real computeQpJacobian()
unsigned int _qp
PoroMechanicsCoupling computes -coefficient*porepressure*grad_test[component].