LCOV - code coverage report
Current view: top level - src/components - HeatTransferFromSpecifiedTemperature1Phase.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 30 31 96.8 %
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 "HeatTransferFromSpecifiedTemperature1Phase.h"
      11             : 
      12             : registerMooseObject("ThermalHydraulicsApp", HeatTransferFromSpecifiedTemperature1Phase);
      13             : 
      14             : InputParameters
      15         852 : HeatTransferFromSpecifiedTemperature1Phase::validParams()
      16             : {
      17         852 :   InputParameters params = HeatTransferFromTemperature1Phase::validParams();
      18        1704 :   params.addRequiredParam<FunctionName>("T_wall", "Specified wall temperature [K]");
      19        1704 :   params.declareControllable("T_wall");
      20         852 :   params.addClassDescription(
      21             :       "Heat transfer connection from a fixed temperature function for 1-phase flow");
      22         852 :   return params;
      23           0 : }
      24             : 
      25         426 : HeatTransferFromSpecifiedTemperature1Phase::HeatTransferFromSpecifiedTemperature1Phase(
      26         426 :     const InputParameters & parameters)
      27         426 :   : HeatTransferFromTemperature1Phase(parameters), _T_wall_fn_name(getParam<FunctionName>("T_wall"))
      28             : {
      29         426 : }
      30             : 
      31             : void
      32         422 : HeatTransferFromSpecifiedTemperature1Phase::addVariables()
      33             : {
      34         422 :   HeatTransferFromTemperature1Phase::addVariables();
      35             : 
      36         422 :   if (!_app.isRestarting())
      37         422 :     getTHMProblem().addFunctionIC(_T_wall_name, _T_wall_fn_name, _flow_channel_subdomains);
      38             : 
      39         844 :   makeFunctionControllableIfConstant(_T_wall_fn_name, "T_wall");
      40         422 : }
      41             : 
      42             : void
      43         422 : HeatTransferFromSpecifiedTemperature1Phase::addMooseObjects()
      44             : {
      45         422 :   HeatTransferFromTemperature1Phase::addMooseObjects();
      46             : 
      47             :   {
      48         422 :     const std::string class_name = "FunctionAux";
      49         422 :     InputParameters params = _factory.getValidParams(class_name);
      50         844 :     params.set<AuxVariableName>("variable") = _T_wall_name;
      51         422 :     params.set<std::vector<SubdomainName>>("block") = _flow_channel_subdomains;
      52         422 :     params.set<FunctionName>("function") = _T_wall_fn_name;
      53             : 
      54         422 :     ExecFlagEnum execute_on(MooseUtils::getDefaultExecFlagEnum());
      55        1688 :     execute_on = {EXEC_INITIAL, EXEC_LINEAR};
      56         422 :     params.set<ExecFlagEnum>("execute_on") = execute_on;
      57             : 
      58         844 :     getTHMProblem().addAuxKernel(class_name, genName(name(), "T_wall_auxkernel"), params);
      59         422 :   }
      60             : 
      61         422 :   addHeatTransferKernels();
      62         844 : }

Generated by: LCOV version 1.14