BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / applications / utilities / postProcessing / velocityField / Mach / thermophysicalMach.H
blob7283802f7790a6c0cf209195a9273e51697fc017
1     for (label i=startTime; i<endTime; i++)
2     {
3         runTime.setTime(Times[i], i);
5         Info<< "Time = " << runTime.timeName() << endl;
7         mesh.readUpdate();
9         IOobject Uheader
10         (
11             "U",
12             runTime.timeName(),
13             mesh,
14             IOobject::MUST_READ
15         );
17         if (Uheader.headerOk())
18         {
19             volVectorField U(Uheader, mesh);
21             autoPtr<basicPsiThermo> thermo
22             (
23                 basicPsiThermo::New(mesh)
24             );
26             volScalarField Cp = thermo->Cp();
27             volScalarField Cv = thermo->Cv();
29             volScalarField Ma
30             (
31                 IOobject
32                 (
33                     "Ma",
34                     runTime.timeName(),
35                     mesh
36                 ),
37                 mag(U)/(sqrt((Cp/Cv)*(Cp - Cv)*thermo->T()))
38             );
39             Ma.write();
40         }
41         else
42         {
43             Info<< "    No U" << endl;
44         }
45     }