linearViscousStress.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) 2013-2024 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 Description
28  Linear viscous stress turbulence model base class
29 
30 SourceFiles
31  linearViscousStress.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef linearViscousStress_H
36 #define linearViscousStress_H
37 
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 
40 namespace Foam
41 {
42 
43 /*---------------------------------------------------------------------------*\
44  Class linearViscousStress Declaration
45 \*---------------------------------------------------------------------------*/
46 
47 template<class BasicMomentumTransportModel>
49 :
50  public BasicMomentumTransportModel
51 {
52 protected:
53 
54  // Protected member functions
55 
56  //- Return the source term for the momentum equation
57  template<class RhoFieldType>
59  (
60  const RhoFieldType& rho,
62  ) const;
63 
64 
65 public:
66 
67  typedef typename BasicMomentumTransportModel::alphaField alphaField;
68  typedef typename BasicMomentumTransportModel::rhoField rhoField;
69 
70 
71  // Constructors
72 
73  //- Construct from components
75  (
76  const word& modelName,
77  const alphaField& alpha,
78  const rhoField& rho,
79  const volVectorField& U,
80  const surfaceScalarField& alphaRhoPhi,
81  const surfaceScalarField& phi,
82  const viscosity& viscosity
83  );
84 
85 
86  //- Destructor
87  virtual ~linearViscousStress()
88  {}
89 
90 
91  // Member Functions
92 
93  //- Re-read model coefficients if they have changed
94  virtual bool read() = 0;
95 
96  //- Return the effective surface stress
97  virtual tmp<surfaceVectorField> devTau() const;
98 
99  //- Return the source term for the momentum equation
101 
102  //- Return the source term for the momentum equation
104  (
105  const volScalarField& rho,
107  ) const;
108 
109  //- Solve the turbulence equations and correct the turbulence viscosity
110  virtual void correct() = 0;
111 };
112 
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 } // End namespace Foam
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 #ifdef NoRepository
121  #include "linearViscousStress.C"
122 #endif
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #endif
127 
128 // ************************************************************************* //
Generic GeometricField class.
Linear viscous stress turbulence model base class.
BasicMomentumTransportModel::alphaField alphaField
tmp< fvVectorMatrix > DivDevTau(const RhoFieldType &rho, volVectorField &U) const
Return the source term for the momentum equation.
linearViscousStress(const word &modelName, const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
Construct from components.
virtual tmp< surfaceVectorField > devTau() const
Return the effective surface stress.
virtual bool read()=0
Re-read model coefficients if they have changed.
virtual void correct()=0
Solve the turbulence equations and correct the turbulence viscosity.
virtual tmp< fvVectorMatrix > divDevTau(volVectorField &U) const
Return the source term for the momentum equation.
virtual ~linearViscousStress()
Destructor.
BasicMomentumTransportModel::rhoField rhoField
A class for managing temporary objects.
Definition: tmp.H:55
Abstract base class for all fluid physical properties.
Definition: viscosity.H:50
A class for handling words, derived from string.
Definition: word.H:62
U
Definition: pEqn.H:72
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
Namespace for OpenFOAM.