www.mooseframework.org
NSEnergyInviscidSpecifiedBC.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  params.addRequiredParam<Real>("un", "The specified value of u.n for this boundary");
19  return params;
20 }
21 
23  : NSEnergyInviscidBC(parameters),
24  _specified_pressure(getParam<Real>("specified_pressure")),
25  _un(getParam<Real>("un"))
26 {
27 }
28 
29 Real
31 {
33 }
34 
35 Real
37 {
38  return this->computeJacobianHelper(/*on-diagonal variable is energy=*/4);
39 }
40 
41 Real
43 {
44  if (isNSVariable(jvar))
45  return computeJacobianHelper(mapVarNumber(jvar));
46  else
47  return 0.0;
48 }
49 
50 Real
52 {
53  // When both pressure and u.n are specified, only term B of the Jacobian is non-zero.
54  return qpJacobianTermB(var_number, _un);
55 }
bool isNSVariable(unsigned var)
static InputParameters validParams()
static InputParameters validParams()
virtual Real computeQpOffDiagJacobian(unsigned jvar)
void addRequiredParam(const std::string &name, const std::string &doc_string)
Real qpResidualHelper(Real pressure, Real un)
registerMooseObject("NavierStokesApp", NSEnergyInviscidSpecifiedBC)
This class corresponds to the inviscid part of the "natural" boundary condition for the energy equati...
The inviscid energy BC term with specified pressure.
Real computeJacobianHelper(unsigned var_number)
NSEnergyInviscidSpecifiedBC(const InputParameters &parameters)
unsigned mapVarNumber(unsigned var)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real qpJacobianTermB(unsigned var_number, Real un)