1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend 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 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
28 A pair of surfaces in contact.
33 \*---------------------------------------------------------------------------*/
35 #ifndef contactPatchPair_H
36 #define contactPatchPair_H
38 #include "polyPatchID.H"
39 #include "dimensionedTypes.H"
40 #include "volFieldsFwd.H"
41 #include "primitivePatchInterpolation.H"
42 #include "patchToPatchInterpolation.H"
43 #include "FieldFields.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 /*---------------------------------------------------------------------------*\
53 Class contactPatchPair Declaration
54 \*---------------------------------------------------------------------------*/
56 class contactPatchPair
65 //- Reference to contact problem
66 const contactProblem& cp_;
68 //- Master patch ID. Gradient condition will be enforced
69 const polyPatchID masterPatch_;
71 //- Slave patch ID. Direction mixed condition will be enforced
72 const polyPatchID slavePatch_;
74 //- Friction coefficient
75 dimensionedScalar frictionCoeff_;
78 const scalar contactTol_;
80 //- Master patch interpolator
81 primitivePatchInterpolation masterInterpolate_;
83 //- Slave patch interpolator
84 primitivePatchInterpolation slaveInterpolate_;
86 //- Master to slave patch interpolator
87 patchToPatchInterpolation masterToSlaveInterpolate_;
89 //- Master to slave patch interpolator
90 patchToPatchInterpolation slaveToMasterInterpolate_;
93 // Private Member Functions
95 //- Disallow default bitwise copy construct
96 contactPatchPair(const contactPatchPair&);
98 //- Disallow default bitwise assignment
99 void operator=(const contactPatchPair&);
107 //- Construct from components
111 const contactProblem& cp,
112 const word& masterPatchName,
113 const word& slavePatchName,
114 const dimensionedScalar& frictionCoeff,
115 const scalar contactTol,
116 const intersection::algorithm alg = intersection::FULL_RAY,
117 const intersection::direction dir = intersection::CONTACT_SPHERE
120 //- Construct from components
124 const contactProblem& cp,
125 const dictionary& dict
132 const word& name() const
137 //- Return master patch ID
138 const polyPatchID masterPatch() const
143 //- Return slave patch ID
144 const polyPatchID& slavePatch() const
149 //- Return master touch fraction
150 tmp<scalarField> masterTouchFraction() const;
152 //- Return slave touch fraction
153 tmp<scalarField> slaveTouchFraction() const;
155 //- Correct contact data
158 const FieldField<Field, vector>& curTraction,
159 FieldField<Field, vector>& newTraction,
160 FieldField<Field, vector>& refValue,
161 FieldField<Field, scalar>& normalValueFraction
165 void writeDict(Ostream&) const;
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 } // End namespace Foam
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 // ************************************************************************* //