https://mooseframework.inl.gov
Loading...
Searching...
No Matches
NSEnergyInviscidSpecifiedPressureBC.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
20
22 const InputParameters & parameters)
23 : NSEnergyInviscidBC(parameters), _specified_pressure(getParam<Real>("specified_pressure"))
24{
25}
26
27Real
29{
30 // Velocity vector object
31 RealVectorValue vel(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
32
33 // Normal component
34 Real un = vel * _normals[_qp];
35
37}
38
39Real
41{
42 return computeJacobianHelper(/*on-diagonal variable is energy=*/4);
43}
44
45Real
47{
48 if (isNSVariable(jvar))
50 else
51 return 0.0;
52}
53
54Real
56{
57 // Velocity vector object
58 RealVectorValue vel(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
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}
registerMooseObject("NavierStokesApp", NSEnergyInviscidSpecifiedPressureBC)
unsigned int _qp
const MooseArray< Point > & _normals
This class corresponds to the inviscid part of the "natural" boundary condition for the energy equati...
static InputParameters validParams()
Real qpResidualHelper(Real pressure, Real un)
Real qpJacobianTermA(unsigned var_number, Real pressure)
Real qpJacobianTermB(unsigned var_number, Real un)
The inviscid energy BC term with specified pressure.
NSEnergyInviscidSpecifiedPressureBC(const InputParameters &parameters)
const VariableValue & _w_vel
const VariableValue & _v_vel
const VariableValue & _u_vel
bool isNSVariable(unsigned var)
unsigned mapVarNumber(unsigned var)