BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / applications / utilities / postProcessing / miscellaneous / postChannel / postChannel.C
blob6bb6094b90bf88b5d019a389be61d15fd12af836
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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/>.
24 Application
25     postChannel
27 Description
28     Post-processes data from channel flow calculations
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.
35 \*---------------------------------------------------------------------------*/
37 #include "fvCFD.H"
38 #include "channelIndex.H"
39 #include "makeGraph.H"
41 #include "OSspecific.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 //  Main program:
47 int main(int argc, char *argv[])
49     argList::noParallel();
50     timeSelector::addOptions();
52 #   include "setRootCase.H"
53 #   include "createTime.H"
55     // Get times list
56     instantList timeDirs = timeSelector::select0(runTime, args);
58 #   include "createMesh.H"
59 #   include "readTransportProperties.H"
61     const word& gFormat = runTime.graphFormat();
63     // Setup channel indexing for averaging over channel down to a line
65     IOdictionary channelDict
66     (
67         IOobject
68         (
69             "postChannelDict",
70             mesh.time().constant(),
71             mesh,
72             IOobject::MUST_READ_IF_MODIFIED,
73             IOobject::NO_WRITE
74         )
75     );
76     channelIndex channelIndexing(mesh, channelDict);
79     // For each time step read all fields
80     forAll(timeDirs, timeI)
81     {
82         runTime.setTime(timeDirs[timeI], timeI);
83         Info<< "Collapsing fields for time " << runTime.timeName() << endl;
85 #       include "readFields.H"
86 #       include "calculateFields.H"
88         // Average fields over channel down to a line
89 #       include "collapse.H"
90     }
92     Info<< "\nEnd\n" << endl;
94     return 0;
98 // ************************************************************************* //