LCOV - code coverage report
Current view: top level - src/fvbcs - CNSFVHLLCSpecifiedPressureBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: 9fc4b0 Lines: 17 18 94.4 %
Date: 2025-08-14 10:14:56 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.14