1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Simple solid spherical particle class with one-way coupling with the
37 \*---------------------------------------------------------------------------*/
39 #ifndef solidParticle_H
40 #define solidParticle_H
45 #include "interpolationCellPoint.H"
46 #include "contiguous.H"
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 class solidParticleCloud;
55 /*---------------------------------------------------------------------------*\
56 Class solidParticle Declaration
57 \*---------------------------------------------------------------------------*/
61 public Particle<solidParticle>
63 // Private member data
68 //- Velocity of parcel
74 friend class Cloud<solidParticle>;
76 //- Class used to pass tracking data to the trackToFace function
79 //- Reference to the cloud containing this particle
80 solidParticleCloud& spc_;
82 // Interpolators for continuous phase fields
84 const interpolationCellPoint<scalar>& rhoInterp_;
85 const interpolationCellPoint<vector>& UInterp_;
86 const interpolationCellPoint<scalar>& nuInterp_;
88 //- Local gravitational or other body-force acceleration
102 solidParticleCloud& spc,
103 const interpolationCellPoint<scalar>& rhoInterp,
104 const interpolationCellPoint<vector>& UInterp,
105 const interpolationCellPoint<scalar>& nuInterp,
112 inline solidParticleCloud& spc();
114 inline const interpolationCellPoint<scalar>& rhoInterp() const;
116 inline const interpolationCellPoint<vector>& UInterp() const;
118 inline const interpolationCellPoint<scalar>& nuInterp() const;
120 inline const vector& g() const;
126 //- Construct from components
129 const Cloud<solidParticle>& c,
130 const vector& position,
136 //- Construct from Istream
139 const Cloud<solidParticle>& c,
141 bool readFields = true
144 //- Construct and return a clone
145 autoPtr<solidParticle> clone() const
147 return autoPtr<solidParticle>(new solidParticle(*this));
156 inline scalar d() const;
159 inline const vector& U() const;
161 //- The nearest distance to a wall that
162 // the particle can be in the n direction
163 inline scalar wallImpactDistance(const vector& n) const;
167 bool move(trackData&);
170 //- Overridable function to handle the particle hitting a processorPatch
171 void hitProcessorPatch
173 const processorPolyPatch&,
174 solidParticle::trackData& td
177 //- Overridable function to handle the particle hitting a processorPatch
178 //- without trackData
179 void hitProcessorPatch
181 const processorPolyPatch&,
185 //- Overridable function to handle the particle hitting a wallPatch
188 const wallPolyPatch&,
189 solidParticle::trackData& td
192 //- Overridable function to handle the particle hitting a wallPatch
193 //- without trackData
196 const wallPolyPatch&,
200 //- Overridable function to handle the particle hitting a polyPatch
204 solidParticle::trackData& td
207 //- Overridable function to handle the particle hitting a polyPatch
208 //- without trackData
215 //- Transform the physical properties of the particle
216 // according to the given transformation tensor
217 void transformProperties
222 //- Transform the physical properties of the particle
223 // according to the given separation vector
224 void transformProperties
226 const vector& separation
232 static void readFields(Cloud<solidParticle>& c);
234 static void writeFields(const Cloud<solidParticle>& c);
239 friend Ostream& operator<<(Ostream&, const solidParticle&);
244 inline bool contiguous<solidParticle>()
250 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
252 } // End namespace Foam
254 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
256 #include "solidParticleI.H"
258 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
262 // ************************************************************************* //