https://mooseframework.inl.gov
EnergyFreeBC.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 #include "EnergyFreeBC.h"
11 
12 registerMooseObject("NavierStokesApp", EnergyFreeBC);
13 
16 {
18  params.addRequiredCoupledVar("rho_u", "x-component of momentum");
19  params.addCoupledVar("rho_v", "y-component of momentum");
20  params.addCoupledVar("rho_w", "z-component of momentum");
21  params.addRequiredCoupledVar("enthalpy", "Enthalpy");
22  params.addClassDescription(
23  "Implements free advective flow boundary conditions for the energy equation.");
24  return params;
25 }
26 
28  : IntegratedBC(parameters),
29  _enthalpy(coupledValue("enthalpy")),
30  _rho_u(coupledValue("rho_u")),
31  _rho_v(isCoupled("rho_v") ? coupledValue("rho_v") : _zero),
32  _rho_w(isCoupled("rho_w") ? coupledValue("rho_w") : _zero)
33 {
34 }
35 
36 Real
38 {
39  // (rho u) * H * n
40  RealVectorValue rho_u_vec(_rho_u[_qp], _rho_v[_qp], _rho_w[_qp]);
41  return rho_u_vec * _enthalpy[_qp] * _normals[_qp] * _test[_i][_qp];
42 }
const VariableTestValue & _test
virtual Real computeQpResidual()
Definition: EnergyFreeBC.C:37
registerMooseObject("NavierStokesApp", EnergyFreeBC)
const MooseArray< Point > & _normals
static InputParameters validParams()
unsigned int _i
EnergyFreeBC(const InputParameters &parameters)
Definition: EnergyFreeBC.C:27
unsigned int _qp
const VariableValue & _enthalpy
Definition: EnergyFreeBC.h:27
const VariableValue & _rho_v
Definition: EnergyFreeBC.h:29
static InputParameters validParams()
Definition: EnergyFreeBC.C:15
void addCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableValue & _rho_w
Definition: EnergyFreeBC.h:30
void addClassDescription(const std::string &doc_string)
const VariableValue & _rho_u
Definition: EnergyFreeBC.h:28