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::NO_WRITE
00011         ),
00012         mesh
00013     );
00014 
00015     p = dimensionedScalar("zero", p.dimensions(), 0.0);
00016 
00017 
00018     Info<< "Reading field U\n" << endl;
00019     volVectorField U
00020     (
00021         IOobject
00022         (
00023             "U",
00024             runTime.timeName(),
00025             mesh,
00026             IOobject::MUST_READ,
00027             IOobject::AUTO_WRITE
00028         ),
00029         mesh
00030     );
00031 
00032     U = dimensionedVector("0", U.dimensions(), vector::zero);
00033 
00034     surfaceScalarField phi
00035     (
00036         IOobject
00037         (
00038             "phi",
00039             runTime.timeName(),
00040             mesh,
00041             IOobject::NO_READ,
00042             IOobject::AUTO_WRITE
00043         ),
00044         fvc::interpolate(U) & mesh.Sf()
00045     );
00046 
00047 
00048     label pRefCell = 0;
00049     scalar pRefValue = 0.0;
00050     setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
00051 
00052 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines