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