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