Loading...
Searching...
No Matches
FacePostProcessing.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2017 OpenFOAM Foundation
9 Copyright (C) 2019 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::FacePostProcessing
29
30Group
31 grpLagrangianIntermediateFunctionObjects
32
33Description
34 Records particle face quantities on used-specified face zone
35
36 Currently supports:
37 accumulated mass
38 average mass flux
39
40SourceFiles
41 FacePostProcessing.C
42
43\*---------------------------------------------------------------------------*/
44
45#ifndef FacePostProcessing_H
46#define FacePostProcessing_H
47
48#include "CloudFunctionObject.H"
49#include "faceZone.H"
50
51// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52
53namespace Foam
54{
55
56/*---------------------------------------------------------------------------*\
57 Class FacePostProcessing Declaration
58\*---------------------------------------------------------------------------*/
59
60template<class CloudType>
62:
63 public CloudFunctionObject<CloudType>
64{
65 //- Convenience typedef for parcel type
66 typedef typename CloudType::parcelType parcelType;
67
68
69 // Private Data
70
71 //- Face zone IDs
72 labelList faceZoneIDs_;
73
74 //- Surface output format
75 const word surfaceFormat_;
76
77 //- Should be reset/cleared on writing?
78 bool resetOnWrite_;
79
80 //- Flag to indicate whether data should be written to file
81 bool logToFile_;
82
83 //- Total time
84 scalar totalTime_;
85
86 //- Mass storage
88
89 //- Mass total storage
90 List<scalarField> massTotal_;
91
92 //- Mass flow rate storage
93 List<scalarField> massFlowRate_;
94
95 //- Output file pointer per zone
96 PtrList<OFstream> outputFilePtr_;
97
98 //- Last calculation time
99 scalar timeOld_;
100
101
102 // Private Member Functions
103
104 //- Helper function to create log files
105 void makeLogFile
106 (
107 const word& zoneName,
108 const label zoneI,
109 const label nFaces,
110 const scalar totArea
111 );
112
113
114protected:
115
116 // Protected Member Functions
117
118 //- Write post-processing info
119 void write();
120
121
122public:
123
124 //- Runtime type information
125 TypeName("facePostProcessing");
126
127
128 // Constructors
129
130 //- Construct from dictionary
132 (
133 const dictionary& dict,
135 const word& modelName
136 );
137
138 //- Construct copy
140
141 //- Construct and return a clone
143 {
145 (
147 );
149
150
151 //- Destructor
152 virtual ~FacePostProcessing() = default;
153
154
155 // Member Functions
156
157 //- Should data be reset on write?
158 inline bool resetOnWrite() const;
159
160 //- Post-face hook
161 virtual bool postFace
162 (
163 const parcelType& p,
164 const typename parcelType::trackingData& td
165 );
166};
167
168
169// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170
171} // End namespace Foam
172
173// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174
175#include "FacePostProcessingI.H"
176
177// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178
179#ifdef NoRepository
180 #include "FacePostProcessing.C"
181#endif
182
183// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184
185#endif
186
187// ************************************************************************* //
CloudFunctionObject(CloudType &owner)
Construct null from owner.
const CloudType & owner() const
Return const access to the owner cloud.
particle::trackingData trackingData
Definition DSMCParcel.H:155
virtual autoPtr< CloudFunctionObject< CloudType > > clone() const
Construct and return a clone.
bool resetOnWrite() const
Should data be reset on write?
void write()
Write post-processing info.
TypeName("facePostProcessing")
Runtime type information.
FacePostProcessing(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
virtual ~FacePostProcessing()=default
Destructor.
virtual bool postFace(const parcelType &p, const typename parcelType::trackingData &td)
Post-face hook.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition List.H:72
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition PtrList.H:67
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
const dictionary & dict() const
Return const access to the cloud dictionary.
const word & modelName() const
Return const access to the name of the sub-model.
A class for handling words, derived from Foam::string.
Definition word.H:66
volScalarField & p
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
Namespace for OpenFOAM.
DSMCCloud< dsmcParcel > CloudType
List< label > labelList
A List of labels.
Definition List.H:62
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68