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 physicalProperties\n" << endl;
00002 
00003     IOdictionary physicalProperties
00004     (
00005         IOobject
00006         (
00007             "physicalProperties",
00008             runTime.constant(),
00009             mesh,
00010             IOobject::MUST_READ,
00011             IOobject::NO_WRITE
00012         )
00013     );
00014 
00015     dimensionedScalar epsilon0
00016     (
00017         physicalProperties.lookup("epsilon0")
00018     );
00019 
00020     dimensionedScalar k
00021     (
00022         physicalProperties.lookup("k")
00023     );
00024 
00025 
00026     Info<< "Reading field phi\n" << endl;
00027     volScalarField phi
00028     (
00029         IOobject
00030         (
00031             "phi",
00032             runTime.timeName(),
00033             mesh,
00034             IOobject::MUST_READ,
00035             IOobject::AUTO_WRITE
00036         ),
00037         mesh
00038     );
00039 
00040 
00041     Info<< "Reading field rho\n" << endl;
00042     volScalarField rho
00043     (
00044         IOobject
00045         (
00046             "rho",
00047             runTime.timeName(),
00048             mesh,
00049             IOobject::MUST_READ,
00050             IOobject::AUTO_WRITE
00051         ),
00052         mesh
00053     );
00054 
00055 
00056     Info<< "Calculating field rhoFlux\n" << endl;
00057     surfaceScalarField rhoFlux
00058     (
00059         IOobject
00060         (
00061             "rhoFlux",
00062             runTime.timeName(),
00063             mesh,
00064             IOobject::NO_READ,
00065             IOobject::NO_WRITE
00066         ),
00067         -k*mesh.magSf()*fvc::snGrad(phi)
00068     );
00069 
00070 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines