www.mooseframework.org
NSEnergyInviscidSpecifiedBC.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<NSEnergyInviscidBC>();
14  params.addRequiredParam<Real>("specified_pressure", "The specified pressure for this boundary");
15  params.addRequiredParam<Real>("un", "The specified value of u.n for this boundary");
16  return params;
17 }
18 
20  : NSEnergyInviscidBC(parameters),
21  _specified_pressure(getParam<Real>("specified_pressure")),
22  _un(getParam<Real>("un"))
23 {
24 }
25 
26 Real
28 {
30 }
31 
32 Real
34 {
35  return this->computeJacobianHelper(/*on-diagonal variable is energy=*/4);
36 }
37 
38 Real
40 {
41  if (isNSVariable(jvar))
42  return computeJacobianHelper(mapVarNumber(jvar));
43  else
44  return 0.0;
45 }
46 
47 Real
49 {
50  // When both pressure and u.n are specified, only term B of the Jacobian is non-zero.
51  return qpJacobianTermB(var_number, _un);
52 }
bool isNSVariable(unsigned var)
virtual Real computeQpOffDiagJacobian(unsigned jvar)
InputParameters validParams< NSEnergyInviscidSpecifiedBC >()
Real qpResidualHelper(Real pressure, Real un)
This class corresponds to the inviscid part of the "natural" boundary condition for the energy equati...
Real computeJacobianHelper(unsigned var_number)
NSEnergyInviscidSpecifiedBC(const InputParameters &parameters)
unsigned mapVarNumber(unsigned var)
InputParameters validParams< NSEnergyInviscidBC >()
Real qpJacobianTermB(unsigned var_number, Real un)