Loading...
Searching...
No Matches
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
40Usage
41 Minimal example by using \c system/controlDict.functions:
42 \verbatim
43 phaseForces.waterFO
44 {
45 // Mandatory entries
46 type phaseForces;
47 libs (reactingEulerFoamFunctionObjects);
48 phase <word>;
49
50 // Inherited entries
51 ...
52 }
53
54 where the entries mean:
55 \table
56 Property | Description | Type | Reqd | Deflt
57 type | Type name: phaseForces | word | yes | -
58 libs | Library name: reactingEulerFoamFunctionObjects | word | yes | -
59 phase | Name of operand phase | word | yes | -
60 \endtable
61
62 The inherited entries are elaborated in:
63 - \link functionObject.H \endlink
64
65SourceFiles
66 phaseForces.C
67
68\*---------------------------------------------------------------------------*/
69
70#ifndef Foam_functionObjects_phaseForces_H
71#define Foam_functionObjects_phaseForces_H
72
74#include "phaseSystem.H"
75
76// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77
78namespace Foam
79{
80namespace functionObjects
81{
82
83/*---------------------------------------------------------------------------*\
84 Class phaseForces Declaration
85\*---------------------------------------------------------------------------*/
86
87class phaseForces
88:
90{
91 // Private Member Functions
92
93 //- Disallow default bitwise copy construct
94 phaseForces(const phaseForces&);
95
96 //- Disallow default bitwise assignment
97 void operator=(const phaseForces&);
98
99
100protected:
101
102 // Protected Data
103
104 HashPtrTable<volVectorField> forceFields_;
105
106 //- Phase for which forces are evaluated
107 const phaseModel& phase_;
108
109 //- Constant access to phaseSystem
110 const phaseSystem& fluid_;
111
112
113 // Protected Member Functions
114
115 //- Evaluate and return non-drag force
116 template<class modelType>
117 tmp<volVectorField> nonDragForce(const phasePair& key) const;
118
119
120public:
121
122 //- Runtime type information
123 TypeName("phaseForces");
124
125
126 // Constructors
127
128 //- Construct from name, Time and dictionary
129 phaseForces
130 (
131 const word& name,
132 const Time& runTime,
133 const dictionary&
134 );
135
136
137 //- Destructor
138 virtual ~phaseForces();
139
140
141 // Member Functions
142
143 //- Read the function-object dictionary
144 virtual bool read(const dictionary& dict);
145
146 //- Execute the function-object operations
147 virtual bool execute();
148
149 //- Write the function-object results
150 virtual bool write();
151};
152
153
154// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155
156} // End namespace functionObjects
157} // End namespace Foam
158
159// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160
161#endif
162
163// ************************************************************************* //
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
engineTime & runTime
auto & name
void read(Istream &, label &val, const dictionary &)
In-place read with dictionary lookup.
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
Namespace for OpenFOAM.
runTime write()
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68