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 transportProperties\n" << endl;
00002 
00003     IOdictionary transportProperties
00004     (
00005         IOobject
00006         (
00007             "transportProperties",
00008             runTime.constant(),
00009             mesh,
00010             IOobject::MUST_READ,
00011             IOobject::NO_WRITE
00012         )
00013     );
00014 
00015     dimensionedScalar rho
00016     (
00017         transportProperties.lookup("rho")
00018     );
00019 
00020     dimensionedScalar nu
00021     (
00022         transportProperties.lookup("nu")
00023     );
00024 
00025     dimensionedScalar mu
00026     (
00027         transportProperties.lookup("mu")
00028     );
00029 
00030     dimensionedScalar sigma
00031     (
00032         transportProperties.lookup("sigma")
00033     );
00034 
00035     Info<< "Reading field p\n" << endl;
00036     volScalarField p
00037     (
00038         IOobject
00039         (
00040             "p",
00041             runTime.timeName(),
00042             mesh,
00043             IOobject::MUST_READ,
00044             IOobject::AUTO_WRITE
00045         ),
00046         mesh
00047     );
00048 
00049 
00050     Info<< "Reading field U\n" << endl;
00051     volVectorField U
00052     (
00053         IOobject
00054         (
00055             "U",
00056             runTime.timeName(),
00057             mesh,
00058             IOobject::MUST_READ,
00059             IOobject::AUTO_WRITE
00060         ),
00061         mesh
00062     );
00063 
00064     #include <finiteVolume/createPhi.H>
00065 
00066     Info<< "Reading field pB\n" << endl;
00067     volScalarField pB
00068     (
00069         IOobject
00070         (
00071             "pB",
00072             runTime.timeName(),
00073             mesh,
00074             IOobject::MUST_READ,
00075             IOobject::AUTO_WRITE
00076         ),
00077         mesh
00078     );
00079 
00080 
00081     Info<< "Reading field B\n" << endl;
00082     volVectorField B
00083     (
00084         IOobject
00085         (
00086             "B",
00087             runTime.timeName(),
00088             mesh,
00089             IOobject::MUST_READ,
00090             IOobject::AUTO_WRITE
00091         ),
00092         mesh
00093     );
00094 
00095 
00096     #include "createPhiB.H"
00097 
00098     dimensionedScalar DB = 1.0/(mu*sigma);
00099     DB.name() = "DB";
00100 
00101     dimensionedScalar DBU = 1.0/(2.0*mu*rho);
00102     DBU.name() = "DBU";
00103 
00104 
00105     label pRefCell = 0;
00106     scalar pRefValue = 0.0;
00107     setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
00108 
00109 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines