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

createFields.H

Go to the documentation of this file.
00001     Info<< "Reading field p\n" << endl;
00002     volScalarField p
00003     (
00004         IOobject
00005         (
00006             "p",
00007             runTime.timeName(),
00008             mesh,
00009             IOobject::MUST_READ,
00010             IOobject::AUTO_WRITE
00011         ),
00012         mesh
00013     );
00014 
00015 
00016     Info<< "Reading field T\n" << endl;
00017     volScalarField T
00018     (
00019         IOobject
00020         (
00021             "T",
00022             runTime.timeName(),
00023             mesh,
00024             IOobject::MUST_READ,
00025             IOobject::AUTO_WRITE
00026         ),
00027         mesh
00028     );
00029 
00030     Info<< "Reading field U\n" << endl;
00031     volVectorField U
00032     (
00033         IOobject
00034         (
00035             "U",
00036             runTime.timeName(),
00037             mesh,
00038             IOobject::MUST_READ,
00039             IOobject::AUTO_WRITE
00040         ),
00041         mesh
00042     );
00043 
00044     volScalarField psi
00045     (
00046         IOobject
00047         (
00048             "psi",
00049             runTime.timeName(),
00050             mesh,
00051             IOobject::NO_READ,
00052             IOobject::NO_WRITE
00053         ),
00054         1.0/(R*T)
00055     );
00056     psi.oldTime();
00057 
00058     volScalarField rho
00059     (
00060         IOobject
00061         (
00062             "rho",
00063             runTime.timeName(),
00064             mesh
00065         ),
00066         psi*p,
00067         p.boundaryField().types()
00068     );
00069 
00070     volVectorField rhoU
00071     (
00072         IOobject
00073         (
00074             "rhoU",
00075             runTime.timeName(),
00076             mesh,
00077             IOobject::NO_READ,
00078             IOobject::NO_WRITE
00079         ),
00080         rho*U,
00081         U.boundaryField().types()
00082     );
00083 
00084     volScalarField rhoE
00085     (
00086         IOobject
00087         (
00088             "rhoE",
00089             runTime.timeName(),
00090             mesh,
00091             IOobject::NO_READ,
00092             IOobject::NO_WRITE
00093         ),
00094         rho*Cv*T + 0.5*rho*magSqr(rhoU/rho),
00095         T.boundaryField().types()
00096     );
Copyright © 2000-2009 OpenCFD Ltd