linearViscousStress.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-2015 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::linearViscousStress
26 
27 Group
28  grpTurbulence
29 
30 Description
31  Linear viscous stress turbulence model base class
32 
33 SourceFiles
34  linearViscousStress.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef linearViscousStress_H
39 #define linearViscousStress_H
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class linearViscousStress Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 template<class BasicTurbulenceModel>
52 :
53  public BasicTurbulenceModel
54 {
55 
56 public:
57 
58  typedef typename BasicTurbulenceModel::alphaField alphaField;
59  typedef typename BasicTurbulenceModel::rhoField rhoField;
60  typedef typename BasicTurbulenceModel::transportModel transportModel;
61 
62 
63  // Constructors
64 
65  //- Construct from components
67  (
68  const word& modelName,
69  const alphaField& alpha,
70  const rhoField& rho,
71  const volVectorField& U,
72  const surfaceScalarField& alphaRhoPhi,
73  const surfaceScalarField& phi,
74  const transportModel& transport,
75  const word& propertiesName
76  );
77 
78 
79  //- Destructor
80  virtual ~linearViscousStress()
81  {}
82 
83 
84  // Member Functions
85 
86  //- Re-read model coefficients if they have changed
87  virtual bool read() = 0;
88 
89  //- Return the effective stress tensor
90  virtual tmp<volSymmTensorField> devRhoReff() const;
91 
92  //- Return the source term for the momentum equation
94 
95  //- Return the source term for the momentum equation
97  (
98  const volScalarField& rho,
100  ) const;
101 
102  //- Solve the turbulence equations and correct the turbulence viscosity
103  virtual void correct() = 0;
104 };
105 
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 } // End namespace Foam
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 #ifdef NoRepository
114 # include "linearViscousStress.C"
115 #endif
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 #endif
120 
121 // ************************************************************************* //
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:216
Foam::linearViscousStress::read
virtual bool read()=0
Re-read model coefficients if they have changed.
Definition: linearViscousStress.C:62
U
U
Definition: pEqn.H:46
Foam::linearViscousStress::transportModel
BasicTurbulenceModel::transportModel transportModel
Definition: linearViscousStress.H:59
Foam::linearViscousStress
Linear viscous stress turbulence model base class.
Definition: linearViscousStress.H:50
Foam::linearViscousStress::correct
virtual void correct()=0
Solve the turbulence equations and correct the turbulence viscosity.
Definition: linearViscousStress.C:123
Foam::linearViscousStress::rhoField
BasicTurbulenceModel::rhoField rhoField
Definition: linearViscousStress.H:58
Foam::linearViscousStress::linearViscousStress
linearViscousStress(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: linearViscousStress.C:34
Foam::linearViscousStress::devRhoReff
virtual tmp< volSymmTensorField > devRhoReff() const
Return the effective stress tensor.
Definition: linearViscousStress.C:70
Foam::RASModel::rhoField
BasicTurbulenceModel::rhoField rhoField
Definition: RASModel.H:100
Foam::linearViscousStress::divDevRhoReff
virtual tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U) const
Return the source term for the momentum equation.
Definition: linearViscousStress.C:94
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::RASModel::alphaField
BasicTurbulenceModel::alphaField alphaField
Definition: RASModel.H:99
linearViscousStress.C
Foam::linearViscousStress::~linearViscousStress
virtual ~linearViscousStress()
Destructor.
Definition: linearViscousStress.H:79
rho
rho
Definition: pEqn.H:3
Foam::RASModel::transportModel
BasicTurbulenceModel::transportModel transportModel
Definition: RASModel.H:101
Foam::linearViscousStress::alphaField
BasicTurbulenceModel::alphaField alphaField
Definition: linearViscousStress.H:57
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52