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     Info << "Reading field U\n" << endl;
00016     volVectorField U
00017     (
00018         IOobject
00019         (
00020             "U",
00021             runTime.timeName(),
00022             mesh,
00023             IOobject::MUST_READ,
00024             IOobject::AUTO_WRITE
00025         ),
00026         mesh
00027     );
00028 
00029 #   include <finiteVolume/createPhi.H>
00030 
00031 
00032     label pRefCell = 0;
00033     scalar pRefValue = 0.0;
00034     setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
00035 
00036 
00037     singlePhaseTransportModel laminarTransport(U, phi);
00038 
00039     autoPtr<incompressible::RASModel> turbulence
00040     (
00041         incompressible::RASModel::New(U, phi, laminarTransport)
00042     );
00043 
00044 
00045     porousZones pZones(mesh);
00046     Switch pressureImplicitPorosity(false);
00047 
00048     int nUCorr = 0;
00049     if (pZones.size())
00050     {
00051         // nUCorrectors for pressureImplicitPorosity
00052         if (mesh.solutionDict().subDict("SIMPLE").found("nUCorrectors"))
00053         {
00054             nUCorr = readInt
00055             (
00056                 mesh.solutionDict().subDict("SIMPLE").lookup("nUCorrectors")
00057             );
00058         }
00059 
00060         if (nUCorr > 0)
00061         {
00062             pressureImplicitPorosity = true;
00063         }
00064     }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines