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 
16 template <>
17 InputParameters
19 {
20  InputParameters params = validParams<NavierStokesMaterial>();
21 
22  params.addClassDescription("Air.");
23  // Allow the user to specify the dynamic viscosity from the input file,
24  // otherwise use the value at 300K by default
25  params.addParam<Real>("dynamic_viscosity", 1.9830e-5, "in kg/m/s");
26 
27  return params;
28 }
29 
30 Air::Air(const InputParameters & parameters)
31  : NavierStokesMaterial(parameters), _mu(getParam<Real>("dynamic_viscosity"))
32 {
33 }
34 
35 void
37 {
38  // Constant "\mu" values (kg / m / s) for air at various temperatures. Pick the
39  // one that makes sense for the current calculation. A class employing
40  // Sutherland's curve fit for air might also be good to have...
41  for (unsigned int qp = 0; qp < _qrule->n_points(); qp++)
42  {
43  // Return the default dynamic_viscosity or whatever was set in the input file.
44  _dynamic_viscosity[qp] = _mu;
45  }
46 
47  // Call base class's computeProperties() function
49 }
registerMooseObject
registerMooseObject("NavierStokesApp", Air)
validParams< NavierStokesMaterial >
InputParameters validParams< NavierStokesMaterial >()
Definition: NavierStokesMaterial.C:25
Air::Air
Air(const InputParameters &parameters)
Definition: Air.C:30
Air::computeProperties
virtual void computeProperties()
Must be called after the child class computes dynamic_viscocity.
Definition: Air.C:36
NavierStokesMaterial
This is the base class all materials should use if you are trying to use the Navier-Stokes Kernels.
Definition: NavierStokesMaterial.h:36
validParams< Air >
InputParameters validParams< Air >()
Definition: Air.C:18
NavierStokesMaterial::computeProperties
virtual void computeProperties()
Must be called after the child class computes dynamic_viscocity.
Definition: NavierStokesMaterial.C:116
Air
Definition: Air.h:22
NavierStokesMaterial::_dynamic_viscosity
MaterialProperty< Real > & _dynamic_viscosity
Definition: NavierStokesMaterial.h:55
Air::_mu
Real _mu
Definition: Air.h:45
Air.h