Line data Source code
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 : 14 : InputParameters 15 0 : EnergyFreeBC::validParams() 16 : { 17 0 : InputParameters params = IntegratedBC::validParams(); 18 0 : params.addRequiredCoupledVar("rho_u", "x-component of momentum"); 19 0 : params.addCoupledVar("rho_v", "y-component of momentum"); 20 0 : params.addCoupledVar("rho_w", "z-component of momentum"); 21 0 : params.addRequiredCoupledVar("enthalpy", "Enthalpy"); 22 0 : params.addClassDescription( 23 : "Implements free advective flow boundary conditions for the energy equation."); 24 0 : return params; 25 0 : } 26 : 27 0 : EnergyFreeBC::EnergyFreeBC(const InputParameters & parameters) 28 : : IntegratedBC(parameters), 29 0 : _enthalpy(coupledValue("enthalpy")), 30 0 : _rho_u(coupledValue("rho_u")), 31 0 : _rho_v(isCoupled("rho_v") ? coupledValue("rho_v") : _zero), 32 0 : _rho_w(isCoupled("rho_w") ? coupledValue("rho_w") : _zero) 33 : { 34 0 : } 35 : 36 : Real 37 0 : EnergyFreeBC::computeQpResidual() 38 : { 39 : // (rho u) * H * n 40 0 : RealVectorValue rho_u_vec(_rho_u[_qp], _rho_v[_qp], _rho_w[_qp]); 41 0 : return rho_u_vec * _enthalpy[_qp] * _normals[_qp] * _test[_i][_qp]; 42 : }