https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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");
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
36Real
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}
registerMooseObject("NavierStokesApp", EnergyFreeBC)
virtual Real computeQpResidual()
const VariableValue & _rho_u
const VariableValue & _rho_w
EnergyFreeBC(const InputParameters &parameters)
const VariableValue & _rho_v
static InputParameters validParams()
const VariableValue & _enthalpy
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void addCoupledVar(const std::string &name, const std::string &doc_string)
unsigned int _qp
unsigned int _i
static InputParameters validParams()
const MooseArray< Point > & _normals
const VariableTestValue & _test