FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

thermodynamicMach.H

Go to the documentation of this file.
00001 #   include "readThermodynamicProperties.H"
00002 
00003     for (label i=startTime; i<endTime; i++)
00004     {
00005         runTime.setTime(Times[i], i);
00006 
00007         Info<< "Time = " << runTime.timeName() << endl;
00008 
00009         IOobject Uheader
00010         (
00011             "U",
00012             runTime.timeName(),
00013             mesh,
00014             IOobject::MUST_READ
00015         );
00016 
00017         IOobject Theader
00018         (
00019             "T",
00020             runTime.timeName(),
00021             mesh,
00022             IOobject::MUST_READ
00023         );
00024 
00025 
00026         // Check U exists
00027         if (Uheader.headerOk() && Theader.headerOk())
00028         {
00029             mesh.readUpdate();
00030 
00031             volVectorField U(Uheader, mesh);
00032             volScalarField T(Theader, mesh);
00033 
00034             volScalarField Ma
00035             (
00036                 IOobject
00037                 (
00038                     "Ma",
00039                     runTime.timeName(),
00040                     mesh
00041                 ),
00042                 mag(U)/(sqrt(((Cv + R)/Cv)*R*T))
00043             );
00044             Ma.write();
00045         }
00046         else
00047         {
00048             Info<< "    No U or T" << endl;
00049         }
00050     }
00051 
00052 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines