1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
28 Stores all relevant solution info for cloud
34 \*---------------------------------------------------------------------------*/
36 #ifndef cloudSolution_H
37 #define cloudSolution_H
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class cloudSolution Declaration
50 \*---------------------------------------------------------------------------*/
56 //- Reference to the mesh
59 //- Dictionary used during construction
68 //- Calculation frequency - carrier steps per cloud step
69 // NOTE: Steady operation only
72 //- Maximum particle Courant number
73 // Max fraction of current cell that can be traversed in a single
77 //- Current cloud iteration
80 //- Particle track time
86 //- Flag to indicate whether parcels are coupled to the carrier
87 // phase, i.e. whether or not to generate source terms for
91 //- Flag to correct cell values with latest transfer information
92 // during the lagrangian timestep
93 Switch cellValueSourceCorrection_;
95 //- Maximum particle track time [s]
98 //- Flag to indicate whether coupling source terms should be
99 // reset on start-up/first read
100 Switch resetSourcesOnStartup_;
102 //- List schemes, e.g. U semiImplicit 1
103 List<Tuple2<word, Tuple2<bool, scalar> > > schemes_;
106 // Private Member Functions
108 //- Disallow default bitwise assignment
109 void operator=(const cloudSolution&);
116 //- Construct null from mesh reference
117 cloudSolution(const fvMesh& mesh);
119 //- Construct from mesh and dictionary
120 cloudSolution(const fvMesh& mesh, const dictionary& dict);
123 cloudSolution(const cloudSolution& cs);
127 virtual ~cloudSolution();
132 //- Read properties from dictionary
138 //- Return relaxation coefficient for field
139 scalar relaxCoeff(const word& fieldName) const;
141 //- Return semi-implicit flag coefficient for field
142 bool semiImplicit(const word& fieldName) const;
144 //- Return reference to the mesh
145 inline const fvMesh& mesh() const;
147 //- Return const access to the dictionary
148 inline const dictionary& dict() const;
150 //- Return the active flag
151 inline const Switch active() const;
153 //- Return const access to the transient flag
154 inline const Switch transient() const;
156 //- Return const access to the steady flag
157 inline const Switch steadyState() const;
159 //- Return const access to the calculation frequency
160 inline label calcFrequency() const;
162 //- Return const access to the max particle Courant number
163 inline scalar maxCo() const;
165 //- Return const access to the current cloud iteration
166 inline label iter() const;
168 //- Increment and return iter counter
169 inline label nextIter();
171 //- Return the particle track time
172 inline scalar trackTime() const;
174 //- Return const access to the coupled flag
175 inline const Switch coupled() const;
177 //- Return non-const access to the coupled flag
178 inline Switch& coupled();
180 //- Return const access to the cell value correction flag
181 inline const Switch cellValueSourceCorrection() const;
183 //- Return const access to the particle track time
184 inline scalar maxTrackTime() const;
186 //- Return const access to the reset sources flag
187 inline const Switch resetSourcesOnStartup() const;
189 //- Source terms dictionary
190 inline const dictionary& sourceTermDict() const;
192 //- Interpolation schemes dictionary
193 inline const dictionary& interpolationSchemes() const;
195 //- Integration schemes dictionary
196 inline const dictionary& integrationSchemes() const;
201 //- Returns true if performing a cloud iteration this calc step
202 bool solveThisStep() const;
204 //- Returns true if possible to evolve the cloud and sets timestep
208 //- Returns true if writing this step
213 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215 } // End namespace Foam
217 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
219 #include "cloudSolutionI.H"
221 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
225 // ************************************************************************* //