laminar.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::laminar
26 
27 Description
28  Turbulence model for laminar flow.
29 
30 SourceFiles
31  laminar.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef laminar_H
36 #define laminar_H
37 
38 #include "linearViscousStress.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------* \
46  Class laminar Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 template<class BasicTurbulenceModel>
50 class laminar
51 :
52  public linearViscousStress<BasicTurbulenceModel>
53 {
54 
55 public:
56 
57  typedef typename BasicTurbulenceModel::alphaField alphaField;
58  typedef typename BasicTurbulenceModel::rhoField rhoField;
59  typedef typename BasicTurbulenceModel::transportModel transportModel;
60 
61 
62  //- Runtime type information
63  TypeName("laminar");
64 
65 
66  // Constructors
67 
68  //- Construct from components
69  laminar
70  (
71  const alphaField& alpha,
72  const rhoField& rho,
73  const volVectorField& U,
74  const surfaceScalarField& alphaRhoPhi,
75  const surfaceScalarField& phi,
76  const transportModel& transport,
77  const word& propertiesName = turbulenceModel::propertiesName
78  );
79 
80 
81  // Selectors
82 
83  //- Return a reference to the selected turbulence model
84  static autoPtr<laminar> New
85  (
86  const alphaField& alpha,
87  const rhoField& rho,
88  const volVectorField& U,
89  const surfaceScalarField& alphaRhoPhi,
90  const surfaceScalarField& phi,
91  const transportModel& transport,
92  const word& propertiesName = turbulenceModel::propertiesName
93  );
94 
95 
96  //- Destructor
97  virtual ~laminar()
98  {}
99 
100 
101  // Member Functions
102 
103  //- Const access to the coefficients dictionary
104  virtual const dictionary& coeffDict() const;
105 
106  //- Read turbulenceProperties dictionary
107  virtual bool read();
108 
109  //- Return the turbulence viscosity, i.e. 0 for laminar flow
110  virtual tmp<volScalarField> nut() const;
111 
112  //- Return the turbulence viscosity on patch
113  virtual tmp<scalarField> nut(const label patchi) const;
114 
115  //- Return the effective viscosity, i.e. the laminar viscosity
116  virtual tmp<volScalarField> nuEff() const;
117 
118  //- Return the effective viscosity on patch
119  virtual tmp<scalarField> nuEff(const label patchi) const;
120 
121  //- Return the turbulence kinetic energy, i.e. 0 for laminar flow
122  virtual tmp<volScalarField> k() const;
123 
124  //- Return the turbulence kinetic energy dissipation rate,
125  // i.e. 0 for laminar flow
126  virtual tmp<volScalarField> epsilon() const;
127 
128  //- Return the Reynolds stress tensor, i.e. 0 for laminar flow
129  virtual tmp<volSymmTensorField> R() const;
130 
131  //- Correct the laminar viscosity
132  virtual void correct();
133 };
134 
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 } // End namespace Foam
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 #ifdef NoRepository
143  #include "laminar.C"
144 #endif
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #endif
149 
150 // ************************************************************************* //
surfaceScalarField & phi
virtual tmp< volScalarField > nuEff() const
Return the effective viscosity, i.e. the laminar viscosity.
Definition: laminar.C:149
U
Definition: pEqn.H:83
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual tmp< volScalarField > nut() const
Return the turbulence viscosity, i.e. 0 for laminar flow.
Definition: laminar.C:111
virtual bool read()
Read turbulenceProperties dictionary.
Definition: laminar.C:103
TypeName("laminar")
Runtime type information.
virtual ~laminar()
Destructor.
Definition: laminar.H:96
Linear viscous stress turbulence model base class.
virtual tmp< volSymmTensorField > R() const
Return the Reynolds stress tensor, i.e. 0 for laminar flow.
Definition: laminar.C:225
static autoPtr< laminar > New(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &propertiesName=turbulenceModel::propertiesName)
Return a reference to the selected turbulence model.
Definition: laminar.C:66
virtual tmp< volScalarField > k() const
Return the turbulence kinetic energy, i.e. 0 for laminar flow.
Definition: laminar.C:174
BasicTurbulenceModel::alphaField alphaField
Definition: laminar.H:56
virtual void correct()
Correct the laminar viscosity.
Definition: laminar.C:251
BasicTurbulenceModel::rhoField rhoField
Definition: laminar.H:57
virtual const dictionary & coeffDict() const
Const access to the coefficients dictionary.
Definition: laminar.C:96
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from string.
Definition: word.H:59
BasicTurbulenceModel::transportModel transportModel
Definition: laminar.H:58
label patchi
virtual tmp< volScalarField > epsilon() const
Return the turbulence kinetic energy dissipation rate,.
Definition: laminar.C:198
laminar(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &propertiesName=turbulenceModel::propertiesName)
Construct from components.
Definition: laminar.C:37
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:53
Turbulence model for laminar flow.
Definition: laminar.H:49
A class for managing temporary objects.
Definition: PtrList.H:54
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Namespace for OpenFOAM.