LCOV - code coverage report
Current view: top level - src/components - FlowChannel1Phase.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 22 22 100.0 %
Date: 2025-07-30 13:02:48 Functions: 5 5 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 "FlowChannel1Phase.h"
      11             : #include "FlowModelSinglePhase.h"
      12             : #include "SinglePhaseFluidProperties.h"
      13             : 
      14             : registerMooseObject("ThermalHydraulicsApp", FlowChannel1Phase);
      15             : 
      16             : InputParameters
      17        8342 : FlowChannel1Phase::validParams()
      18             : {
      19        8342 :   InputParameters params = FlowChannel1PhaseBase::validParams();
      20             : 
      21       16684 :   MooseEnum wave_speed_formulation("einfeldt davis", "einfeldt");
      22       16684 :   params.addParam<MooseEnum>(
      23             :       "wave_speed_formulation", wave_speed_formulation, "Method for computing wave speeds");
      24             : 
      25        8342 :   std::vector<Real> sf_1phase(3, 1.0);
      26       16684 :   params.addParam<std::vector<Real>>(
      27             :       "scaling_factor_1phase",
      28             :       sf_1phase,
      29             :       "Scaling factors for each single phase variable (rhoA, rhouA, rhoEA)");
      30             : 
      31       16684 :   params.addParamNamesToGroup("scaling_factor_1phase", "Numerical scheme");
      32       16684 :   params.addClassDescription("1-phase 1D flow channel");
      33             : 
      34        8342 :   return params;
      35        8342 : }
      36             : 
      37        4170 : FlowChannel1Phase::FlowChannel1Phase(const InputParameters & params) : FlowChannel1PhaseBase(params)
      38             : {
      39        4170 : }
      40             : 
      41             : void
      42        4031 : FlowChannel1Phase::checkFluidProperties() const
      43             : {
      44        4031 :   const UserObject & fp = getTHMProblem().getUserObject<UserObject>(_fp_name);
      45        4031 :   if (dynamic_cast<const SinglePhaseFluidProperties *>(&fp) == nullptr)
      46           2 :     logError("Supplied fluid properties must be for 1-phase fluids.");
      47        4031 : }
      48             : 
      49             : std::string
      50        4141 : FlowChannel1Phase::flowModelClassName() const
      51             : {
      52        4141 :   return "FlowModelSinglePhase";
      53             : }
      54             : 
      55             : std::vector<std::string>
      56        8060 : FlowChannel1Phase::ICParameters() const
      57             : {
      58       32240 :   return {"initial_p", "initial_T", "initial_vel"};
      59       16120 : }

Generated by: LCOV version 1.14