Loading...
Searching...
No Matches
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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2015-2016 OpenFOAM Foundation
9 Copyright (C) 2019 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::nonlinearEddyViscosity
29
30Group
31 grpTurbulence
32
33Description
34 Eddy viscosity turbulence model with non-linear correction base class
35
36SourceFiles
37 nonlinearEddyViscosity.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef nonlinearEddyViscosity_H
42#define nonlinearEddyViscosity_H
43
44#include "eddyViscosity.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50
51/*---------------------------------------------------------------------------*\
52 Class nonlinearEddyViscosity Declaration
53\*---------------------------------------------------------------------------*/
54
55template<class BasicTurbulenceModel>
57:
58 public eddyViscosity<BasicTurbulenceModel>
59{
60
61protected:
63 // Protected data
64
65 // Fields
66
68
69
70 // Protected Member Functions
71
72 virtual void correctNonlinearStress(const volTensorField& gradU) = 0;
75public:
76
77 typedef typename BasicTurbulenceModel::alphaField alphaField;
78 typedef typename BasicTurbulenceModel::rhoField rhoField;
79 typedef typename BasicTurbulenceModel::transportModel transportModel;
80
81
82 // Constructors
83
84 //- Construct from components
86 (
87 const word& modelName,
88 const alphaField& alpha,
89 const rhoField& rho,
90 const volVectorField& U,
91 const surfaceScalarField& alphaRhoPhi,
93 const transportModel& transport,
94 const word& propertiesName
95 );
96
97
98 //- Destructor
99 virtual ~nonlinearEddyViscosity() = default;
100
101
102 // Member Functions
103
104 //- Return the Reynolds stress tensor
105 virtual tmp<volSymmTensorField> R() const;
106
107 //- Return the effective stress tensor
108 virtual tmp<volSymmTensorField> devRhoReff() const;
109
110 //- Return the effective stress tensor based on a given velocity field
112 (
113 const volVectorField& U
114 ) const;
115
116 //- Return the source term for the momentum equation
118
119 //- Return the source term for the momentum equation
121 (
122 const volScalarField& rho,
124 ) const;
125};
126
127
128// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129
130} // End namespace Foam
131
132// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133
134#ifdef NoRepository
135 #include "nonlinearEddyViscosity.C"
136#endif
137
138// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139
140#endif
141
142// ************************************************************************* //
eddyViscosity(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.
BasicTurbulenceModel::alphaField alphaField
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.
BasicTurbulenceModel::rhoField rhoField
virtual tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U) const
Return the source term for the momentum equation.
virtual ~nonlinearEddyViscosity()=default
Destructor.
BasicTurbulenceModel::transportModel transportModel
virtual void correctNonlinearStress(const volTensorField &gradU)=0
virtual tmp< volSymmTensorField > devRhoReff() const
Return the effective stress tensor.
A class for managing temporary objects.
Definition tmp.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
U
Definition pEqn.H:72
Namespace for OpenFOAM.
GeometricField< vector, fvPatchField, volMesh > volVectorField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
GeometricField< tensor, fvPatchField, volMesh > volTensorField
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
volScalarField & alpha