LCOV - code coverage report
Current view: top level - src/components - JunctionParallelChannels1Phase.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #32971 (54bef8) with base c6cf66 Lines: 39 40 97.5 %
Date: 2026-05-29 20:41:18 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 "JunctionParallelChannels1Phase.h"
      11             : #include "FlowModelSinglePhase.h"
      12             : 
      13             : registerMooseObject("ThermalHydraulicsApp", JunctionParallelChannels1Phase);
      14             : 
      15             : InputParameters
      16         212 : JunctionParallelChannels1Phase::validParams()
      17             : {
      18         212 :   InputParameters params = VolumeJunction1Phase::validParams();
      19             : 
      20         212 :   params.addClassDescription("Junction between 1-phase flow channels that are parallel");
      21             : 
      22         212 :   return params;
      23           0 : }
      24             : 
      25         106 : JunctionParallelChannels1Phase::JunctionParallelChannels1Phase(const InputParameters & params)
      26         106 :   : VolumeJunction1Phase(params)
      27             : {
      28         106 : }
      29             : 
      30             : void
      31          72 : JunctionParallelChannels1Phase::buildVolumeJunctionUserObject()
      32             : {
      33          72 :   ExecFlagEnum execute_on(MooseUtils::getDefaultExecFlagEnum());
      34         360 :   execute_on = {EXEC_INITIAL, EXEC_LINEAR, EXEC_NONLINEAR};
      35             : 
      36             :   {
      37          72 :     const std::string class_name = "ADJunctionParallelChannels1PhaseUserObject";
      38          72 :     InputParameters params = _factory.getValidParams(class_name);
      39          72 :     params.set<bool>("use_scalar_variables") = false;
      40          72 :     params.set<subdomain_id_type>("junction_subdomain_id") = _junction_subdomain_id;
      41          72 :     params.set<std::vector<BoundaryName>>("boundary") = _boundary_names;
      42         144 :     params.set<std::vector<Real>>("normals") = _normals;
      43          72 :     params.set<std::vector<processor_id_type>>("processor_ids") = getConnectedProcessorIDs();
      44          72 :     params.set<std::vector<UserObjectName>>("numerical_flux_names") = _numerical_flux_names;
      45          72 :     params.set<Real>("volume") = _volume;
      46         144 :     params.set<std::string>("component_name") = name();
      47         216 :     params.set<std::vector<VariableName>>("A") = {FlowModel::AREA};
      48         216 :     params.set<std::vector<VariableName>>("rhoA") = {FlowModelSinglePhase::RHOA};
      49         216 :     params.set<std::vector<VariableName>>("rhouA") = {FlowModelSinglePhase::RHOUA};
      50         216 :     params.set<std::vector<VariableName>>("rhoEA") = {FlowModelSinglePhase::RHOEA};
      51         216 :     params.set<std::vector<VariableName>>("rhoV") = {_rhoV_var_name};
      52         216 :     params.set<std::vector<VariableName>>("rhouV") = {_rhouV_var_name};
      53         216 :     params.set<std::vector<VariableName>>("rhovV") = {_rhovV_var_name};
      54         216 :     params.set<std::vector<VariableName>>("rhowV") = {_rhowV_var_name};
      55         216 :     params.set<std::vector<VariableName>>("rhoEV") = {_rhoEV_var_name};
      56          72 :     params.set<RealVectorValue>("dir_c0") = _directions[0];
      57          72 :     params.set<Real>("K") = _K;
      58          72 :     params.set<Real>("A_ref") = _A_ref;
      59          72 :     params.set<UserObjectName>("fp") = _fp_name;
      60         144 :     params.set<bool>("apply_velocity_scaling") = getParam<bool>("apply_velocity_scaling");
      61          72 :     params.set<ExecFlagEnum>("execute_on") = execute_on;
      62          72 :     getTHMProblem().addUserObject(class_name, _junction_uo_name, params);
      63          72 :     connectObject(params, _junction_uo_name, "K");
      64          72 :   }
      65         144 : }

Generated by: LCOV version 1.14