https://mooseframework.inl.gov
Loading...
Searching...
No Matches
INSCompressibilityPenalty.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
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
34Real
36{
37 // penalty*p*q
38 return _penalty * _u[_qp] * _test[_i][_qp];
39}
40
41Real
43{
44 // does not couple any variables
45 return 0;
46}
47
48Real
50{
51 // Derivative wrt to p
52 return _penalty * _phi[_j][_qp] * _test[_i][_qp];
53}
registerMooseObject("NavierStokesApp", INSCompressibilityPenalty)
The penalty term may be used when Dirichlet boundary condition is applied to the entire boundary.
INSCompressibilityPenalty(const InputParameters &parameters)
virtual Real computeQpOffDiagJacobian(unsigned jvar)
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
unsigned int _j
unsigned int _i
const VariablePhiValue & _phi
const VariableTestValue & _test
static InputParameters validParams()
const VariableValue & _u