www.mooseframework.org
INSCompressibilityPenalty.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 
16 {
18 
19  params.addClassDescription("The penalty term may be used when Dirichlet boundary condition is "
20  "applied to the entire boundary.");
21  params.addParam<Real>("penalty", 1e-4, "Penalty value is used to relax the incompressibility");
22 
23  return params;
24 }
25 
27  : Kernel(parameters),
28  // penalty value
29  _penalty(getParam<Real>("penalty"))
30 
31 {
32 }
33 
34 Real
36 {
37  // penalty*p*q
38  return _penalty * _u[_qp] * _test[_i][_qp];
39 }
40 
41 Real
43 {
44  // does not couple any variables
45  return 0;
46 }
47 
48 Real
50 {
51  // Derivative wrt to p
52  return _penalty * _phi[_j][_qp] * _test[_i][_qp];
53 }
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static InputParameters validParams()
virtual Real computeQpOffDiagJacobian(unsigned jvar)
The penalty term may be used when Dirichlet boundary condition is applied to the entire boundary...
const VariableTestValue & _test
unsigned int _i
INSCompressibilityPenalty(const InputParameters &parameters)
unsigned int _j
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
const VariablePhiValue & _phi
registerMooseObject("NavierStokesApp", INSCompressibilityPenalty)
const VariableValue & _u
unsigned int _qp