LCOV - code coverage report
Current view: top level - src/materials - Air.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: 9fc4b0 Lines: 13 14 92.9 %
Date: 2025-08-14 10:14:56 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 "Air.h"
      11             : 
      12             : #include "libmesh/quadrature.h"
      13             : 
      14             : registerMooseObject("NavierStokesApp", Air);
      15             : 
      16             : InputParameters
      17          85 : Air::validParams()
      18             : {
      19          85 :   InputParameters params = NavierStokesMaterial::validParams();
      20             : 
      21          85 :   params.addClassDescription("Air.");
      22             :   // Allow the user to specify the dynamic viscosity from the input file,
      23             :   // otherwise use the value at 300K by default
      24         170 :   params.addParam<Real>("dynamic_viscosity", 1.9830e-5, "in kg/m/s");
      25             : 
      26          85 :   return params;
      27           0 : }
      28             : 
      29          66 : Air::Air(const InputParameters & parameters)
      30         132 :   : NavierStokesMaterial(parameters), _mu(getParam<Real>("dynamic_viscosity"))
      31             : {
      32          66 : }
      33             : 
      34             : void
      35      526848 : Air::computeProperties()
      36             : {
      37             :   // Constant "\mu" values (kg / m / s) for air at various temperatures.  Pick the
      38             :   // one that makes sense for the current calculation.  A class employing
      39             :   // Sutherland's curve fit for air might also be good to have...
      40     2370816 :   for (unsigned int qp = 0; qp < _qrule->n_points(); qp++)
      41             :   {
      42             :     // Return the default dynamic_viscosity or whatever was set in the input file.
      43     1843968 :     _dynamic_viscosity[qp] = _mu;
      44             :   }
      45             : 
      46             :   // Call base class's computeProperties() function
      47      526848 :   NavierStokesMaterial::computeProperties();
      48      526848 : }

Generated by: LCOV version 1.14