1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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 //- Read control parameters from dictionary
109 virtual bool read(const dictionary& dict);
111 //- Move mesh points according to change in cell volumes
112 // Returns map ordered by cell where 1 = cell moved, 0 = cell unchanged
113 tmp<labelField> moveMesh
115 const scalarList& deltaV,
116 const scalar minDelta = 0.0
122 //- Runtime type information
123 TypeName("regionModel1D");
129 regionModel1D(const fvMesh& mesh);
131 //- Construct from mesh, region type and name
135 const word& regionType,
136 const word& modelName,
137 bool readFields = true
141 //- Construct from mesh, region type and name and dict
145 const word& regionType,
146 const word& modelName,
147 const dictionary& dict,
148 bool readFields = true
153 virtual ~regionModel1D();
162 //- Return the global face IDs
163 inline const labelListList& boundaryFaceFaces() const;
165 //- Return the global cell IDs
166 inline const labelListList& boundaryFaceCells() const;
168 //- Return the global boundary face IDs oppossite coupled patch
169 inline const labelList& boundaryFaceOppositeFace() const;
174 //- Return the face area magnitudes / [m2]
175 inline const surfaceScalarField& nMagSf() const;
177 //- Return the number of layers in the region
178 inline label nLayers() const;
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 } // End namespace regionModels
185 } // End namespace Foam
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 #include "regionModel1DI.H"
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 // ************************************************************************* //