1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
28 Base class for 1-D region models
33 \*---------------------------------------------------------------------------*/
35 #ifndef regionModel1D_H
36 #define regionModel1D_H
38 #include "regionModel.H"
39 #include "surfaceFields.H"
40 #include "labelList.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 namespace regionModels
49 /*---------------------------------------------------------------------------*\
50 Class regionModel1D Declaration
51 \*---------------------------------------------------------------------------*/
60 // Private Member Functions
62 //- Disallow default bitwise copy construct
63 regionModel1D(const regionModel1D&);
65 //- Disallow default bitwise assignment
66 void operator=(const regionModel1D&);
68 //- Construct region mesh and fields
69 void constructMeshObjects();
71 //- Initialise the region
79 // Region addressing - per internally coupled patch face walking out
82 labelListList boundaryFaceFaces_;
85 labelListList boundaryFaceCells_;
87 //- Global boundary face IDs oppossite coupled patch
88 labelList boundaryFaceOppositeFace_;
90 //- Number of layers in the region
96 //- Face area magnitude normal to patch
97 autoPtr<surfaceScalarField> nMagSfPtr_;
99 //- Flag to allow mesh movement
103 // Protected member functions
105 //- Read control parameters from dictionary
108 //- Move mesh points according to change in cell volumes
109 // Returns map ordered by cell where 1 = cell moved, 0 = cell unchanged
110 tmp<labelField> moveMesh
112 const scalarList& deltaV,
113 const scalar minDelta = 0.0
119 //- Runtime type information
120 TypeName("regionModel1D");
126 regionModel1D(const fvMesh& mesh);
128 //- Construct from mesh, region type and name
132 const word& regionType,
133 const word& modelName,
134 bool readFields = true
139 virtual ~regionModel1D();
148 //- Return the global face IDs
149 inline const labelListList& boundaryFaceFaces() const;
151 //- Return the global cell IDs
152 inline const labelListList& boundaryFaceCells() const;
154 //- Return the global boundary face IDs oppossite coupled patch
155 inline const labelList& boundaryFaceOppositeFace() const;
160 //- Return the face area magnitudes / [m2]
161 inline const surfaceScalarField& nMagSf() const;
163 //- Return the number of layers in the region
164 inline label nLayers() const;
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 } // End namespace regionModels
171 } // End namespace Foam
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 #include "regionModel1DI.H"
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 // ************************************************************************* //