www.mooseframework.org
EnergyFreeBC.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 
10 #include "EnergyFreeBC.h"
11 
12 registerMooseObject("NavierStokesApp", EnergyFreeBC);
13 
14 template <>
15 InputParameters
17 {
18  InputParameters params = validParams<IntegratedBC>();
19  params.addRequiredCoupledVar("rho_u", "x-component of momentum");
20  params.addCoupledVar("rho_v", "y-component of momentum");
21  params.addCoupledVar("rho_w", "z-component of momentum");
22  params.addRequiredCoupledVar("enthalpy", "Enthalpy");
23 
24  return params;
25 }
26 
27 EnergyFreeBC::EnergyFreeBC(const InputParameters & parameters)
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 }
EnergyFreeBC::EnergyFreeBC
EnergyFreeBC(const InputParameters &parameters)
Definition: EnergyFreeBC.C:27
EnergyFreeBC::computeQpResidual
virtual Real computeQpResidual()
Definition: EnergyFreeBC.C:37
EnergyFreeBC::_rho_u
const VariableValue & _rho_u
Definition: EnergyFreeBC.h:31
validParams< EnergyFreeBC >
InputParameters validParams< EnergyFreeBC >()
Definition: EnergyFreeBC.C:16
EnergyFreeBC::_rho_w
const VariableValue & _rho_w
Definition: EnergyFreeBC.h:33
EnergyFreeBC.h
EnergyFreeBC::_rho_v
const VariableValue & _rho_v
Definition: EnergyFreeBC.h:32
registerMooseObject
registerMooseObject("NavierStokesApp", EnergyFreeBC)
EnergyFreeBC::_enthalpy
const VariableValue & _enthalpy
Definition: EnergyFreeBC.h:30
EnergyFreeBC
Definition: EnergyFreeBC.h:22