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 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::nonlinearEddyViscosity
29 
30 Group
31  grpTurbulence
32 
33 Description
34  Eddy viscosity turbulence model with non-linear correction base class
35 
36 SourceFiles
37  nonlinearEddyViscosity.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef nonlinearEddyViscosity_H
42 #define nonlinearEddyViscosity_H
43 
44 #include "eddyViscosity.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class nonlinearEddyViscosity Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 template<class BasicTurbulenceModel>
57 :
58  public eddyViscosity<BasicTurbulenceModel>
59 {
60 
61 protected:
62 
63  // Protected data
64 
65  // Fields
66 
68 
69 
70  // Protected Member Functions
71 
72  virtual void correctNonlinearStress(const volTensorField& gradU) = 0;
73 
74 
75 public:
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,
92  const surfaceScalarField& phi,
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 // ************************************************************************* //
Foam::nonlinearEddyViscosity::alphaField
BasicTurbulenceModel::alphaField alphaField
Definition: nonlinearEddyViscosity.H:76
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
rho
rho
Definition: readInitialConditions.H:88
Foam::nonlinearEddyViscosity::R
virtual tmp< volSymmTensorField > R() const
Return the Reynolds stress tensor.
Definition: nonlinearEddyViscosity.C:77
Foam::nonlinearEddyViscosity
Eddy viscosity turbulence model with non-linear correction base class.
Definition: nonlinearEddyViscosity.H:55
Foam::nonlinearEddyViscosity::rhoField
BasicTurbulenceModel::rhoField rhoField
Definition: nonlinearEddyViscosity.H:77
eddyViscosity.H
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::eddyViscosity< incompressible::RASModel >::transportModel
incompressible::RASModel ::transportModel transportModel
Definition: eddyViscosity.H:78
Foam::nonlinearEddyViscosity::correctNonlinearStress
virtual void correctNonlinearStress(const volTensorField &gradU)=0
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::nonlinearEddyViscosity::devRhoReff
virtual tmp< volSymmTensorField > devRhoReff() const
Return the effective stress tensor.
Definition: nonlinearEddyViscosity.C:90
U
U
Definition: pEqn.H:72
Foam::eddyViscosity< incompressible::RASModel >::alphaField
incompressible::RASModel ::alphaField alphaField
Definition: eddyViscosity.H:76
nonlinearEddyViscosity.C
Foam::eddyViscosity< incompressible::RASModel >::rhoField
incompressible::RASModel ::rhoField rhoField
Definition: eddyViscosity.H:77
Foam::eddyViscosity
Eddy viscosity turbulence model base class.
Definition: eddyViscosity.H:55
Foam::GeometricField< symmTensor, fvPatchField, volMesh >
Foam::nonlinearEddyViscosity::nonlinearStress_
volSymmTensorField nonlinearStress_
Definition: nonlinearEddyViscosity.H:66
Foam::nonlinearEddyViscosity::divDevRhoReff
virtual tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U) const
Return the source term for the momentum equation.
Definition: nonlinearEddyViscosity.C:116
Foam::nonlinearEddyViscosity::transportModel
BasicTurbulenceModel::transportModel transportModel
Definition: nonlinearEddyViscosity.H:78
Foam::nonlinearEddyViscosity::~nonlinearEddyViscosity
virtual ~nonlinearEddyViscosity()=default
Destructor.
Foam::nonlinearEddyViscosity::nonlinearEddyViscosity
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.
Definition: nonlinearEddyViscosity.C:36