initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / topoChangerFvMesh / movingConeTopoFvMesh / movingConeTopoFvMesh.H
blobc4394a58883cd5633c53fbad3262abde74742074
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::movingConeTopoFvMesh
28 Description
29     Sample topoChangerFvMesh that moves an object in x direction
30     and introduces/removes layers.
32 SourceFiles
33     movingConeTopoFvMesh.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef movingConeTopoFvMesh_H
38 #define movingConeTopoFvMesh_H
40 #include "topoChangerFvMesh.H"
41 #include "motionSolver.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 // Forward declaration of classes
50 /*---------------------------------------------------------------------------*\
51                       Class movingConeTopoFvMesh Declaration
52 \*---------------------------------------------------------------------------*/
54 class movingConeTopoFvMesh
56     public topoChangerFvMesh
58     // Private data
60         //- Motion dictionary
61         dictionary motionDict_;
63         //- Motion velocity amplitude
64         vector motionVelAmplitude_;
66         //- Motion velocity period
67         scalar motionVelPeriod_;
69         //- Motion velocity period
70         vector curMotionVel_;
72         //- Left edge
73         scalar leftEdge_;
75         //- Current left obstacle position
76         scalar curLeft_;
78         //- Current right obstacle position
79         scalar curRight_;
81         //- Vertex motion mask
82         scalarField motionMask_;
85     // Private Member Functions
87         //- Disallow default bitwise copy construct
88         movingConeTopoFvMesh(const movingConeTopoFvMesh&);
90         //- Disallow default bitwise assignment
91         void operator=(const movingConeTopoFvMesh&);
94         //- Add mixer zones and modifiers
95         void addZonesAndModifiers();
97         //- Markup motion vertices
98         tmp<scalarField> vertexMarkup
99         (
100             const pointField& p,
101             const scalar& curLeft,
102             const scalar& curRight
103         ) const;
106 public:
108     //- Runtime type information
109     TypeName("movingConeTopoFvMesh");
112     // Constructors
114         //- Construct from database
115         explicit movingConeTopoFvMesh(const IOobject& io);
118     // Destructor
120         virtual ~movingConeTopoFvMesh();
123     // Member Functions
125         //- Update the mesh for both mesh motion and topology change
126         virtual bool update();
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 } // End namespace Foam
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 #endif
138 // ************************************************************************* //