phaseForces.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) 2018 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::functionObjects::phaseForces
28
29Description
30 This function object calculates and outputs the blended interfacial forces
31 acting on a given phase, i.e. drag, virtual mass, lift, wall-lubrication and
32 turbulent dispersion. Note that it works only in run-time processing mode
33 and in combination with the reactingEulerFoam solvers.
34
35 For a simulation involving more than two phases, the accumulated force is
36 calculated by looping over all phasePairs involving that phase. The fields
37 are stored in the database so that they can be processed further, e.g. with
38 the fieldAveraging functionObject.
39
40 Example of function object specification:
41 \verbatim
42 phaseForces.water
43 {
44 type phaseForces;
45 libs (reactingEulerFoamFunctionObjects);
46 writeControl writeTime;
47 writeInterval 1;
48
49 ...
50
51 phaseName water;
52 }
53 \endverbatim
54
55Usage
56 \table
57 Property | Description | Required | Default value
58 type | type name: phaseForces | yes |
59 phaseName | Name of evaluated phase | yes |
60 \endtable
61
62See also
63 Foam::BlendedInterfacialModel
64 Foam::functionObjects::fvMeshFunctionObject
65 Foam::functionObject
66
67SourceFiles
68 phaseForces.C
69
70\*---------------------------------------------------------------------------*/
71
72#ifndef functionObjects_phaseForces_H
73#define functionObjects_phaseForces_H
74
76#include "phaseSystem.H"
77
78// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
79
80namespace Foam
81{
82namespace functionObjects
83{
84
85/*---------------------------------------------------------------------------*\
86 Class phaseForces Declaration
87\*---------------------------------------------------------------------------*/
88
89class phaseForces
90:
91 public fvMeshFunctionObject
92{
93 // Private Member Functions
94
95 //- Disallow default bitwise copy construct
96 phaseForces(const phaseForces&);
97
98 //- Disallow default bitwise assignment
99 void operator=(const phaseForces&);
100
101
102protected:
104 // Protected data
105
107
108 //- Phase for which forces are evaluated
109 const phaseModel& phase_;
110
111 //- Constant access to phaseSystem
112 const phaseSystem& fluid_;
113
114
115 // Protected Member Functions
116
117 //- Evaluate and return non-drag force
118 template<class modelType>
121
122public:
124 //- Runtime type information
125 TypeName("phaseForces");
127
128 // Constructors
129
130 //- Construct from Time and dictionary
132 (
133 const word& name,
134 const Time& runTime,
135 const dictionary&
136 );
137
138
139 //- Destructor
140 virtual ~phaseForces();
141
142
143 // Member Functions
144
145 //- Read the input data
146 virtual bool read(const dictionary& dict);
147
148 //- Calculate the force fields
149 virtual bool execute();
150
151 //- Write the force fields
152 virtual bool write();
153};
154
155
156// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157
158} // End namespace functionObjects
159} // End namespace Foam
160
161// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162
163#endif
164
165// ************************************************************************* //
A HashTable of pointers to objects of type <T>, with deallocation management of the pointers.
Definition: HashPtrTable.H:68
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
const word & name() const noexcept
Return the name of this functionObject.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
This function object calculates and outputs the blended interfacial forces acting on a given phase,...
Definition: phaseForces.H:106
const phaseSystem & fluid_
Constant access to phaseSystem.
Definition: phaseForces.H:126
tmp< volVectorField > nonDragForce(const phasePair &key) const
Evaluate and return non-drag force.
TypeName("phaseForces")
Runtime type information.
virtual bool read(const dictionary &dict)
Read the input data.
Definition: phaseForces.C:220
const phaseModel & phase_
Phase for which forces are evaluated.
Definition: phaseForces.H:123
virtual ~phaseForces()
Destructor.
Definition: phaseForces.C:214
HashPtrTable< volVectorField > forceFields_
Definition: phaseForces.H:120
virtual bool execute()
Calculate the force fields.
Definition: phaseForces.C:228
virtual bool write()
Write the force fields.
Definition: phaseForces.C:292
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:61
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
Definition: phasePair.H:56
Class to represent a system of phases and model interfacial transfers between them.
Definition: phaseSystem.H:76
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
engineTime & runTime
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73