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 Converts a KIVA3v grid to OpenFOAM format
30 \*---------------------------------------------------------------------------*/
37 #include "cellShape.H"
38 #include "cellModeller.H"
39 #include "preservePatchTypes.H"
40 #include "emptyPolyPatch.H"
41 #include "wallPolyPatch.H"
42 #include "symmetryPolyPatch.H"
43 #include "wedgePolyPatch.H"
44 #include "oldCyclicPolyPatch.H"
45 #include "unitConversion.H"
49 //- Supported KIVA versions
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 int main(int argc, char *argv[])
61 argList::noParallel();
66 "specify alternative input file name - default is otape17"
72 "specify kiva version [kiva3|kiva3v] - default is '3v'"
78 "minimum z-height for transferring liner faces to cylinder-head"
81 # include "setRootCase.H"
82 # include "createTime.H"
84 const fileName kivaFileName =
85 args.optionLookupOrDefault<fileName>("file", "otape17");
87 kivaVersions kivaVersion = kiva3v;
88 if (args.optionFound("version"))
90 const word versionName = args["version"];
92 if (versionName == "kiva3")
96 else if (versionName == "kiva3v")
102 FatalErrorIn("main(int argc, char *argv[])")
103 << "KIVA file version " << versionName << " not supported"
111 scalar zHeadMin = -GREAT;
112 args.optionReadIfPresent("zHeadMin", zHeadMin);
114 # include "readKivaGrid.H"
116 Info<< "End\n" << endl;
122 // ************************************************************************* //