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
90  mutable volVectorField Udm_;
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
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 #endif
164 
165 // ************************************************************************* //
Foam::relativeVelocityModel::Udm_
volVectorField Udm_
Dispersed diffusion velocity.
Definition: relativeVelocityModel.H:89
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::relativeVelocityModel
Definition: relativeVelocityModel.H:52
Foam::relativeVelocityModel::rho
tmp< volScalarField > rho() const
Return the mixture mean density.
Foam::relativeVelocityModel::correct
virtual void correct()=0
Update the diffusion velocity.
Foam::relativeVelocityModel::continuousPhaseName_
const word continuousPhaseName_
Name of the continuous phase.
Definition: relativeVelocityModel.H:74
Foam::relativeVelocityModel::rhod_
const dimensionedScalar & rhod_
Dispersed density.
Definition: relativeVelocityModel.H:86
Foam::relativeVelocityModel::Udm
const volVectorField & Udm() const
Return the diffusion velocity of the dispersed phase.
Definition: relativeVelocityModel.H:143
incompressibleTwoPhaseInteractingMixture.H
Foam::relativeVelocityModel::rhoc_
const dimensionedScalar & rhoc_
Continuous density.
Definition: relativeVelocityModel.H:83
Foam::relativeVelocityModel::TypeName
TypeName("relativeVelocityModel")
Runtime type information.
Foam::relativeVelocityModel::mixture
const incompressibleTwoPhaseInteractingMixture & mixture() const
Mixture properties.
Definition: relativeVelocityModel.H:134
Foam::relativeVelocityModel::alphad_
const volScalarField & alphad_
Dispersed phase fraction.
Definition: relativeVelocityModel.H:80
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::dimensioned< scalar >
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::relativeVelocityModel::alphac_
const volScalarField & alphac_
Continuous phase fraction.
Definition: relativeVelocityModel.H:77
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::List< word >
Foam::relativeVelocityModel::mixture_
const incompressibleTwoPhaseInteractingMixture & mixture_
Mixture properties.
Definition: relativeVelocityModel.H:71
dictionary.H
fvCFD.H
Foam::incompressibleTwoPhaseInteractingMixture
A two-phase incompressible transportModel for interacting phases requiring the direct evaluation of t...
Definition: incompressibleTwoPhaseInteractingMixture.H:58
Foam::GeometricField
Generic GeometricField class.
Definition: areaFieldsFwd.H:53
Foam::relativeVelocityModel::New
static autoPtr< relativeVelocityModel > New(const dictionary &dict, const incompressibleTwoPhaseInteractingMixture &mixture)
Foam::relativeVelocityModel::tauDm
tmp< volSymmTensorField > tauDm() const
Return the stress tensor due to the phase transport.
Foam::relativeVelocityModel::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, relativeVelocityModel, dictionary,(const dictionary &dict, const incompressibleTwoPhaseInteractingMixture &mixture),(dict, mixture))
Declare runtime constructor selection table.
Foam::relativeVelocityModel::~relativeVelocityModel
virtual ~relativeVelocityModel()
Destructor.
Foam::mixture
Definition: mixture.H:54