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 39 : Air::validParams() 18 : { 19 39 : InputParameters params = NavierStokesMaterial::validParams(); 20 : 21 39 : 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 78 : params.addParam<Real>("dynamic_viscosity", 1.9830e-5, "in kg/m/s"); 25 : 26 39 : return params; 27 0 : } 28 : 29 30 : Air::Air(const InputParameters & parameters) 30 60 : : NavierStokesMaterial(parameters), _mu(getParam<Real>("dynamic_viscosity")) 31 : { 32 30 : } 33 : 34 : void 35 355072 : 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 1597824 : 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 1242752 : _dynamic_viscosity[qp] = _mu; 44 : } 45 : 46 : // Call base class's computeProperties() function 47 355072 : NavierStokesMaterial::computeProperties(); 48 355072 : }