www.mooseframework.org
NSEnergyInviscidSpecifiedPressureBC.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  return params;
16 }
17 
19  const InputParameters & parameters)
20  : NSEnergyInviscidBC(parameters), _specified_pressure(getParam<Real>("specified_pressure"))
21 {
22 }
23 
24 Real
26 {
27  // Velocity vector object
28  RealVectorValue vel(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
29 
30  // Normal component
31  Real un = vel * _normals[_qp];
32 
34 }
35 
36 Real
38 {
39  return computeJacobianHelper(/*on-diagonal variable is energy=*/4);
40 }
41 
42 Real
44 {
45  if (isNSVariable(jvar))
46  return computeJacobianHelper(mapVarNumber(jvar));
47  else
48  return 0.0;
49 }
50 
51 Real
53 {
54  // Velocity vector object
55  RealVectorValue vel(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
56 
57  // Normal component of velocity
58  Real un = vel * _normals[_qp];
59 
60  // For specified pressure, term "C" is zero, see base class for details.
61  return qpJacobianTermA(var_number, _specified_pressure) + qpJacobianTermB(var_number, un);
62 }
bool isNSVariable(unsigned var)
const VariableValue & _w_vel
NSEnergyInviscidSpecifiedPressureBC(const InputParameters &parameters)
Real qpResidualHelper(Real pressure, Real un)
This class corresponds to the inviscid part of the "natural" boundary condition for the energy equati...
unsigned mapVarNumber(unsigned var)
const VariableValue & _v_vel
InputParameters validParams< NSEnergyInviscidSpecifiedPressureBC >()
InputParameters validParams< NSEnergyInviscidBC >()
Real qpJacobianTermA(unsigned var_number, Real pressure)
Real qpJacobianTermB(unsigned var_number, Real un)
const VariableValue & _u_vel