https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PoroMechanicsCoupling.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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
12// MOOSE includes
13#include "Function.h"
14#include "MooseMesh.h"
15#include "MooseVariable.h"
16
18
21{
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
42Real
47
48Real
55
56Real
58{
59 if (jvar != _porepressure_var_num)
60 return 0.0;
62}
registerMooseObject("SolidMechanicsApp", PoroMechanicsCoupling)
void ErrorVector unsigned int
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
unsigned int _j
unsigned int _i
MooseVariable & _var
const VariablePhiValue & _phi
static InputParameters validParams()
const VariableTestGradient & _grad_test
void mooseError(Args &&... args) const
virtual unsigned int dimension() const
unsigned int number() const
PoroMechanicsCoupling computes -coefficient*porepressure*grad_test[component].
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
const MaterialProperty< Real > & _coefficient
Biot coefficient.
static InputParameters validParams()
PoroMechanicsCoupling(const InputParameters &parameters)
unsigned int _component
An integer corresponding to the direction this kernel acts in.
const VariableValue & _porepressure
MooseMesh & _mesh