FreeFOAM The Cross-Platform CFD Toolkit
createFields.H
Go to the documentation of this file.
1  Info<< "Reading field p\n" << endl;
3  (
4  IOobject
5  (
6  "p",
7  runTime.timeName(),
8  mesh,
9  IOobject::MUST_READ,
10  IOobject::NO_WRITE
11  ),
12  mesh
13  );
14 
15  p = dimensionedScalar("zero", p.dimensions(), 0.0);
16 
17 
18  Info<< "Reading field U\n" << endl;
20  (
21  IOobject
22  (
23  "U",
24  runTime.timeName(),
25  mesh,
26  IOobject::MUST_READ,
27  IOobject::AUTO_WRITE
28  ),
29  mesh
30  );
31 
32  U = dimensionedVector("0", U.dimensions(), vector::zero);
33 
35  (
36  IOobject
37  (
38  "phi",
39  runTime.timeName(),
40  mesh,
41  IOobject::NO_READ,
42  IOobject::AUTO_WRITE
43  ),
44  fvc::interpolate(U) & mesh.Sf()
45  );
46 
47 
48  label pRefCell = 0;
49  scalar pRefValue = 0.0;
50  setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
51 
52 // ************************ vim: set sw=4 sts=4 et: ************************ //