FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

StandardWallInteraction.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 2008-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::StandardWallInteraction
00026 
00027 Description
00028     Wall interaction model. Three choices:
00029     - rebound - optionally specify elasticity and resitution coefficients
00030     - stick   - particles assigined zero velocity
00031     - escape  - remove particle from the domain
00032 
00033     Example usage:
00034 
00035         StandardWallInteractionCoeffs
00036         {
00037             type        rebound; // stick, escape
00038             e           1;       // optional - elasticity coeff
00039             mu          0;       // optional - restitution coeff
00040         }
00041 
00042 \*---------------------------------------------------------------------------*/
00043 
00044 #ifndef StandardWallInteraction_H
00045 #define StandardWallInteraction_H
00046 
00047 #include <lagrangianIntermediate/PatchInteractionModel.H>
00048 
00049 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00050 
00051 namespace Foam
00052 {
00053 /*---------------------------------------------------------------------------*\
00054                    Class StandardWallInteraction Declaration
00055 \*---------------------------------------------------------------------------*/
00056 
00057 template<class CloudType>
00058 class StandardWallInteraction
00059 :
00060     public PatchInteractionModel<CloudType>
00061 {
00062 protected:
00063 
00064     // Protected data
00065 
00066         //- Interaction type
00067         typename PatchInteractionModel<CloudType>::interactionType
00068             interactionType_;
00069 
00070         //- Elasticity coefficient
00071         scalar e_;
00072 
00073         //- Restitution coefficient
00074         scalar mu_;
00075 
00076 
00077 public:
00078 
00079     //- Runtime type information
00080     TypeName("StandardWallInteraction");
00081 
00082 
00083     // Constructors
00084 
00085         //- Construct from dictionary
00086         StandardWallInteraction(const dictionary& dict, CloudType& cloud);
00087 
00088 
00089     //- Destructor
00090     virtual ~StandardWallInteraction();
00091 
00092 
00093     // Member Functions
00094 
00095         //- Flag to indicate whether model activates patch interaction model
00096         virtual bool active() const;
00097 
00098         //- Apply velocity correction
00099         //  Returns true if particle remains in same cell
00100         virtual bool correct
00101         (
00102             const polyPatch& pp,
00103             const label faceId,
00104             bool& keepParticle,
00105             bool& active,
00106             vector& U
00107         ) const;
00108 };
00109 
00110 
00111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00112 
00113 } // End namespace Foam
00114 
00115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00116 
00117 #ifdef NoRepository
00118 #   include "StandardWallInteraction.C"
00119 #endif
00120 
00121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00122 
00123 #endif
00124 
00125 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines