filmCompressibleMomentumTransportModel.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) 2023 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::filmCompressibleMomentumTransportModel
26 
27 Description
28  Abstract base class for film compressible momentum transport models.
29 
30 SourceFiles
31  filmCompressibleMomentumTransportModel.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef filmCompressibleMomentumTransportModel_H
36 #define filmCompressibleMomentumTransportModel_H
37 
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class filmCompressibleMomentumTransportModel Declaration
47 \*---------------------------------------------------------------------------*/
48 
50 :
52 {
53 
54 public:
55 
57  typedef volScalarField rhoField;
58 
59 
60 protected:
61 
62  // Protected data
63 
64  const alphaField& alpha_;
65 
66 
67 public:
68 
69  // Declare run-time constructor selection table
70 
72  (
73  autoPtr,
75  dictionary,
76  (
77  const alphaField& alpha,
78  const rhoField& rho,
79  const volVectorField& U,
81  const surfaceScalarField& phi,
82  const viscosity& viscosity
83  ),
85  );
86 
87 
88  // Constructors
89 
90  //- Construct
92  (
93  const word& type,
94  const alphaField& alpha,
95  const volScalarField& rho,
96  const volVectorField& U,
98  const surfaceScalarField& phi,
99  const viscosity& viscosity
100  );
101 
102 
103  // Selectors
104 
105  //- Return a reference to the selected turbulence model
107  (
108  const alphaField& alpha,
109  const volScalarField& rho,
110  const volVectorField& U,
112  const surfaceScalarField& phi,
113  const viscosity& viscosity
114  );
115 
116 
117  //- Destructor
119  {}
120 
121 
122  // Member Functions
123 
124  //- Access function to phase fraction
125  const alphaField& alpha() const
126  {
127  return alpha_;
128  }
129 
130  //- Return the effective stress tensor including the laminar stress
131  virtual tmp<volSymmTensorField> devTau() const = 0;
132 
133  //- Return the source term for the momentum equation
134  virtual tmp<fvVectorMatrix> divDevTau(volVectorField& U) const = 0;
135 };
136 
137 
138 namespace filmCompressible
139 {
141 
142  template<class FilmCompressibleMomentumTransportModel>
144  (
145  const volScalarField& alpha,
146  const volScalarField& rho,
147  const volVectorField& U,
148  const surfaceScalarField& alphaRhoPhi,
149  const surfaceScalarField& phi,
150  const viscosity& viscosity
151  );
152 }
153 
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 } // End namespace Foam
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 #ifdef NoRepository
163 #endif
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 #endif
168 
169 // ************************************************************************* //
Generic GeometricField class.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Base class for single-phase compressible turbulence models.
virtual tmp< surfaceScalarField > phi() const
Return the volumetric flux field.
const rhoField & rho() const
Return the density field.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Abstract base class for film compressible momentum transport models.
filmCompressibleMomentumTransportModel(const word &type, const alphaField &alpha, const volScalarField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
Construct.
virtual tmp< fvVectorMatrix > divDevTau(volVectorField &U) const =0
Return the source term for the momentum equation.
static autoPtr< filmCompressibleMomentumTransportModel > New(const alphaField &alpha, const volScalarField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
Return a reference to the selected turbulence model.
const alphaField & alpha() const
Access function to phase fraction.
declareRunTimeNewSelectionTable(autoPtr, filmCompressibleMomentumTransportModel, dictionary,(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity),(alpha, rho, U, alphaRhoPhi, phi, viscosity))
virtual tmp< volSymmTensorField > devTau() const =0
Return the effective stress tensor including the laminar stress.
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
const volVectorField & U() const
Access function to velocity field.
const surfaceScalarField & alphaRhoPhi() const
Access function to phase flux field.
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))
autoPtr< FilmCompressibleMomentumTransportModel > New(const volScalarField &alpha, const volScalarField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
filmCompressibleMomentumTransportModel momentumTransportModel
Typedefs for film filmMomentumTransportModels.
Namespace for OpenFOAM.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488