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 "CNSFVHLLCFluidEnergyStagnationInletBC.h" 11 : #include "NS.h" 12 : 13 : // Full specialization of the validParams function for this object 14 : registerADMooseObject("NavierStokesApp", CNSFVHLLCFluidEnergyStagnationInletBC); 15 : 16 : InputParameters 17 41 : CNSFVHLLCFluidEnergyStagnationInletBC::validParams() 18 : { 19 41 : InputParameters params = CNSFVHLLCStagnationInletBC::validParams(); 20 41 : params.addClassDescription("Adds the boundary fluid energy flux for HLLC when provided " 21 : "stagnation temperature and pressure"); 22 41 : return params; 23 0 : } 24 : 25 22 : CNSFVHLLCFluidEnergyStagnationInletBC::CNSFVHLLCFluidEnergyStagnationInletBC( 26 22 : const InputParameters & parameters) 27 : : CNSFVHLLCStagnationInletBC(parameters), 28 22 : _ht_elem(getADMaterialProperty<Real>(NS::specific_total_enthalpy)) 29 : { 30 22 : } 31 : 32 : ADReal 33 0 : CNSFVHLLCFluidEnergyStagnationInletBC::fluxElem() 34 : { 35 0 : return _normal_speed_elem * _rho_elem[_qp] * _ht_elem[_qp]; 36 : } 37 : 38 : ADReal 39 708 : CNSFVHLLCFluidEnergyStagnationInletBC::fluxBoundary() 40 : { 41 708 : return _normal_speed_boundary * _rho_boundary * _ht_boundary; 42 : } 43 : 44 : ADReal 45 0 : CNSFVHLLCFluidEnergyStagnationInletBC::hllcElem() 46 : { 47 0 : return _specific_internal_energy_elem[_qp] + 48 0 : (_SM - _normal_speed_elem) * 49 0 : (_SM + _pressure_elem[_qp] / _rho_elem[_qp] / (_SL - _normal_speed_elem)); 50 : } 51 : 52 : ADReal 53 708 : CNSFVHLLCFluidEnergyStagnationInletBC::hllcBoundary() 54 : { 55 708 : return _specific_internal_energy_boundary + 56 708 : (_SM - _normal_speed_boundary) * 57 2124 : (_SM + _p_boundary / _rho_boundary / (_SL - _normal_speed_boundary)); 58 : } 59 : 60 : ADReal 61 0 : CNSFVHLLCFluidEnergyStagnationInletBC::conservedVariableElem() 62 : { 63 0 : return _specific_internal_energy_elem[_qp] * _rho_elem[_qp]; 64 : } 65 : 66 : ADReal 67 708 : CNSFVHLLCFluidEnergyStagnationInletBC::conservedVariableBoundary() 68 : { 69 708 : return _specific_internal_energy_boundary * _rho_boundary; 70 : }