singleLayerRegion.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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.
20 
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/>.
23 
24 Class
25  Foam::regionModels::singleLayerRegion
26 
27 Description
28  Base class for single layer region models
29 
30 SourceFiles
31  singleLayerRegion.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef singleLayerRegion_H
36 #define singleLayerRegion_H
37 
38 #include "regionModel.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 namespace regionModels
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class singleLayerRegion Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
53  public regionModel
54 {
55  // Private member data
56 
57  // Region addressing
58 
59  //- Patch normal vectors
60  volVectorField nHat_;
61 
62  //- Cell cross-sectional area magnitude [m^2]
64 
65  //- Cell layer volume/area [m]
66  volScalarField VbyA_;
67 
68 
69  // Addressing
70 
71  //- List of patch IDs opposite to internally coupled patches
72  labelList passivePatchIDs_;
73 
74 
75 public:
76 
77  //- Runtime type information
78  TypeName("regionModel");
79 
80 
81  // Constructors
82 
83  //- Construct from mesh, region type and name
85  (
86  const fvMesh& mesh,
87  const word& regionType,
88  const word& modelName,
89  bool readFields = true
90  );
91 
92  //- Disallow default bitwise copy construction
93  singleLayerRegion(const singleLayerRegion&) = delete;
94 
95 
96  //- Destructor
97  virtual ~singleLayerRegion();
98 
99 
100  // Member Functions
101 
102  // Access
103 
104  // Region geometry
105 
106  //- Return the patch normal vectors
107  const volVectorField& nHat() const;
108 
109  //- Return the face area magnitudes [m^2]
110  const volScalarField::Internal& magSf() const;
111 
112  //- Return the cell layer volume/area [m]
113  const volScalarField& VbyA() const;
114 
115 
116  // Addressing
117 
118  //- Return the list of patch IDs opposite to internally
119  // coupled patches
120  const labelList& passivePatchIDs() const;
121 
122 
123  // Patch type information
124 
125  //- Return boundary types for mapped field patches
126  // Also maps internal field value
127  // Mapping region prescribed by underlying mapped poly patch
128  template<class Type>
130 
131 
132  // Member Operators
133 
134  //- Disallow default bitwise assignment
135  void operator=(const singleLayerRegion&) = delete;
136 };
137 
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 } // End namespace regionModels
142 } // End namespace Foam
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #ifdef NoRepository
148 #endif
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 #endif
153 
154 // ************************************************************************* //
const volScalarField & VbyA() const
Return the cell layer volume/area [m].
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const HashSet< word > &selectedFields, LIFOStack< regIOobject *> &storedObjects)
Read the selected GeometricFields of the specified type.
Definition: ReadFields.C:244
Base class for single layer region models.
const labelList & passivePatchIDs() const
Return the list of patch IDs opposite to internally.
const word & modelName() const
Return the model name.
Definition: regionModelI.H:55
dynamicFvMesh & mesh
A class for handling words, derived from string.
Definition: word.H:59
const volVectorField & nHat() const
Return the patch normal vectors.
void operator=(const singleLayerRegion &)=delete
Disallow default bitwise assignment.
const volScalarField::Internal & magSf() const
Return the face area magnitudes [m^2].
singleLayerRegion(const fvMesh &mesh, const word &regionType, const word &modelName, bool readFields=true)
Construct from mesh, region type and name.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
wordList mappedFieldAndInternalPatchTypes() const
Return boundary types for mapped field patches.
Base class for region models.
Definition: regionModel.H:55
TypeName("regionModel")
Runtime type information.
Namespace for OpenFOAM.