LCOV - code coverage report
Current view: top level - src/functormaterials - ThermalDiffusivityFunctorMaterial.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: ba1ead Lines: 16 17 94.1 %
Date: 2025-08-13 06:50:25 Functions: 4 8 50.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             : // Navier-Stokes includes
      11             : #include "ThermalDiffusivityFunctorMaterial.h"
      12             : #include "NS.h"
      13             : 
      14             : registerMooseObject("NavierStokesApp", ThermalDiffusivityFunctorMaterial);
      15             : 
      16             : InputParameters
      17          82 : ThermalDiffusivityFunctorMaterial::validParams()
      18             : {
      19          82 :   auto params = FunctorMaterial::validParams();
      20          82 :   params.addClassDescription("Computes the thermal diffusivity given the thermal conductivity, "
      21             :                              "specific heat capacity, and fluid density.");
      22          82 :   params.addRequiredParam<MooseFunctorName>(NS::k, "The thermal conductivity.");
      23          82 :   params.addRequiredParam<MooseFunctorName>(NS::density, "The density.");
      24          82 :   params.addRequiredParam<MooseFunctorName>(NS::cp, "The specific heat capacity.");
      25          82 :   return params;
      26           0 : }
      27             : 
      28          44 : ThermalDiffusivityFunctorMaterial::ThermalDiffusivityFunctorMaterial(
      29          44 :     const InputParameters & parameters)
      30             :   : FunctorMaterial(parameters),
      31          44 :     _k(getFunctor<ADReal>(NS::k)),
      32          44 :     _cp(getFunctor<ADReal>(NS::cp)),
      33          44 :     _rho(getFunctor<ADReal>(NS::density))
      34             : {
      35         132 :   addFunctorProperty<ADReal>(NS::thermal_diffusivity,
      36       58700 :                              [this](const auto & r, const auto & t) -> ADReal
      37      117400 :                              { return _k(r, t) / (_rho(r, t) * _cp(r, t)); });
      38          88 : }

Generated by: LCOV version 1.14