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 221 : PCNSFVFluidEnergyHLLC::validParams() 17 : { 18 221 : InputParameters params = PCNSFVHLLC::validParams(); 19 221 : params.addClassDescription( 20 : "Implements the fluid energy flux portion of the porous HLLC discretization."); 21 221 : return params; 22 0 : } 23 : 24 112 : PCNSFVFluidEnergyHLLC::PCNSFVFluidEnergyHLLC(const InputParameters & params) 25 : : PCNSFVHLLC(params), 26 112 : _ht_elem(getADMaterialProperty<Real>(NS::specific_total_enthalpy)), 27 112 : _ht_neighbor(getNeighborADMaterialProperty<Real>(NS::specific_total_enthalpy)) 28 : { 29 112 : } 30 : 31 : ADReal 32 80545 : PCNSFVFluidEnergyHLLC::fluxElem() 33 : { 34 161090 : 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 80545 : PCNSFVFluidEnergyHLLC::hllcElem() 45 : { 46 80545 : return _rho_et_elem[_qp] / _rho_elem[_qp] + 47 80545 : (_SM - _normal_speed_elem) * 48 241635 : (_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 80545 : PCNSFVFluidEnergyHLLC::conservedVariableElem() 61 : { 62 80545 : 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 : }