LCOV - code coverage report
Current view: top level - src/components - HeatTransferFromExternalAppHeatFlux1Phase.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 35 36 97.2 %
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 "HeatTransferFromExternalAppHeatFlux1Phase.h"
      11             : #include "FlowModelSinglePhase.h"
      12             : 
      13             : registerMooseObject("ThermalHydraulicsApp", HeatTransferFromExternalAppHeatFlux1Phase);
      14             : 
      15             : InputParameters
      16          36 : HeatTransferFromExternalAppHeatFlux1Phase::validParams()
      17             : {
      18          36 :   InputParameters params = HeatTransfer1PhaseBase::validParams();
      19          36 :   params.addClassDescription("Heat transfer specified by heat flux provided by an external "
      20             :                              "application going into 1-phase flow channel.");
      21          36 :   return params;
      22           0 : }
      23             : 
      24          18 : HeatTransferFromExternalAppHeatFlux1Phase::HeatTransferFromExternalAppHeatFlux1Phase(
      25          18 :     const InputParameters & parameters)
      26          18 :   : HeatTransfer1PhaseBase(parameters)
      27             : {
      28          18 : }
      29             : 
      30             : void
      31          18 : HeatTransferFromExternalAppHeatFlux1Phase::addVariables()
      32             : {
      33          18 :   HeatTransfer1PhaseBase::addVariables();
      34             : 
      35          36 :   getTHMProblem().addSimVariable(
      36          18 :       false, _q_wall_name, libMesh::FEType(CONSTANT, MONOMIAL), _flow_channel_subdomains);
      37             : 
      38          18 :   if (!_app.isRestarting())
      39          36 :     getTHMProblem().addConstantIC(_q_wall_name, 0, _flow_channel_subdomains);
      40          18 : }
      41             : 
      42             : void
      43          18 : HeatTransferFromExternalAppHeatFlux1Phase::addMooseObjects()
      44             : {
      45          18 :   HeatTransfer1PhaseBase::addMooseObjects();
      46             : 
      47             :   {
      48          18 :     const std::string class_name = "ADCoupledVariableValueMaterial";
      49          18 :     InputParameters params = _factory.getValidParams(class_name);
      50          18 :     params.set<std::vector<SubdomainName>>("block") = _flow_channel_subdomains;
      51          18 :     params.set<MaterialPropertyName>("prop_name") = _q_wall_name;
      52          54 :     params.set<std::vector<VariableName>>("coupled_variable") = {_q_wall_name};
      53          36 :     getTHMProblem().addMaterial(class_name, genName(name(), "q_wall_material"), params);
      54          18 :   }
      55             : 
      56             :   // wall heat transfer kernel
      57             :   {
      58          18 :     const std::string class_name = "ADOneDEnergyWallHeatFlux";
      59          18 :     InputParameters params = _factory.getValidParams(class_name);
      60          36 :     params.set<NonlinearVariableName>("variable") = FlowModelSinglePhase::RHOEA;
      61          18 :     params.set<std::vector<SubdomainName>>("block") = _flow_channel_subdomains;
      62          36 :     params.set<MaterialPropertyName>("q_wall") = _q_wall_name;
      63          54 :     params.set<std::vector<VariableName>>("P_hf") = {_P_hf_name};
      64          36 :     getTHMProblem().addKernel(class_name, genName(name(), "wall_heat"), params);
      65          18 :   }
      66          36 : }
      67             : 
      68             : bool
      69          18 : HeatTransferFromExternalAppHeatFlux1Phase::isTemperatureType() const
      70             : {
      71          18 :   return false;
      72             : }

Generated by: LCOV version 1.14