Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
applications
utilities
postProcessing
miscellaneous
postChannel
postChannel.C
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration |
5
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
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
Application
25
postChannel
26
27
Description
28
Post-processes data from channel flow calculations
29
30
For each time: calculate: txx, txy,tyy, txy,
31
eps, prod, vorticity, enstrophy and helicity. Assuming that the mesh
32
is periodic in the x and z directions, collapse Umeanx, Umeany, txx,
33
txy and tyy to a line and print them as standard output.
34
35
Usage
36
37
- postChannel [OPTIONS]
38
39
@param -noZero \n
40
Ignore timestep 0.
41
42
@param -constant \n
43
Include the constant directory.
44
45
@param -time <time>\n
46
Apply only to specific time.
47
48
@param -latestTime \n
49
Only apply to latest time step.
50
51
@param -case <dir>\n
52
Case directory.
53
54
@param -help \n
55
Display help message.
56
57
@param -doc \n
58
Display Doxygen API documentation page for this application.
59
60
@param -srcDoc \n
61
Display Doxygen source documentation page for this application.
62
63
\*---------------------------------------------------------------------------*/
64
65
#include <
finiteVolume/fvCFD.H
>
66
#include "
channelIndex.H
"
67
#include <
sampling/makeGraph.H
>
68
69
#include <
OpenFOAM/OSspecific.H
>
70
71
72
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
73
// Main program:
74
75
int
main
(
int
argc,
char
*argv[])
76
{
77
argList::noParallel();
78
timeSelector::addOptions();
79
80
# include <
OpenFOAM/setRootCase.H
>
81
# include <
OpenFOAM/createTime.H
>
82
83
// Get times list
84
instantList
timeDirs
= timeSelector::select0(runTime,
args
);
85
86
# include <
OpenFOAM/createMesh.H
>
87
# include "
readTransportProperties.H
"
88
89
const
word
& gFormat = runTime.graphFormat();
90
91
// Setup channel indexing for averaging over channel down to a line
92
93
IOdictionary
channelDict
94
(
95
IOobject
96
(
97
"postChannelDict"
,
98
mesh
.
time
().
constant
(),
99
mesh
,
100
IOobject::MUST_READ,
101
IOobject::NO_WRITE
102
)
103
);
104
channelIndex
channelIndexing(
mesh
, channelDict);
105
106
107
// For each time step read all fields
108
forAll
(timeDirs, timeI)
109
{
110
runTime.setTime(timeDirs[timeI], timeI);
111
Info
<<
"Collapsing fields for time "
<< runTime.timeName() <<
endl
;
112
113
# include "
readFields.H
"
114
# include "
calculateFields.H
"
115
116
// Average fields over channel down to a line
117
# include "
collapse.H
"
118
}
119
120
Info
<<
"\nEnd"
<<
endl
;
121
122
return
0;
123
}
124
125
126
// ************************ vim: set sw=4 sts=4 et: ************************ //