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-2022 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 
46 #include "viscosityModel.H"
47 #include "runTimeSelectionTables.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class mixtureViscosityModel Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 :
60  public viscosityModel
61 {
62 
63 protected:
64 
65  // Protected data
66 
67  //- Mixture properties
69 
70 
71 public:
72 
73  //- Runtime type information
74  TypeName("mixtureViscosityModel");
75 
76 
77  // Declare run-time constructor selection table
78 
80  (
81  autoPtr,
83  dictionary,
84  (
86  ),
87  (mixture)
88  );
89 
90 
91  // Constructors
92 
93  //- Construct from mixture
95  (
97  );
98 
99  //- Disallow default bitwise copy construction
101 
102 
103  // Selectors
104 
105  //- Return a reference to the selected viscosity model
107  (
109  );
110 
111 
112  //- Destructor
113  virtual ~mixtureViscosityModel()
114  {}
115 
116 
117  // Member Functions
118 
119  //- Return the laminar viscosity
120  virtual tmp<volScalarField> nu() const
121  {
123  return tmp<volScalarField>(nullptr);
124  }
125 
126  //- Return the laminar viscosity for patch
127  virtual tmp<scalarField> nu(const label patchi) const
128  {
130  return tmp<scalarField>(nullptr);
131  }
132 
133  //- Correct the laminar viscosity
134  virtual void correct()
135  {}
136 
137  //- Return the mixture viscosity
138  // given the viscosity and velocity of the continuous phase
139  virtual tmp<volScalarField> mu
140  (
141  const volScalarField& muc,
142  const volVectorField& U
143  ) const = 0;
144 
145 
146  // Member Operators
147 
148  //- Disallow default bitwise assignment
149  void operator=(const mixtureViscosityModel&) = delete;
150 };
151 
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 } // End namespace Foam
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 #endif
160 
161 // ************************************************************************* //
A two-phase incompressible transportModel for interacting phases requiring the direct evaluation of t...
U
Definition: pEqn.H:72
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
virtual ~mixtureViscosityModel()
Destructor.
volScalarField muc(IOobject(IOobject::groupName("mu", continuousPhaseName), runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), rhoc *continuousPhaseViscosity->nu())
An abstract base class for Newtonian viscosity models.
virtual void correct()
Correct the laminar viscosity.
An abstract base class for incompressible mixtureViscosityModels.
declareRunTimeSelectionTable(autoPtr, mixtureViscosityModel, dictionary,(const incompressibleTwoPhaseInteractingMixture &mixture),(mixture))
static autoPtr< mixtureViscosityModel > New(const incompressibleTwoPhaseInteractingMixture &mixture)
Return a reference to the selected viscosity model.
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
const incompressibleTwoPhaseInteractingMixture & mixture_
Mixture properties.
mixtureViscosityModel(const incompressibleTwoPhaseInteractingMixture &mixture)
Construct from mixture.
TypeName("mixtureViscosityModel")
Runtime type information.
label patchi
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
virtual tmp< volScalarField > mu(const volScalarField &muc, const volVectorField &U) const =0
Return the mixture viscosity.
Macros to ease declaration of run-time selection tables.
A class for managing temporary objects.
Definition: PtrList.H:53
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:353
void operator=(const mixtureViscosityModel &)=delete
Disallow default bitwise assignment.
Namespace for OpenFOAM.