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