www.mooseframework.org
NSEnergyInviscidSpecifiedPressureBC.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  return params;
19 }
20 
22  const InputParameters & parameters)
23  : NSEnergyInviscidBC(parameters), _specified_pressure(getParam<Real>("specified_pressure"))
24 {
25 }
26 
27 Real
29 {
30  // Velocity vector object
32 
33  // Normal component
34  Real un = vel * _normals[_qp];
35 
37 }
38 
39 Real
41 {
42  return computeJacobianHelper(/*on-diagonal variable is energy=*/4);
43 }
44 
45 Real
47 {
48  if (isNSVariable(jvar))
49  return computeJacobianHelper(mapVarNumber(jvar));
50  else
51  return 0.0;
52 }
53 
54 Real
56 {
57  // Velocity vector object
59 
60  // Normal component of velocity
61  Real un = vel * _normals[_qp];
62 
63  // For specified pressure, term "C" is zero, see base class for details.
64  return qpJacobianTermA(var_number, _specified_pressure) + qpJacobianTermB(var_number, un);
65 }
bool isNSVariable(unsigned var)
const MooseArray< Point > & _normals
static InputParameters validParams()
const VariableValue & _w_vel
NSEnergyInviscidSpecifiedPressureBC(const InputParameters &parameters)
unsigned int _qp
Real qpResidualHelper(Real pressure, Real un)
registerMooseObject("NavierStokesApp", NSEnergyInviscidSpecifiedPressureBC)
This class corresponds to the inviscid part of the "natural" boundary condition for the energy equati...
unsigned mapVarNumber(unsigned var)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableValue & _v_vel
Real qpJacobianTermA(unsigned var_number, Real pressure)
Real qpJacobianTermB(unsigned var_number, Real un)
const VariableValue & _u_vel
The inviscid energy BC term with specified pressure.