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

Generated by: LCOV version 1.14