1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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 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 \*---------------------------------------------------------------------------*/
38 #include "channelIndex.H"
39 #include "makeGraph.H"
41 #include "OSspecific.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 int main(int argc, char *argv[])
49 argList::noParallel();
50 timeSelector::addOptions();
52 # include "setRootCase.H"
53 # include "createTime.H"
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
70 mesh.time().constant(),
72 IOobject::MUST_READ_IF_MODIFIED,
76 channelIndex channelIndexing(mesh, channelDict);
79 // For each time step read all fields
80 forAll(timeDirs, timeI)
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"
92 Info<< "\nEnd\n" << endl;
98 // ************************************************************************* //