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

movingConeTopoFvMesh.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) 1991-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::movingConeTopoFvMesh
00026 
00027 Description
00028     Sample topoChangerFvMesh that moves an object in x direction
00029     and introduces/removes layers.
00030 
00031 SourceFiles
00032     movingConeTopoFvMesh.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef movingConeTopoFvMesh_H
00037 #define movingConeTopoFvMesh_H
00038 
00039 #include <topoChangerFvMesh/topoChangerFvMesh.H>
00040 #include <dynamicMesh/motionSolver.H>
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 // Forward declaration of classes
00048 
00049 /*---------------------------------------------------------------------------*\
00050                       Class movingConeTopoFvMesh Declaration
00051 \*---------------------------------------------------------------------------*/
00052 
00053 class movingConeTopoFvMesh
00054 :
00055     public topoChangerFvMesh
00056 {
00057     // Private data
00058 
00059         //- Motion dictionary
00060         dictionary motionDict_;
00061 
00062         //- Motion velocity amplitude
00063         vector motionVelAmplitude_;
00064 
00065         //- Motion velocity period
00066         scalar motionVelPeriod_;
00067 
00068         //- Motion velocity period
00069         vector curMotionVel_;
00070 
00071         //- Left edge
00072         scalar leftEdge_;
00073 
00074         //- Current left obstacle position
00075         scalar curLeft_;
00076 
00077         //- Current right obstacle position
00078         scalar curRight_;
00079 
00080         //- Vertex motion mask
00081         scalarField motionMask_;
00082 
00083 
00084     // Private Member Functions
00085 
00086         //- Disallow default bitwise copy construct
00087         movingConeTopoFvMesh(const movingConeTopoFvMesh&);
00088 
00089         //- Disallow default bitwise assignment
00090         void operator=(const movingConeTopoFvMesh&);
00091 
00092 
00093         //- Add mixer zones and modifiers
00094         void addZonesAndModifiers();
00095 
00096         //- Markup motion vertices
00097         tmp<scalarField> vertexMarkup
00098         (
00099             const pointField& p,
00100             const scalar& curLeft,
00101             const scalar& curRight
00102         ) const;
00103 
00104 
00105 public:
00106 
00107     //- Runtime type information
00108     TypeName("movingConeTopoFvMesh");
00109 
00110 
00111     // Constructors
00112 
00113         //- Construct from database
00114         explicit movingConeTopoFvMesh(const IOobject& io);
00115 
00116 
00117     // Destructor
00118 
00119         virtual ~movingConeTopoFvMesh();
00120 
00121 
00122     // Member Functions
00123 
00124         //- Update the mesh for both mesh motion and topology change
00125         virtual bool update();
00126 };
00127 
00128 
00129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00130 
00131 } // End namespace Foam
00132 
00133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00134 
00135 #endif
00136 
00137 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines