OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

readThermodynamicProperties.H

Go to the documentation of this file.
00001     Info<< "Reading thermodynamicProperties\n" << endl;
00002 
00003     IOdictionary thermodynamicProperties
00004     (
00005         IOobject
00006         (
00007             "thermodynamicProperties",
00008             runTime.constant(),
00009             mesh,
00010             IOobject::MUST_READ,
00011             IOobject::NO_WRITE
00012         )
00013     );
00014 
00015     dimensionedScalar R
00016     (
00017         thermodynamicProperties.lookup("R")
00018     );
00019 
00020     dimensionedScalar Cv
00021     (
00022         thermodynamicProperties.lookup("Cv")
00023     );
00024 
00025     dimensionedScalar Cp = Cv + R;
00026 
00027     dimensionedScalar gamma = Cp/Cv;
00028 
00029     dimensionedScalar Pr = dimensionedScalar("Pr", dimless, 1.0);
00030     if (thermodynamicProperties.found("Pr"))
00031     {
00032         Pr = thermodynamicProperties.lookup("Pr");
00033     }
Copyright © 2000-2009 OpenCFD Ltd