https://mooseframework.inl.gov
Loading...
Searching...
No Matches
NSEnergyInviscidUnspecifiedBC.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
10// Navier-Stokes includes
11#include "NS.h"
13
15
23
25 : NSEnergyInviscidBC(parameters), _pressure(coupledValue(NS::pressure))
26{
27}
28
29Real
31{
32 // Velocity vector object
33 RealVectorValue vel(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
34
35 // Normal component
36 Real un = vel * _normals[_qp];
37
38 return qpResidualHelper(_pressure[_qp], un);
39}
40
41Real
43{
44 return computeJacobianHelper(/*on-diagonal variable is energy=*/4);
45}
46
47Real
49{
50 if (isNSVariable(jvar))
52 else
53 return 0.0;
54}
55
56Real
58{
59 // Velocity vector object
60 RealVectorValue vel(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
61
62 // Normal component of velocity
63 Real un = vel * _normals[_qp];
64
65 // When both u.n and pressure are unspecified, all 3 Jacobian terms apply.
66 // See base class for details.
67 return qpJacobianTermA(var_number, _pressure[_qp]) + qpJacobianTermB(var_number, un) +
68 qpJacobianTermC(var_number, un);
69}
registerMooseObject("NavierStokesApp", NSEnergyInviscidUnspecifiedBC)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
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 qpJacobianTermC(unsigned var_number, Real un)
Real qpJacobianTermB(unsigned var_number, Real un)
The inviscid energy BC term with specified pressure.
virtual Real computeQpOffDiagJacobian(unsigned jvar)
Real computeJacobianHelper(unsigned var_number)
NSEnergyInviscidUnspecifiedBC(const InputParameters &parameters)
const VariableValue & _w_vel
const VariableValue & _v_vel
const VariableValue & _u_vel
bool isNSVariable(unsigned var)
unsigned mapVarNumber(unsigned var)
static const std::string pressure
Definition NS.h:57