nonlinearEddyViscosity.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) 2015-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::nonlinearEddyViscosity
26 
27 Group
28  grpTurbulence
29 
30 Description
31  Eddy viscosity turbulence model with non-linear correction base class
32 
33 SourceFiles
34  nonlinearEddyViscosity.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef nonlinearEddyViscosity_H
39 #define nonlinearEddyViscosity_H
40 
41 #include "eddyViscosity.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class nonlinearEddyViscosity Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 template<class BasicTurbulenceModel>
54 :
55  public eddyViscosity<BasicTurbulenceModel>
56 {
57 
58 protected:
59 
60  // Protected data
61 
62  // Fields
63 
65 
66 
67  // Protected Member Functions
68 
69  virtual void correctNonlinearStress(const volTensorField& gradU) = 0;
70 
71 
72 public:
73 
74  typedef typename BasicTurbulenceModel::alphaField alphaField;
75  typedef typename BasicTurbulenceModel::rhoField rhoField;
76  typedef typename BasicTurbulenceModel::transportModel transportModel;
77 
78 
79  // Constructors
80 
81  //- Construct from components
83  (
84  const word& modelName,
85  const alphaField& alpha,
86  const rhoField& rho,
87  const volVectorField& U,
88  const surfaceScalarField& alphaRhoPhi,
89  const surfaceScalarField& phi,
90  const transportModel& transport,
91  const word& propertiesName
92  );
93 
94 
95  //- Destructor
96  virtual ~nonlinearEddyViscosity()
97  {}
98 
99 
100  // Member Functions
101 
102  //- Return the Reynolds stress tensor
103  virtual tmp<volSymmTensorField> R() const;
104 
105  //- Return the effective stress tensor
106  virtual tmp<volSymmTensorField> devRhoReff() const;
107 
108  //- Return the source term for the momentum equation
110 
111  //- Return the source term for the momentum equation
113  (
114  const volScalarField& rho,
115  volVectorField& U
116  ) const;
117 };
118 
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 } // End namespace Foam
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #ifdef NoRepository
127  #include "nonlinearEddyViscosity.C"
128 #endif
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #endif
133 
134 // ************************************************************************* //
surfaceScalarField & phi
U
Definition: pEqn.H:83
Eddy viscosity turbulence model with non-linear correction base class.
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:52
virtual ~nonlinearEddyViscosity()
Destructor.
virtual tmp< volSymmTensorField > devRhoReff() const
Return the effective stress tensor.
BasicTurbulenceModel::alphaField alphaField
virtual void correctNonlinearStress(const volTensorField &gradU)=0
A class for handling words, derived from string.
Definition: word.H:59
BasicTurbulenceModel::rhoField rhoField
BasicTurbulenceModel::transportModel transportModel
virtual tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U) const
Return the source term for the momentum equation.
nonlinearEddyViscosity(const word &modelName, const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transport, const word &propertiesName)
Construct from components.
virtual tmp< volSymmTensorField > R() const
Return the Reynolds stress tensor.
A class for managing temporary objects.
Definition: PtrList.H:54
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Namespace for OpenFOAM.