LCOV - code coverage report
Current view: top level - src/components - FlowChannelGasMix.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 23 25 92.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 "FlowChannelGasMix.h"
      11             : #include "VaporMixtureFluidProperties.h"
      12             : 
      13             : registerMooseObject("ThermalHydraulicsApp", FlowChannelGasMix);
      14             : 
      15             : InputParameters
      16          38 : FlowChannelGasMix::validParams()
      17             : {
      18          38 :   InputParameters params = FlowChannel1PhaseBase::validParams();
      19             : 
      20          76 :   params.addParam<FunctionName>("initial_mass_fraction",
      21             :                                 "Initial mass fraction of the secondary gas");
      22          76 :   params.addParamNamesToGroup("initial_mass_fraction", "Variable initialization");
      23             : 
      24          76 :   params.addParam<Real>(
      25          76 :       "scaling_factor_xirhoA", 1.0, "Scaling factor for the secondary component mass equation");
      26          76 :   params.addParam<Real>("scaling_factor_rhoA", 1.0, "Scaling factor for the mixture mass equation");
      27          76 :   params.addParam<Real>("scaling_factor_rhouA", 1.0, "Scaling factor for the momentum equation");
      28          76 :   params.addParam<Real>("scaling_factor_rhoEA", 1.0, "Scaling factor for the energy equation");
      29          76 :   params.addParamNamesToGroup(
      30             :       "scaling_factor_xirhoA scaling_factor_rhoA scaling_factor_rhouA scaling_factor_rhoEA",
      31             :       "Numerical scheme");
      32             : 
      33          38 :   params.addClassDescription("Single-phase flow channel with a binary gas mixture");
      34             : 
      35          38 :   return params;
      36           0 : }
      37             : 
      38          19 : FlowChannelGasMix::FlowChannelGasMix(const InputParameters & params) : FlowChannel1PhaseBase(params)
      39             : {
      40          19 : }
      41             : 
      42             : void
      43          19 : FlowChannelGasMix::checkFluidProperties() const
      44             : {
      45          19 :   const UserObject & fp = getTHMProblem().getUserObject<UserObject>(_fp_name);
      46          19 :   if (dynamic_cast<const VaporMixtureFluidProperties *>(&fp) == nullptr)
      47           0 :     logError("The supplied fluid properties object must be of type "
      48             :              "'VaporMixtureFluidProperties'.");
      49          19 : }
      50             : 
      51             : std::string
      52          19 : FlowChannelGasMix::flowModelClassName() const
      53             : {
      54          19 :   return "FlowModelGasMix";
      55             : }
      56             : 
      57             : std::vector<std::string>
      58          57 : FlowChannelGasMix::ICParameters() const
      59             : {
      60         285 :   return {"initial_p", "initial_T", "initial_vel", "initial_mass_fraction"};
      61         114 : }

Generated by: LCOV version 1.14