LCOV - code coverage report
Current view: top level - src/components - FlowBoundaryGasMix.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 27 27 100.0 %
Date: 2025-07-30 13:02:48 Functions: 4 4 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 "FlowBoundaryGasMix.h"
      11             : #include "FlowChannelGasMix.h"
      12             : #include "THMNames.h"
      13             : 
      14             : InputParameters
      15          76 : FlowBoundaryGasMix::validParams()
      16             : {
      17          76 :   InputParameters params = FlowBoundary1PhaseBase::validParams();
      18          76 :   return params;
      19             : }
      20             : 
      21          38 : FlowBoundaryGasMix::FlowBoundaryGasMix(const InputParameters & params)
      22          38 :   : FlowBoundary1PhaseBase(params)
      23             : {
      24          38 : }
      25             : 
      26             : void
      27          38 : FlowBoundaryGasMix::check() const
      28             : {
      29          38 :   FlowBoundary1PhaseBase::check();
      30             : 
      31          38 :   checkComponentOfTypeExistsByName<FlowChannelGasMix>(_connected_component_name);
      32          38 : }
      33             : 
      34             : void
      35          38 : FlowBoundaryGasMix::addWeakBCs()
      36             : {
      37          38 :   const std::string class_name = "BoundaryFluxGasMixBC";
      38          38 :   InputParameters params = _factory.getValidParams(class_name);
      39          38 :   params.set<std::vector<BoundaryName>>("boundary") = getBoundaryNames();
      40          38 :   params.set<Real>("normal") = _normal;
      41          76 :   params.set<UserObjectName>("boundary_flux") = _boundary_uo_name;
      42         114 :   params.set<std::vector<VariableName>>("A_linear") = {THM::AREA_LINEAR};
      43         114 :   params.set<std::vector<VariableName>>("xirhoA") = {THM::XIRHOA};
      44         114 :   params.set<std::vector<VariableName>>("rhoA") = {THM::RHOA};
      45         114 :   params.set<std::vector<VariableName>>("rhouA") = {THM::RHOUA};
      46         114 :   params.set<std::vector<VariableName>>("rhoEA") = {THM::RHOEA};
      47          38 :   params.set<bool>("implicit") = getTHMProblem().getImplicitTimeIntegrationFlag();
      48             : 
      49             :   const std::vector<NonlinearVariableName> variables{
      50         190 :       THM::XIRHOA, THM::RHOA, THM::RHOUA, THM::RHOEA};
      51             : 
      52         190 :   for (const auto & var : variables)
      53             :   {
      54         152 :     params.set<NonlinearVariableName>("variable") = var;
      55         304 :     getTHMProblem().addBoundaryCondition(class_name, genName(name(), var, "bc"), params);
      56             :   }
      57          76 : }

Generated by: LCOV version 1.14