LCOV - code coverage report
Current view: top level - src/materials - ADTemperatureWall3EqnMaterial.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #32971 (54bef8) with base c6cf66 Lines: 17 19 89.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 "ADTemperatureWall3EqnMaterial.h"
      11             : 
      12             : registerMooseObject("ThermalHydraulicsApp", ADTemperatureWall3EqnMaterial);
      13             : 
      14             : InputParameters
      15          70 : ADTemperatureWall3EqnMaterial::validParams()
      16             : {
      17          70 :   InputParameters params = Material::validParams();
      18          70 :   params.addClassDescription("Computes the wall temperature from the fluid temperature, "
      19             :                              "the heat flux and the heat transfer coefficient");
      20         140 :   params.addRequiredParam<MaterialPropertyName>("T", "Fluid temperature");
      21         140 :   params.addRequiredParam<MaterialPropertyName>("Hw", "Heat transfer coefficient");
      22         140 :   params.addRequiredParam<MaterialPropertyName>("q_wall", "Wall heat flux");
      23             : 
      24          70 :   return params;
      25           0 : }
      26             : 
      27          54 : ADTemperatureWall3EqnMaterial::ADTemperatureWall3EqnMaterial(const InputParameters & parameters)
      28             :   : Material(parameters),
      29          54 :     _T_wall(declareADProperty<Real>("T_wall")),
      30         108 :     _q_wall(getADMaterialProperty<Real>("q_wall")),
      31         108 :     _Hw(getADMaterialProperty<Real>("Hw")),
      32         162 :     _T(getADMaterialProperty<Real>("T"))
      33             : {
      34          54 : }
      35             : 
      36             : void
      37         170 : ADTemperatureWall3EqnMaterial::computeQpProperties()
      38             : {
      39         170 :   if (_q_wall[_qp] == 0)
      40           0 :     _T_wall[_qp] = _T[_qp];
      41             :   else
      42             :   {
      43             :     mooseAssert(_Hw[_qp] != 0,
      44             :                 "The wall heat transfer coefficient is zero, yet the wall heat flux is nonzero.");
      45         340 :     _T_wall[_qp] = _q_wall[_qp] / _Hw[_qp] + _T[_qp];
      46             :   }
      47         170 : }

Generated by: LCOV version 1.14