coordinateSystems.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-2023 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::coordinateSystems::coordinateSystems
26 
27 Description
28  Provides a centralised coordinateSystem collection.
29 
30  For example with the porous region specified in \c constant/fvModels as
31 
32  \verbatim
33  porosity
34  {
35  type porosityForce;
36 
37  porosityForceCoeffs
38  {
39  select cellZone;
40  cellZone porousBlockage;
41 
42  type DarcyForchheimer;
43 
44  // D 100; // Very little blockage
45  // D 200; // Some blockage but steady flow
46  // D 500; // Slight waviness in the far wake
47  D 1000; // Fully shedding behavior
48 
49  d ($D $D $D);
50  f (0 0 0);
51 
52  coordinateSystem porousBlockage;
53  }
54  }
55  \endverbatim
56 
57  the corresponding coordinate system \c porousBlockage is looked-up
58  automatically from the \c constant/coordinateSystems dictionary:
59 
60  \verbatim
61  porousBlockage
62  {
63  type cartesian;
64  origin (0 0 0);
65  coordinateRotation
66  {
67  type axesRotation;
68  e1 (1 0 0);
69  e2 (0 1 0);
70  }
71  }
72  \endverbatim
73 
74  See \c tutorials/modules/incompressibleFluid/porousBlockage
75 
76 SourceFiles
77  coordinateSystems.C
78 
79 \*---------------------------------------------------------------------------*/
80 #ifndef coordinateSystems_H
81 #define coordinateSystems_H
82 
83 #include "coordinateSystem.H"
84 #include "PtrDictionary.H"
85 #include "DemandDrivenMeshObject.H"
86 
87 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
88 
89 namespace Foam
90 {
91 namespace coordinateSystems
92 {
93 
94 /*---------------------------------------------------------------------------*\
95  Class coordinateSystems Declaration
96 \*---------------------------------------------------------------------------*/
97 
99 :
101  <
102  objectRegistry,
103  DeletableMeshObject,
104  coordinateSystems
105  >,
106  public PtrDictionary<coordinateSystem>
107 {
108 protected:
109 
110  friend class DemandDrivenMeshObject
111  <
115  >;
116 
117  // Protected Constructors
118 
119  //- Read construct from objectRegistry
120  explicit coordinateSystems(const objectRegistry& obr);
121 
122 
123 public:
124 
125  //- Runtime type information
126  TypeName("coordinateSystems");
127 
128 
129  // Constructors
130 
131  //- Disallow default bitwise copy construction
132  coordinateSystems(const coordinateSystems&) = delete;
133 
135  <
139  >::New;
140 
141 
142  //- Destructor
143  virtual ~coordinateSystems()
144  {}
145 
146 
147  // Member Functions
148 
149  //- Is object global
150  virtual bool global() const
151  {
152  return true;
153  }
154 
155  //- ReadData function required for regIOobject read operation
156  virtual bool readData(Istream&);
157 
158  //- WriteData function required for regIOobject write operation
159  bool writeData(Ostream&) const;
160 
161 
162  // Member Operators
163 
164  //- Disallow default bitwise assignment
165  void operator=(const coordinateSystems&) = delete;
166 };
167 
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 } // End namespace coordinateSystems
172 
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 
175 template<>
176 struct typeGlobal
177 <
179  <
182  coordinateSystems::coordinateSystems
183  >
184 >
185 {
186  static const bool global = true;
187 };
188 
189 
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 
192 } // End namespace Foam
193 
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 
196 #endif
197 
198 // ************************************************************************* //
MeshObject types:
Definition: MeshObjects.H:67
Templated abstract base-class for demand-driven mesh objects used to automate their allocation to the...
static coordinateSystems & New(const word &name, const objectRegistry &mesh)
Construct and return the named DemandDrivenMeshObject.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:60
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
Template dictionary class which manages the storage associated with it.
Definition: PtrDictionary.H:56
Provides a centralised coordinateSystem collection.
bool writeData(Ostream &) const
WriteData function required for regIOobject write operation.
TypeName("coordinateSystems")
Runtime type information.
coordinateSystems(const objectRegistry &obr)
Read construct from objectRegistry.
virtual bool global() const
Is object global.
void operator=(const coordinateSystems &)=delete
Disallow default bitwise assignment.
virtual bool readData(Istream &)
ReadData function required for regIOobject read operation.
Registry of regIOobjects.
Namespace for OpenFOAM.
Trait for obtaining global status.
Definition: IOobject.H:504
static const bool global
Definition: IOobject.H:505