simplifiedViscousStress.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) 2026 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::simplifiedViscousStress
26 
27 Description
28  Simplified linear viscous stress momentum transport model base class
29 
30  For incompressible uniform viscosity flow in which the transpose and
31  dilatation terms in the linear stress model are formally zero.
32 
33  This model can also be useful for complex surface film cases in which
34  the transpose and dilatation terms are relatively very small compared to
35  the wall surface stress and can safely be ignored avoiding potentially
36  large numerical errors around sharp corners.
37 
38 SourceFiles
39  simplifiedViscousStress.C
40 
41 \*---------------------------------------------------------------------------*/
42 
43 #ifndef simplifiedViscousStress_H
44 #define simplifiedViscousStress_H
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class simplifiedViscousStress Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 template<class BasicMomentumTransportModel>
57 :
58  public BasicMomentumTransportModel
59 {
60 protected:
61 
62  // Protected Member Functions
63 
64  //- Return the source term for the momentum equation
65  template<class RhoFieldType>
67  (
68  const RhoFieldType& rho,
70  ) const;
71 
72 
73 public:
74 
75  typedef typename BasicMomentumTransportModel::alphaField alphaField;
76  typedef typename BasicMomentumTransportModel::rhoField rhoField;
77 
78 
79  //- Runtime type information
80  ClassName("simplified");
81 
82 
83  // Constructors
84 
85  //- Construct from components
87  (
88  const word& modelName,
89  const alphaField& alpha,
90  const rhoField& rho,
91  const volVectorField& U,
92  const surfaceScalarField& alphaRhoPhi,
93  const surfaceScalarField& phi,
94  const viscosity& viscosity
95  );
96 
97 
98  //- Destructor
99  virtual ~simplifiedViscousStress()
100  {}
101 
102 
103  // Member Functions
104 
105  //- Re-read model coefficients if they have changed
106  virtual bool read() = 0;
107 
108  //- Return the effective surface stress
109  virtual tmp<surfaceVectorField> devTau() const;
110 
111  //- Return the source term for the momentum equation
113 
114  //- Return the source term for the momentum equation
116  (
117  const volScalarField& rho,
119  ) const;
120 
121  //- Solve the turbulence equations and correct the turbulence viscosity
122  virtual void correct() = 0;
123 };
124 
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 } // End namespace Foam
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #ifdef NoRepository
133  #include "simplifiedViscousStress.C"
134 #endif
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 #endif
139 
140 // ************************************************************************* //
Generic GeometricField class.
Simplified linear viscous stress momentum transport model base class.
BasicMomentumTransportModel::alphaField alphaField
tmp< fvVectorMatrix > DivDevTau(const RhoFieldType &rho, volVectorField &U) const
Return the source term for the momentum equation.
virtual tmp< surfaceVectorField > devTau() const
Return the effective surface stress.
virtual bool read()=0
Re-read model coefficients if they have changed.
simplifiedViscousStress(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 ~simplifiedViscousStress()
Destructor.
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.
ClassName("simplified")
Runtime type information.
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:63
U
Definition: pEqn.H:72
rho
Definition: pEqn.H:1
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
Namespace for OpenFOAM.