www.mooseframework.org
Air.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
18 {
20 
21  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  params.addParam<Real>("dynamic_viscosity", 1.9830e-5, "in kg/m/s");
25 
26  return params;
27 }
28 
29 Air::Air(const InputParameters & parameters)
30  : NavierStokesMaterial(parameters), _mu(getParam<Real>("dynamic_viscosity"))
31 {
32 }
33 
34 void
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  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  _dynamic_viscosity[qp] = _mu;
44  }
45 
46  // Call base class's computeProperties() function
48 }
MaterialProperty< Real > & _dynamic_viscosity
const QBase *const & _qrule
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static InputParameters validParams()
Definition: Air.C:17
Air(const InputParameters &parameters)
Definition: Air.C:29
static InputParameters validParams()
virtual void computeProperties()
Must be called after the child class computes dynamic_viscocity.
Definition: Air.C:35
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Definition: Air.h:18
registerMooseObject("NavierStokesApp", Air)
void addClassDescription(const std::string &doc_string)
This is the base class all materials should use if you are trying to use the Navier-Stokes Kernels...
Real _mu
Definition: Air.h:43
virtual void computeProperties()
Must be called after the child class computes dynamic_viscocity.