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 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     volScalarField rho
00016     (
00017         IOobject
00018         (
00019             "rho",
00020             runTime.timeName(),
00021             mesh,
00022             IOobject::MUST_READ,
00023             IOobject::AUTO_WRITE
00024         ),
00025         mesh
00026     );
00027 
00028     volScalarField gamma
00029     (
00030         IOobject
00031         (
00032             "gamma",
00033             runTime.timeName(),
00034             mesh,
00035             IOobject::NO_READ,
00036             IOobject::AUTO_WRITE
00037         ),
00038         max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0))
00039     );
00040     gamma.oldTime();
00041 
00042     Info<< "Creating compressibilityModel\n" << endl;
00043     autoPtr<barotropicCompressibilityModel> psiModel =
00044         barotropicCompressibilityModel::New
00045         (
00046             thermodynamicProperties,
00047             gamma
00048         );
00049 
00050     const volScalarField& psi = psiModel->psi();
00051 
00052     rho == max
00053     (
00054         psi*p
00055       + (1.0 - gamma)*rhol0
00056       + ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat,
00057         rhoMin
00058     );
00059 
00060     Info<< "Reading field U\n" << endl;
00061     volVectorField U
00062     (
00063         IOobject
00064         (
00065             "U",
00066             runTime.timeName(),
00067             mesh,
00068             IOobject::MUST_READ,
00069             IOobject::AUTO_WRITE
00070         ),
00071         mesh
00072     );
00073 
00074     #include <finiteVolume/createPhiv.H>
00075     #include <finiteVolume/compressibleCreatePhi.H>
00076 
00077     Info<< "Reading transportProperties\n" << endl;
00078 
00079     twoPhaseMixture twoPhaseProperties(U, phiv, "gamma");
00080 
00081     // Create incompressible turbulence model
00082     autoPtr<incompressible::turbulenceModel> turbulence
00083     (
00084         incompressible::turbulenceModel::New(U, phiv, twoPhaseProperties)
00085     );
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines