https://mooseframework.inl.gov
NSMassUnspecifiedNormalFlowBC.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 
16 {
18  params.addClassDescription("This class implements the mass equation boundary term with the "
19  "rho*(u.n) boundary integral computed implicitly.");
20  return params;
21 }
22 
24  : NSMassBC(parameters)
25 {
26 }
27 
28 Real
30 {
31  const RealVectorValue mom(_rho_u[_qp], _rho_v[_qp], _rho_w[_qp]);
32  return qpResidualHelper(mom * _normals[_qp]);
33 }
34 
35 Real
37 {
38  return qpJacobianHelper(/*on diagonal=*/0);
39 }
40 
41 Real
43 {
44  if (isNSVariable(jvar))
45  return qpJacobianHelper(mapVarNumber(jvar));
46  else
47  return 0.0;
48 }
bool isNSVariable(unsigned var)
Real qpResidualHelper(Real rhoun)
Compute the residual contribution for a given value of rho*(u.n).
Definition: NSMassBC.C:24
const MooseArray< Point > & _normals
const VariableValue & _rho_w
unsigned int _qp
registerMooseObject("NavierStokesApp", NSMassUnspecifiedNormalFlowBC)
NSMassUnspecifiedNormalFlowBC(const InputParameters &parameters)
virtual Real computeQpOffDiagJacobian(unsigned jvar)
This class implements the mass equation boundary term with the rho*(u.n) boundary integral computed i...
unsigned mapVarNumber(unsigned var)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real qpJacobianHelper(unsigned var_number)
Compute the Jacobian contribution due to variable number &#39;var_number&#39;.
Definition: NSMassBC.C:30
This class corresponds to the "natural" boundary condition for the mass equation, i...
Definition: NSMassBC.h:29
const VariableValue & _rho_u
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
Definition: NSMassBC.C:13
const VariableValue & _rho_v