mixtureViscosityModel.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) 2014-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 Namespace
25  Foam::mixtureViscosityModels
26 
27 Description
28  A namespace for incompressible mixtureViscosityModel implementations.
29 
30 Class
31  Foam::mixtureViscosityModel
32 
33 Description
34  An abstract base class for incompressible mixtureViscosityModels.
35 
36 SourceFiles
37  mixtureViscosityModel.C
38  mixtureViscosityModelNew.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef mixtureViscosityModel_H
43 #define mixtureViscosityModel_H
44 
45 #include "viscosityModel.H"
46 #include "runTimeSelectionTables.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 class incompressibleDriftFluxMixture;
54 
55 /*---------------------------------------------------------------------------*\
56  Class mixtureViscosityModel Declaration
57 \*---------------------------------------------------------------------------*/
58 
60 :
61  public viscosityModel
62 {
63 
64 protected:
65 
66  // Protected data
67 
68  //- Mixture properties
70 
71 
72 public:
73 
74  //- Runtime type information
75  TypeName("mixtureViscosityModel");
76 
77 
78  // Declare run-time constructor selection table
79 
81  (
82  autoPtr,
84  dictionary,
85  (
87  ),
88  (mixture)
89  );
90 
91 
92  // Constructors
93 
94  //- Construct from mixture
96  (
98  );
99 
100  //- Disallow default bitwise copy construction
102 
103 
104  // Selectors
105 
106  //- Return a reference to the selected viscosity model
108  (
110  );
111 
112 
113  //- Destructor
114  virtual ~mixtureViscosityModel()
115  {}
116 
117 
118  // Member Functions
119 
120  //- Return the laminar viscosity
121  virtual tmp<volScalarField> nu() const
122  {
124  return tmp<volScalarField>(nullptr);
125  }
126 
127  //- Return the laminar viscosity for patch
128  virtual tmp<scalarField> nu(const label patchi) const
129  {
131  return tmp<scalarField>(nullptr);
132  }
133 
134  //- Correct the laminar viscosity
135  virtual void correct()
136  {}
137 
138  //- Return the mixture viscosity
139  // given the viscosity and velocity of the continuous phase
140  virtual tmp<volScalarField> mu
141  (
142  const volScalarField& muc,
143  const volVectorField& U
144  ) const = 0;
145 
146 
147  // Member Operators
148 
149  //- Disallow default bitwise assignment
150  void operator=(const mixtureViscosityModel&) = delete;
151 };
152 
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 } // End namespace Foam
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 #endif
161 
162 // ************************************************************************* //
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
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Class to represent a mixture of two constant density phases.
An abstract base class for incompressible mixtureViscosityModels.
declareRunTimeSelectionTable(autoPtr, mixtureViscosityModel, dictionary,(const incompressibleDriftFluxMixture &mixture),(mixture))
void operator=(const mixtureViscosityModel &)=delete
Disallow default bitwise assignment.
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
virtual void correct()
Correct the laminar viscosity.
static autoPtr< mixtureViscosityModel > New(const incompressibleDriftFluxMixture &mixture)
Return a reference to the selected viscosity model.
virtual tmp< volScalarField > mu(const volScalarField &muc, const volVectorField &U) const =0
Return the mixture viscosity.
mixtureViscosityModel(const incompressibleDriftFluxMixture &mixture)
Construct from mixture.
virtual ~mixtureViscosityModel()
Destructor.
const incompressibleDriftFluxMixture & mixture_
Mixture properties.
TypeName("mixtureViscosityModel")
Runtime type information.
A class for managing temporary objects.
Definition: tmp.H:55
An abstract base class for Newtonian viscosity models.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:353
label patchi
U
Definition: pEqn.H:72
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Macros to ease declaration of run-time selection tables.