1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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
26 Foam::patchInteractionData
29 Helper class for the LocalInteraction patch interaction model
31 \*---------------------------------------------------------------------------*/
33 #ifndef patchInteractionData_H
34 #define patchInteractionData_H
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 /*---------------------------------------------------------------------------*\
43 Class patchInteractionData Declaration
44 \*---------------------------------------------------------------------------*/
46 // Forward declaration of classes
47 class patchInteractionData;
49 // Forward declaration of friend functions
53 patchInteractionData& pid
57 class patchInteractionData
61 //- Interaction type name
62 word interactionTypeName_;
67 //- Elasticity coefficient
70 //- Restitution coefficient
79 patchInteractionData();
86 //- Return const access to the interaction type name
87 const word& interactionTypeName() const;
89 //- Return const access to the patch name
90 const word& patchName() const;
92 //- Return const access to the elasticity coefficient
95 //- Return const access to the restitution coefficient
102 friend Istream& operator>>
105 patchInteractionData& pid
110 "Istream& operator>>"
111 "(Istream&, patchInteractionData&)"
114 const dictionaryEntry entry(dictionary::null, is);
116 pid.patchName_ = entry.keyword();
117 entry.lookup("type") >> pid.interactionTypeName_;
118 pid.e_ = entry.lookupOrDefault<scalar>("e", 1.0);
119 pid.mu_ = entry.lookupOrDefault<scalar>("mu", 0.0);
123 PatchInteractionModel<CloudType>::wordToInteractionType
125 pid.interactionTypeName_
127 == PatchInteractionModel<CloudType>::itOther)
131 "friend Istream& operator>>"
134 "patchInteractionData&"
136 ) << "Unknown patch interaction type "
137 << pid.interactionTypeName_
138 << ". Valid selections are:"
139 << PatchInteractionModel<CloudType>::
140 interactionTypeNames_
141 << endl << abort(FatalError);
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 } // End namespace Foam
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 // ************************************************************************* //