relativeVelocityModel.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-2018 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::relativeVelocityModel
26 
27 Description
28 
29 SourceFiles
30  relativeVelocityModel.C
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef relativeVelocityModel_H
35 #define relativeVelocityModel_H
36 
37 #include "fvCFD.H"
38 #include "dictionary.H"
40 #include "runTimeSelectionTables.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class relativeVelocityModel Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 {
53  // Private Member Functions
54 
55  //- Return the list of patchFieldTypes for Udm derived from U
56  wordList UdmPatchFieldTypes() const;
57 
58  //- Disallow default bitwise copy construct
60 
61  //- Disallow default bitwise assignment
62  void operator=(const relativeVelocityModel&);
63 
64 
65 protected:
66 
67  // Protected data
68 
69  //- Mixture properties
71 
72  //- Name of the continuous phase
74 
75  //- Continuous phase fraction
76  const volScalarField& alphac_;
77 
78  //- Dispersed phase fraction
79  const volScalarField& alphad_;
80 
81  //- Continuous density
82  const dimensionedScalar& rhoc_;
83 
84  //- Dispersed density
85  const dimensionedScalar& rhod_;
86 
87  //- Dispersed diffusion velocity
88  mutable volVectorField Udm_;
89 
90 
91 public:
92 
93  //- Runtime type information
94  TypeName("relativeVelocityModel");
95 
96  //- Declare runtime constructor selection table
98  (
99  autoPtr,
101  dictionary,
102  (const dictionary& dict,
104  (dict, mixture)
105  );
106 
107 
108  // Constructors
109 
110  //- Construct from components
112  (
113  const dictionary& dict,
115  );
116 
117 
118  // Selector
120  (
121  const dictionary& dict,
123  );
124 
125 
126  //- Destructor
127  virtual ~relativeVelocityModel();
128 
129 
130  // Member Functions
131 
132  //- Mixture properties
134  {
135  return mixture_;
136  }
137 
138  //- Return the mixture mean density
139  tmp<volScalarField> rho() const;
140 
141  //- Return the diffusion velocity of the dispersed phase
142  const volVectorField& Udm() const
143  {
144  return Udm_;
145  }
146 
147  //- Return the stress tensor due to the phase transport
149 
150  //- Update the diffusion velocity
151  virtual void correct() = 0;
152 };
153 
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 } // End namespace Foam
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 #endif
162 
163 // ************************************************************************* //
A two-phase incompressible transportModel for interacting phases requiring the direct evaluation of t...
dictionary dict
const volScalarField & alphac_
Continuous phase fraction.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
TypeName("relativeVelocityModel")
Runtime type information.
const dimensionedScalar & rhod_
Dispersed density.
const incompressibleTwoPhaseInteractingMixture & mixture_
Mixture properties.
volVectorField Udm_
Dispersed diffusion velocity.
static autoPtr< relativeVelocityModel > New(const dictionary &dict, const incompressibleTwoPhaseInteractingMixture &mixture)
virtual void correct()=0
Update the diffusion velocity.
declareRunTimeSelectionTable(autoPtr, relativeVelocityModel, dictionary,(const dictionary &dict, const incompressibleTwoPhaseInteractingMixture &mixture),(dict, mixture))
Declare runtime constructor selection table.
A class for handling words, derived from string.
Definition: word.H:59
virtual ~relativeVelocityModel()
Destructor.
const incompressibleTwoPhaseInteractingMixture & mixture() const
Mixture properties.
tmp< volSymmTensorField > tauDm() const
Return the stress tensor due to the phase transport.
const word continuousPhaseName_
Name of the continuous phase.
tmp< volScalarField > rho() const
Return the mixture mean density.
const dimensionedScalar & rhoc_
Continuous density.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Macros to ease declaration of run-time selection tables.
A class for managing temporary objects.
Definition: PtrList.H:53
const volVectorField & Udm() const
Return the diffusion velocity of the dispersed phase.
Namespace for OpenFOAM.
const volScalarField & alphad_
Dispersed phase fraction.