MultiInteraction.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) 2011-2017 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::MultiInteraction
28
29Group
30 grpLagrangianIntermediatePatchInteractionSubModels
31
32Description
33 Runs multiple patch interaction models in turn. Takes dictionary
34 where all the subdictionaries are the interaction models.
35
36 // Exit upon first successful interaction or continue doing other
37 // models. Returned interaction status will be true if there has been
38 // any interaction (so logical or)
39 oneInteractionOnly true;
40
41 model1
42 {
43 patchInteractionModel coincidentBaffleInteraction;
44 coincidentBaffleInteractionCoeffs
45 {
46 coincidentPatches
47 (
48 (pipetteWall_A pipetteCyclic_half0)
49 (pipetteWall_B pipetteCyclic_half1)
50 );
51 }
52 }
53 model2
54 {
55 patchInteractionModel localInteraction;
56 localInteractionCoeffs
57 {
58 patches
59 (
60 cWall
61 {
62 type rebound;
63 }
64 pipetteWall_A
65 {
66 type rebound;
67 }
68 pipetteWall_B
69 {
70 type rebound;
71 }
72 );
73 }
74 }
75
76
77\*---------------------------------------------------------------------------*/
78
79#ifndef MultiInteraction_H
80#define MultiInteraction_H
81
83
84// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
85
86namespace Foam
87{
88/*---------------------------------------------------------------------------*\
89 Class MultiInteraction Declaration
90\*---------------------------------------------------------------------------*/
91
92template<class CloudType>
94:
95 public PatchInteractionModel<CloudType>
96{
97 // Private data
98
99 bool oneInteractionOnly_;
100
101 //- Submodels
103
104
105 // Private Member Functions
106
107 //- Read settings
108 bool read(const dictionary&);
109
110public:
111
112 //- Runtime type information
113 TypeName("multiInteraction");
114
115
116 // Constructors
117
118 //- Construct from dictionary
120
121 //- Construct copy from owner cloud and patch interaction model
123
124 //- Construct and return a clone using supplied owner cloud
126 {
128 (
130 );
131 }
132
133
134 //- Destructor
135 virtual ~MultiInteraction() = default;
136
137
138 // Member Functions
139
140 //- Flag to indicate whether model activates patch interaction model
141 virtual bool active() const;
142
143 //- Apply velocity correction
144 // Returns true if particle remains in same cell
145 virtual bool correct
146 (
147 typename CloudType::parcelType& p,
148 const polyPatch& pp,
149 bool& keepParticle
150 );
151
152 //- Post-evolve hook
153 virtual void postEvolve();
154
155 //- Write patch interaction info to stream
156 virtual void info(Ostream& os);
157};
158
159
160// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161
162} // End namespace Foam
163
164// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165
166#ifdef NoRepository
167 #include "MultiInteraction.C"
168#endif
169
170// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171
172#endif
173
174// ************************************************************************* //
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:220
Runs multiple patch interaction models in turn. Takes dictionary where all the subdictionaries are th...
virtual void postEvolve()
Post-evolve hook.
TypeName("multiInteraction")
Runtime type information.
virtual void info(Ostream &os)
Write patch interaction info to stream.
virtual autoPtr< PatchInteractionModel< CloudType > > clone() const
Construct and return a clone using supplied owner cloud.
virtual ~MultiInteraction()=default
Destructor.
virtual bool active() const
Flag to indicate whether model activates patch interaction model.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Templated patch interaction model class.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: PtrList.H:73
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A cloud is a registry collection of lagrangian particles.
Definition: cloud.H:60
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:75
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:113
volScalarField & p
thermo correct()
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73