LCOV - code coverage report
Current view: top level - src/materials - ADConvectionHeatFluxMaterial.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 19 20 95.0 %
Date: 2025-07-30 13:02:48 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 "ADConvectionHeatFluxMaterial.h"
      11             : 
      12             : registerMooseObject("ThermalHydraulicsApp", ADConvectionHeatFluxMaterial);
      13             : 
      14             : InputParameters
      15          85 : ADConvectionHeatFluxMaterial::validParams()
      16             : {
      17          85 :   InputParameters params = Material::validParams();
      18             : 
      19         170 :   params.addRequiredParam<MaterialPropertyName>("q_wall", "Wall heat flux material property");
      20         170 :   params.addRequiredParam<MaterialPropertyName>("T", "Fluid phase temperature material property");
      21         170 :   params.addRequiredCoupledVar("T_wall", "Wall temperature");
      22         170 :   params.addRequiredParam<MaterialPropertyName>(
      23             :       "htc_wall", "Fluid phase wall heat transfer coefficient material property");
      24         170 :   params.addRequiredParam<MaterialPropertyName>(
      25             :       "kappa", "Fluid phase wall contact fraction material property");
      26             : 
      27          85 :   params.addClassDescription("Computes heat flux from convection for a given fluid phase.");
      28             : 
      29          85 :   return params;
      30           0 : }
      31             : 
      32          66 : ADConvectionHeatFluxMaterial::ADConvectionHeatFluxMaterial(const InputParameters & parameters)
      33             :   : Material(parameters),
      34             : 
      35          66 :     _q_wall(declareADProperty<Real>(getParam<MaterialPropertyName>("q_wall"))),
      36         132 :     _T(getADMaterialProperty<Real>("T")),
      37          66 :     _T_wall(adCoupledValue("T_wall")),
      38         132 :     _htc_wall(getADMaterialProperty<Real>("htc_wall")),
      39         198 :     _kappa(getADMaterialProperty<Real>("kappa"))
      40             : {
      41          66 : }
      42             : 
      43             : void
      44           9 : ADConvectionHeatFluxMaterial::computeQpProperties()
      45             : {
      46          27 :   _q_wall[_qp] = _kappa[_qp] * _htc_wall[_qp] * (_T_wall[_qp] - _T[_qp]);
      47           9 : }

Generated by: LCOV version 1.14