mixtureViscosityModel.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2014-2015 OpenFOAM Foundation
9 Copyright (C) 2019 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Namespace
28 Foam::mixtureViscosityModels
29
30Description
31 A namespace for incompressible mixtureViscosityModel implementations.
32
33Class
34 Foam::mixtureViscosityModel
35
36Description
37 An abstract base class for incompressible mixtureViscosityModels.
38
39SourceFiles
40 mixtureViscosityModel.C
41 mixtureViscosityModelNew.C
42
43\*---------------------------------------------------------------------------*/
44
45#ifndef mixtureViscosityModel_H
46#define mixtureViscosityModel_H
47
48#include "dictionary.H"
49#include "volFieldsFwd.H"
50#include "surfaceFieldsFwd.H"
51#include "dimensionedScalar.H"
53
54// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55
56namespace Foam
57{
58
59/*---------------------------------------------------------------------------*\
60 Class mixtureViscosityModel Declaration
61\*---------------------------------------------------------------------------*/
64{
65
66protected:
67
68 // Protected data
75
76
77 // Private Member Functions
78
79 //- No copy construct
81
82 //- No copy assignment
83 void operator=(const mixtureViscosityModel&) = delete;
84
85
86public:
87
88 //- Runtime type information
89 TypeName("mixtureViscosityModel");
90
91
92 // Declare run-time constructor selection table
95 (
96 autoPtr,
99 (
100 const word& name,
102 const volVectorField& U,
104 ),
106 );
107
108
109 // Selectors
110
111 //- Return a reference to the selected viscosity model
113 (
114 const word& name,
116 const volVectorField& U,
118 );
119
120
121 // Constructors
122
123 //- Construct from components
125 (
126 const word& name,
128 const volVectorField& U,
130 );
131
132
133 //- Destructor
134 virtual ~mixtureViscosityModel() = default;
135
136
137 // Member Functions
138
139 //- Return the phase transport properties dictionary
140 const dictionary& viscosityProperties() const
141 {
143 }
144
145 //- Return the mixture viscosity
146 // given the viscosity of the continuous phase
147 virtual tmp<volScalarField> mu(const volScalarField& muc) const = 0;
148
149 //- Read transportProperties dictionary
150 virtual bool read(const dictionary& viscosityProperties) = 0;
151};
152
153
154// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155
156} // End namespace Foam
157
158// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159
160#endif
161
162// ************************************************************************* //
surfaceScalarField & phi
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
An abstract base class for incompressible mixtureViscosityModels.
mixtureViscosityModel(const mixtureViscosityModel &)=delete
No copy construct.
mixtureViscosityModel(const word &name, const dictionary &viscosityProperties, const volVectorField &U, const surfaceScalarField &phi)
Construct from components.
static autoPtr< mixtureViscosityModel > New(const word &name, const dictionary &viscosityProperties, const volVectorField &U, const surfaceScalarField &phi)
Return a reference to the selected viscosity model.
declareRunTimeSelectionTable(autoPtr, mixtureViscosityModel, dictionary,(const word &name, const dictionary &viscosityProperties, const volVectorField &U, const surfaceScalarField &phi),(name, viscosityProperties, U, phi))
const surfaceScalarField & phi_
void operator=(const mixtureViscosityModel &)=delete
No copy assignment.
virtual ~mixtureViscosityModel()=default
Destructor.
const dictionary & viscosityProperties() const
Return the phase transport properties dictionary.
TypeName("mixtureViscosityModel")
Runtime type information.
virtual bool read(const dictionary &viscosityProperties)=0
Read transportProperties dictionary.
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
U
Definition: pEqn.H:72
const volScalarField & mu
Namespace for OpenFOAM.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73