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