1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2010-2010 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 Samples near-patch volFields
31 - every timestep the field get updated with new values
32 - at write it writes the fields
33 so this functionObject can either be used to calculate a new field
34 as a postprocessing step or (since the fields are registered)
35 use these in another functionObject (e.g. faceSource).
42 outputControl outputTime;
44 // Name of volField and corresponding surfaceField
45 fields ((p pNear)(U UNear));
46 // Name of patch to sample
48 // Distance away from the wall
49 distance 0.13; // distance away from wall
57 \*---------------------------------------------------------------------------*/
59 #ifndef nearWallFields_H
60 #define nearWallFields_H
63 #include "volFields.H"
66 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71 // Forward declaration of classes
76 /*---------------------------------------------------------------------------*\
77 Class nearWallFields Declaration
78 \*---------------------------------------------------------------------------*/
86 //- Name of this set of nearWallFields object
89 const objectRegistry& obr_;
94 // Read from dictionary
97 List<Tuple2<word, word> > fieldSet_;
100 labelHashSet patchSet_;
102 //- Distance away from wall
105 //- From original field to sampled result
106 HashTable<word> fieldMap_;
108 //- From resulting back to original field
109 HashTable<word> reverseFieldMap_;
111 //- Locally constructed fields
112 PtrList<volScalarField> vsf_;
113 PtrList<volVectorField> vvf_;
114 PtrList<volSphericalTensorField> vSpheretf_;
115 PtrList<volSymmTensorField> vSymmtf_;
116 PtrList<volTensorField> vtf_;
119 // Protected Member Functions
121 //- Disallow default bitwise copy construct
122 nearWallFields(const nearWallFields&);
124 //- Disallow default bitwise assignment
125 void operator=(const nearWallFields&);
130 PtrList<GeometricField<Type, fvPatchField, volMesh> >&
136 PtrList<GeometricField<Type, fvPatchField, volMesh> >&
141 //- Runtime type information
142 TypeName("nearWallFields");
147 //- Construct for given objectRegistry and dictionary.
148 // Allow the possibility to load fields from files
152 const objectRegistry&,
154 const bool loadFromFiles = false
159 virtual ~nearWallFields();
164 //- Return name of the nearWallFields object
165 virtual const word& name() const
170 //- Read the field min/max data
171 virtual void read(const dictionary&);
173 //- Execute, currently does nothing
174 virtual void execute();
176 //- Execute at the final time-loop, currently does nothing
180 virtual void write();
182 //- Update for changes of mesh
183 virtual void updateMesh(const mapPolyMesh&)
186 //- Update for changes of mesh
187 virtual void movePoints(const pointField&)
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 } // End namespace Foam
196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 # include "nearWallFieldsTemplates.C"
202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206 // ************************************************************************* //