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::MultiInteraction
28 Runs multiple patch interaction models in turn. Takes dictionary
29 where all the subdictionaries are the interaction models.
31 // Exit upon first successful interaction or continue doing other
32 // models. Returned nteraction status will be true if there has been any
33 // interaction (so logical or)
34 oneInteractionOnly true;
38 patchInteractionModel coincidentBaffleInteraction;
39 coincidentBaffleInteractionCoeffs
43 (pipetteWall_A pipetteCyclic_half0)
44 (pipetteWall_B pipetteCyclic_half1)
50 patchInteractionModel localInteraction;
51 localInteractionCoeffs
72 \*---------------------------------------------------------------------------*/
74 #ifndef MultiInteraction_H
75 #define MultiInteraction_H
77 #include "PatchInteractionModel.H"
79 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
83 /*---------------------------------------------------------------------------*\
84 Class MultiInteraction Declaration
85 \*---------------------------------------------------------------------------*/
87 template<class CloudType>
88 class MultiInteraction
90 public PatchInteractionModel<CloudType>
94 Switch oneInteractionOnly_;
97 PtrList<PatchInteractionModel<CloudType> > models_;
100 // Private Member Functions
103 bool read(const dictionary&);
107 //- Runtime type information
108 TypeName("multiInteraction");
113 //- Construct from dictionary
114 MultiInteraction(const dictionary& dict, CloudType& cloud);
116 //- Construct copy from owner cloud and patch interaction model
117 MultiInteraction(const MultiInteraction<CloudType>& pim);
119 //- Construct and return a clone using supplied owner cloud
120 virtual autoPtr<PatchInteractionModel<CloudType> > clone() const
122 return autoPtr<PatchInteractionModel<CloudType> >
124 new MultiInteraction<CloudType>(*this)
130 virtual ~MultiInteraction();
135 //- Flag to indicate whether model activates patch interaction model
136 virtual bool active() const;
138 //- Apply velocity correction
139 // Returns true if particle remains in same cell
142 typename CloudType::parcelType& p,
145 const scalar trackFraction,
146 const tetIndices& tetIs
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 } // End namespace Foam
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 # include "MultiInteraction.C"
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 // ************************************************************************* //