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/>.
25 Foam::LocalInteraction
28 Patch interaction specified on a patch-by-patch basis
30 \*---------------------------------------------------------------------------*/
32 #ifndef LocalInteraction_H
33 #define LocalInteraction_H
35 #include "PatchInteractionModel.H"
36 #include "patchInteractionDataList.H"
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 /*---------------------------------------------------------------------------*\
43 Class LocalInteraction Declaration
44 \*---------------------------------------------------------------------------*/
46 template<class CloudType>
47 class LocalInteraction
49 public PatchInteractionModel<CloudType>
53 //- List of participating patches
54 const patchInteractionDataList patchData_;
57 // Counters for initial particle fates
59 //- Number of parcels escaped
60 List<label> nEscape0_;
62 //- Mass of parcels escaped
63 List<scalar> massEscape0_;
65 //- Number of parcels stuck to patches
68 //- Mass of parcels stuck to patches
69 List<scalar> massStick0_;
72 // Counters for particle fates
74 //- Number of parcels escaped
77 //- Mass of parcels escaped
78 List<scalar> massEscape_;
80 //- Number of parcels stuck to patches
83 //- Mass of parcels stuck to patches
84 List<scalar> massStick_;
87 // Private Member Functions
89 //- Read interaction properties from file
92 //- Write interaction properties to file
95 const labelList& nEscape,
96 const scalarList& massEscape,
97 const labelList& nStick,
98 const scalarList& massStick
104 //- Runtime type information
105 TypeName("localInteraction");
110 //- Construct from dictionary
111 LocalInteraction(const dictionary& dict, CloudType& owner);
113 //- Construct copy from owner cloud and patch interaction model
114 LocalInteraction(const LocalInteraction<CloudType>& pim);
116 //- Construct and return a clone using supplied owner cloud
117 virtual autoPtr<PatchInteractionModel<CloudType> > clone() const
119 return autoPtr<PatchInteractionModel<CloudType> >
121 new LocalInteraction<CloudType>(*this)
127 virtual ~LocalInteraction();
132 //- Apply velocity correction
133 // Returns true if particle remains in same cell
136 typename CloudType::parcelType& p,
139 const scalar trackFraction,
140 const tetIndices& tetIs
146 //- Write patch interaction info to stream
147 virtual void info(Ostream& os) const;
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 } // End namespace Foam
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 # include "LocalInteraction.C"
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 // ************************************************************************* //