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

createFields.H

Go to the documentation of this file.
00001     Info<< "Reading thermophysical properties\n" << endl;
00002 
00003     autoPtr<basicPsiThermo> pThermo
00004     (
00005         basicPsiThermo::New(mesh)
00006     );
00007     basicPsiThermo& thermo = pThermo();
00008 
00009     volScalarField& p = thermo.p();
00010     volScalarField& e = thermo.e();
00011     const volScalarField& psi = thermo.psi();
00012 
00013     volScalarField rho
00014     (
00015         IOobject
00016         (
00017             "rho",
00018             runTime.timeName(),
00019             mesh
00020         ),
00021         thermo.rho()
00022     );
00023 
00024     Info<< "Reading field U\n" << endl;
00025     volVectorField U
00026     (
00027         IOobject
00028         (
00029             "U",
00030             runTime.timeName(),
00031             mesh,
00032             IOobject::MUST_READ,
00033             IOobject::AUTO_WRITE
00034         ),
00035         mesh
00036     );
00037 
00038 #   include <finiteVolume/compressibleCreatePhi.H>
00039 
00040 
00041     Info<< "Creating turbulence model\n" << endl;
00042     autoPtr<compressible::turbulenceModel> turbulence
00043     (
00044         compressible::turbulenceModel::New
00045         (
00046             rho,
00047             U,
00048             phi,
00049             thermo
00050         )
00051     );
00052 
00053     Info<< "Creating field DpDt\n" << endl;
00054     volScalarField DpDt =
00055         fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines