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 rho
00010     (
00011         IOobject
00012         (
00013             "rho",
00014             runTime.timeName(),
00015             mesh,
00016             IOobject::READ_IF_PRESENT,
00017             IOobject::AUTO_WRITE
00018         ),
00019         thermo.rho()
00020     );
00021 
00022     volScalarField& p = thermo.p();
00023     volScalarField& h = thermo.h();
00024     const volScalarField& psi = thermo.psi();
00025 
00026     Info<< "Reading field U\n" << endl;
00027     volVectorField U
00028     (
00029         IOobject
00030         (
00031             "U",
00032             runTime.timeName(),
00033             mesh,
00034             IOobject::MUST_READ,
00035             IOobject::AUTO_WRITE
00036         ),
00037         mesh
00038     );
00039 
00040     #include <finiteVolume/compressibleCreatePhi.H>
00041 
00042 
00043     label pRefCell = 0;
00044     scalar pRefValue = 0.0;
00045     setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
00046 
00047     dimensionedScalar rhoMax
00048     (
00049         mesh.solutionDict().subDict("SIMPLE").lookup("rhoMax")
00050     );
00051 
00052     dimensionedScalar rhoMin
00053     (
00054         mesh.solutionDict().subDict("SIMPLE").lookup("rhoMin")
00055     );
00056 
00057     Info<< "Creating turbulence model\n" << endl;
00058     autoPtr<compressible::RASModel> turbulence
00059     (
00060         compressible::RASModel::New
00061         (
00062             rho,
00063             U,
00064             phi,
00065             thermo
00066         )
00067     );
00068 
00069     dimensionedScalar initialMass = fvc::domainIntegrate(rho);
00070 
00071 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines