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 "CNSFVFluidEnergyHLLC.h" 11 : #include "NS.h" 12 : 13 : namespace nms = NS; 14 : 15 : // Full specialization of the validParams function for this object 16 : registerADMooseObject("NavierStokesApp", CNSFVFluidEnergyHLLC); 17 : 18 : InputParameters 19 456 : CNSFVFluidEnergyHLLC::validParams() 20 : { 21 456 : InputParameters params = CNSFVHLLC::validParams(); 22 456 : params.addClassDescription( 23 : "Implements the fluid energy flux portion of the free-flow HLLC discretization."); 24 456 : return params; 25 0 : } 26 : 27 243 : CNSFVFluidEnergyHLLC::CNSFVFluidEnergyHLLC(const InputParameters & params) 28 : : CNSFVHLLC(params), 29 243 : _ht_elem(getADMaterialProperty<Real>(nms::specific_total_enthalpy)), 30 243 : _ht_neighbor(getNeighborADMaterialProperty<Real>(nms::specific_total_enthalpy)) 31 : { 32 243 : } 33 : 34 : ADReal 35 530471 : CNSFVFluidEnergyHLLC::fluxElem() 36 : { 37 530471 : return _normal_speed_elem * _rho_elem[_qp] * _ht_elem[_qp]; 38 : } 39 : 40 : ADReal 41 100702 : CNSFVFluidEnergyHLLC::fluxNeighbor() 42 : { 43 100702 : return _normal_speed_neighbor * _rho_neighbor[_qp] * _ht_neighbor[_qp]; 44 : } 45 : 46 : ADReal 47 530471 : CNSFVFluidEnergyHLLC::hllcElem() 48 : { 49 530471 : return _rho_et_elem[_qp] / _rho_elem[_qp] + 50 530471 : (_SM - _normal_speed_elem) * 51 1591413 : (_SM + _pressure_elem[_qp] / _rho_elem[_qp] / (_SL - _normal_speed_elem)); 52 : } 53 : 54 : ADReal 55 100702 : CNSFVFluidEnergyHLLC::hllcNeighbor() 56 : { 57 100702 : return _rho_et_neighbor[_qp] / _rho_neighbor[_qp] + 58 100702 : (_SM - _normal_speed_neighbor) * 59 302106 : (_SM + _pressure_neighbor[_qp] / _rho_neighbor[_qp] / (_SR - _normal_speed_neighbor)); 60 : } 61 : 62 : ADReal 63 530471 : CNSFVFluidEnergyHLLC::conservedVariableElem() 64 : { 65 530471 : return _rho_et_elem[_qp]; 66 : } 67 : 68 : ADReal 69 100702 : CNSFVFluidEnergyHLLC::conservedVariableNeighbor() 70 : { 71 100702 : return _rho_et_neighbor[_qp]; 72 : }