LCOV - code coverage report
Current view: top level - src/materials - ADPrandtlNumberMaterial.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 17 18 94.4 %
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 "ADPrandtlNumberMaterial.h"
      11             : #include "Numerics.h"
      12             : #include "FlowModelSinglePhase.h"
      13             : 
      14             : registerMooseObject("ThermalHydraulicsApp", ADPrandtlNumberMaterial);
      15             : 
      16             : InputParameters
      17          85 : ADPrandtlNumberMaterial::validParams()
      18             : {
      19          85 :   InputParameters params = Material::validParams();
      20         170 :   params.addParam<MaterialPropertyName>("Pr", "Pr", "Prandlt number property name");
      21         170 :   params.addParam<MaterialPropertyName>("cp",
      22             :                                         FlowModelSinglePhase::SPECIFIC_HEAT_CONSTANT_PRESSURE,
      23             :                                         "Constant-pressure specific heat");
      24         170 :   params.addParam<MaterialPropertyName>(
      25             :       "mu", FlowModelSinglePhase::DYNAMIC_VISCOSITY, "Dynamic viscosity");
      26         170 :   params.addParam<MaterialPropertyName>(
      27             :       "k", FlowModelSinglePhase::THERMAL_CONDUCTIVITY, "Thermal conductivity");
      28          85 :   params.addClassDescription("Computes Prandtl number as material property");
      29          85 :   return params;
      30           0 : }
      31             : 
      32          66 : ADPrandtlNumberMaterial::ADPrandtlNumberMaterial(const InputParameters & parameters)
      33             :   : Material(parameters),
      34          66 :     _Pr(declareADProperty<Real>("Pr")),
      35         132 :     _cp(getADMaterialProperty<Real>("cp")),
      36         132 :     _mu(getADMaterialProperty<Real>("mu")),
      37         198 :     _k(getADMaterialProperty<Real>("k"))
      38             : {
      39          66 : }
      40             : 
      41             : void
      42           9 : ADPrandtlNumberMaterial::computeQpProperties()
      43             : {
      44           9 :   _Pr[_qp] = THM::Prandtl(_cp[_qp], _mu[_qp], _k[_qp]);
      45           9 : }

Generated by: LCOV version 1.14