relativeVelocityModel.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-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::relativeVelocityModel
28 
29 Description
30 
31 SourceFiles
32  relativeVelocityModel.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef relativeVelocityModel_H
37 #define relativeVelocityModel_H
38 
39 #include "fvCFD.H"
40 #include "dictionary.H"
42 #include "runTimeSelectionTables.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class relativeVelocityModel Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 {
55  // Private Member Functions
56 
57  //- Return the list of patchFieldTypes for Udm derived from U
58  wordList UdmPatchFieldTypes() const;
59 
60  //- No copy construct
62 
63  //- No copy assignment
64  void operator=(const relativeVelocityModel&) = delete;
65 
66 
67 protected:
68 
69  // Protected data
70 
71  //- Mixture properties
73 
74  //- Name of the continuous phase
76 
77  //- Continuous phase fraction
78  const volScalarField& alphac_;
79 
80  //- Dispersed phase fraction
81  const volScalarField& alphad_;
82 
83  //- Continuous density
84  const dimensionedScalar& rhoc_;
85 
86  //- Dispersed density
87  const dimensionedScalar& rhod_;
88 
89  //- Dispersed diffusion velocity
91 
92 
93 public:
94 
95  //- Runtime type information
96  TypeName("relativeVelocityModel");
97 
98  //- Declare runtime constructor selection table
100  (
101  autoPtr,
103  dictionary,
104  (const dictionary& dict,
106  (dict, mixture)
107  );
108 
109 
110  // Constructors
111 
112  //- Construct from components
114  (
115  const dictionary& dict,
117  );
118 
119 
120  // Selector
122  (
123  const dictionary& dict,
125  );
126 
127 
128  //- Destructor
129  virtual ~relativeVelocityModel();
130 
131 
132  // Member Functions
133 
134  //- Mixture properties
136  {
137  return mixture_;
138  }
139 
140  //- Return the mixture mean density
141  tmp<volScalarField> rho() const;
142 
143  //- Return the diffusion velocity of the dispersed phase
144  const volVectorField& Udm() const
145  {
146  return Udm_;
147  }
148 
149  //- Return the stress tensor due to the phase transport
151 
152  //- Update the diffusion velocity
153  virtual void correct() = 0;
154 };
155 
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 } // End namespace Foam
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 #endif
164 
165 // ************************************************************************* //
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 a number of values (eg...
Definition: dictionary.H:129
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 Foam::string.
Definition: word.H:63
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.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
Macros to ease declaration of run-time selection tables.
A class for managing temporary objects.
Definition: HashPtrTable.H:50
const volVectorField & Udm() const
Return the diffusion velocity of the dispersed phase.
Namespace for OpenFOAM.
const volScalarField & alphad_
Dispersed phase fraction.