www.mooseframework.org
INSCompressibilityPenalty.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 /****************************************************************/
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<Kernel>();
14 
15  params.addClassDescription("The penalty term may be used when Dirichlet boundary condition is "
16  "applied to the entire boundary.");
17  params.addParam<Real>("penalty", 1e-4, "Penalty value is used to relax the incompressibility");
18 
19  return params;
20 }
21 
22 INSCompressibilityPenalty::INSCompressibilityPenalty(const InputParameters & parameters)
23  : Kernel(parameters),
24  // penalty value
25  _penalty(getParam<Real>("penalty"))
26 
27 {
28 }
29 
30 Real
32 {
33  // penalty*p*q
34  return _penalty * _u[_qp] * _test[_i][_qp];
35 }
36 
37 Real
39 {
40  // does not couple any variables
41  return 0;
42 }
43 
44 Real
46 {
47  // Derivative wrt to p
48  return _penalty * _phi[_j][_qp] * _test[_i][_qp];
49 }
virtual Real computeQpOffDiagJacobian(unsigned jvar)
INSCompressibilityPenalty(const InputParameters &parameters)
InputParameters validParams< INSCompressibilityPenalty >()