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 "CNSFVHLLCFluidEnergyBC.h" 11 : 12 : registerMooseObject("NavierStokesApp", CNSFVHLLCSpecifiedMassFluxAndTemperatureFluidEnergyBC); 13 : registerMooseObject("NavierStokesApp", CNSFVHLLCSpecifiedPressureFluidEnergyBC); 14 : 15 : template <typename T> 16 : InputParameters 17 275 : CNSFVHLLCFluidEnergyBC<T>::validParams() 18 : { 19 275 : InputParameters params = T::validParams(); 20 275 : params.addClassDescription( 21 : "Implements the fluid energy boundary flux portion of the free-flow HLLC " 22 : "discretization given specified mass fluxes and fluid temperature"); 23 275 : return params; 24 0 : } 25 : 26 : template <> 27 : InputParameters 28 275 : CNSFVHLLCFluidEnergyBC<CNSFVHLLCSpecifiedPressureBC>::validParams() 29 : { 30 275 : InputParameters params = CNSFVHLLCSpecifiedPressureBC::validParams(); 31 275 : params.addClassDescription( 32 : "Implements the fluid energy boundary flux portion of the free-flow HLLC " 33 : "discretization given specified pressure"); 34 275 : return params; 35 0 : } 36 : 37 : template <typename T> 38 290 : CNSFVHLLCFluidEnergyBC<T>::CNSFVHLLCFluidEnergyBC(const InputParameters & params) : T(params) 39 : { 40 290 : } 41 : 42 : template <typename T> 43 : ADReal 44 7374 : CNSFVHLLCFluidEnergyBC<T>::fluxElem() 45 : { 46 7374 : return this->_normal_speed_elem * this->_rho_elem[this->_qp] * this->_ht_elem[this->_qp]; 47 : } 48 : 49 : template <typename T> 50 : ADReal 51 7374 : CNSFVHLLCFluidEnergyBC<T>::fluxBoundary() 52 : { 53 7374 : return this->_normal_speed_boundary * this->_rho_boundary * this->_ht_boundary; 54 : } 55 : 56 : template <typename T> 57 : ADReal 58 7374 : CNSFVHLLCFluidEnergyBC<T>::hllcElem() 59 : { 60 7374 : return this->_rho_et_elem[this->_qp] / this->_rho_elem[this->_qp] + 61 : (this->_SM - this->_normal_speed_elem) * 62 14748 : (this->_SM + this->_pressure_elem[this->_qp] / this->_rho_elem[this->_qp] / 63 7374 : (this->_SL - this->_normal_speed_elem)); 64 : } 65 : 66 : template <typename T> 67 : ADReal 68 7374 : CNSFVHLLCFluidEnergyBC<T>::hllcBoundary() 69 : { 70 7374 : return this->_rho_et_boundary / this->_rho_boundary + 71 : (this->_SM - this->_normal_speed_boundary) * 72 14748 : (this->_SM + this->_pressure_boundary / this->_rho_boundary / 73 7374 : (this->_SR - this->_normal_speed_boundary)); 74 : } 75 : 76 : template <typename T> 77 : ADReal 78 7374 : CNSFVHLLCFluidEnergyBC<T>::conservedVariableElem() 79 : { 80 7374 : return this->_rho_et_elem[this->_qp]; 81 : } 82 : 83 : template <typename T> 84 : ADReal 85 7374 : CNSFVHLLCFluidEnergyBC<T>::conservedVariableBoundary() 86 : { 87 7374 : return this->_rho_et_boundary; 88 : } 89 : 90 : template class CNSFVHLLCFluidEnergyBC<CNSFVHLLCSpecifiedMassFluxAndTemperatureBC>; 91 : template class CNSFVHLLCFluidEnergyBC<CNSFVHLLCSpecifiedPressureBC>;