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 "PCNSFVHLLCSpecifiedPressureBC.h" 11 : #include "NS.h" 12 : #include "Function.h" 13 : #include "SinglePhaseFluidProperties.h" 14 : 15 : InputParameters 16 108 : PCNSFVHLLCSpecifiedPressureBC::validParams() 17 : { 18 108 : auto params = PCNSFVHLLCBC::validParams(); 19 108 : params.addRequiredParam<FunctionName>(NS::pressure, "A function for the pressure"); 20 108 : return params; 21 0 : } 22 : 23 54 : PCNSFVHLLCSpecifiedPressureBC::PCNSFVHLLCSpecifiedPressureBC(const InputParameters & parameters) 24 54 : : PCNSFVHLLCBC(parameters), _pressure_boundary_function(getFunction(NS::pressure)) 25 : { 26 54 : } 27 : 28 : void 29 498 : PCNSFVHLLCSpecifiedPressureBC::preComputeWaveSpeed() 30 : { 31 498 : _pressure_boundary = _pressure_boundary_function.value(_t, _face_info->faceCentroid()); 32 498 : _eps_boundary = _eps_elem[_qp]; 33 : 34 : // rho and vel implicit -> 1 + n_dim numerical bcs 35 498 : _rho_boundary = _rho_elem[_qp]; 36 498 : _vel_boundary = _vel_elem[_qp]; 37 : 38 498 : _normal_speed_boundary = _normal * _vel_boundary; 39 498 : _specific_internal_energy_boundary = _fluid.e_from_p_rho(_pressure_boundary, _rho_boundary); 40 996 : _et_boundary = _specific_internal_energy_boundary + 0.5 * _vel_boundary * _vel_boundary; 41 498 : _rho_et_boundary = _rho_boundary * _et_boundary; 42 498 : _ht_boundary = _et_boundary + _pressure_boundary / _rho_boundary; 43 498 : }