FreeFOAM The Cross-Platform CFD Toolkit
createFields.H
Go to the documentation of this file.
1 Info<< "Reading field h\n" << endl;
3 (
4  IOobject
5  (
6  "h",
7  runTime.timeName(),
8  mesh,
9  IOobject::MUST_READ,
10  IOobject::AUTO_WRITE
11  ),
12  mesh
13 );
14 
15 Info<< "Reading field h0 if present\n" << endl;
17 (
18  IOobject
19  (
20  "h0",
21  runTime.findInstance("polyMesh", "points"),
22  mesh,
23  IOobject::READ_IF_PRESENT
24  ),
25  mesh,
26  dimensionedScalar("h0", dimLength, 0.0)
27 );
28 
29 Info<< "Reading field U\n" << endl;
31 (
32  IOobject
33  (
34  "U",
35  runTime.timeName(),
36  mesh,
37  IOobject::MUST_READ,
38  IOobject::AUTO_WRITE
39  ),
40  mesh
41 );
42 
43 Info<< "Creating field hU\n" << endl;
45 (
46  IOobject
47  (
48  "hU",
49  runTime.timeName(),
50  mesh
51  ),
52  h*U,
53  U.boundaryField().types()
54 );
55 
56 Info<< "Creating field hTotal for post processing\n" << endl;
57 volScalarField hTotal
58 (
59  IOobject
60  (
61  "hTotal",
62  runTime.timeName(),
63  mesh,
64  IOobject::READ_IF_PRESENT,
65  IOobject::AUTO_WRITE
66  ),
67  h+h0
68 );
69 hTotal.write();
70 
71 # include "createPhi.H"
72 
73 Info<< "Creating Coriolis Force" << endl;
74 const dimensionedVector F("F", ((2.0*Omega) & gHat)*gHat);