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

thermophysicalMach.H

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