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& h = thermo.h();
00011     const volScalarField& psi = thermo.psi();
00012 
00013     volScalarField rho
00014     (
00015         IOobject
00016         (
00017             "rho",
00018             runTime.timeName(),
00019             mesh,
00020             IOobject::READ_IF_PRESENT,
00021             IOobject::AUTO_WRITE
00022         ),
00023         thermo.rho()
00024     );
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     dimensionedScalar pMin
00043     (
00044         mesh.solutionDict().subDict("PIMPLE").lookup("pMin")
00045     );
00046 
00047     Info<< "Creating turbulence model\n" << endl;
00048     autoPtr<compressible::turbulenceModel> turbulence
00049     (
00050         compressible::turbulenceModel::New
00051         (
00052             rho,
00053             U,
00054             phi,
00055             thermo
00056         )
00057     );
00058 
00059     //dimensionedScalar initialMass = fvc::domainIntegrate(rho);
00060 
00061 
00062     Info<< "Creating field DpDt\n" << endl;
00063     volScalarField DpDt =
00064         fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
00065 
00066     MRFZones mrfZones(mesh);
00067     mrfZones.correctBoundaryVelocity(U);
00068 
00069     porousZones pZones(mesh);
00070     Switch pressureImplicitPorosity(false);
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines