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<< "Creating field hU\n" << endl;
31 (
32  IOobject
33  (
34  "hU",
35  runTime.timeName(),
36  mesh,
37  IOobject::MUST_READ,
38  IOobject::AUTO_WRITE
39  ),
40  mesh
41 );
42 
43 Info<< "Reading field U\n" << endl;
45 (
46  IOobject
47  (
48  "U",
49  runTime.timeName(),
50  mesh,
51  IOobject::NO_READ,
52  IOobject::AUTO_WRITE
53  ),
54  hU/h
55 );
56 
57 Info<< "Creating field hTotal for post processing\n" << endl;
58 volScalarField hTotal
59 (
60  IOobject
61  (
62  "hTotal",
63  runTime.timeName(),
64  mesh,
65  IOobject::READ_IF_PRESENT,
66  IOobject::AUTO_WRITE
67  ),
68  h+h0
69 );
70 hTotal.write();
71 
72 #include "createPhi.H"
73 
74 Info<< "Creating Coriolis Force" << endl;
75 const dimensionedVector F("F", ((2.0*Omega) & gHat)*gHat);
76 
77 mesh.setFluxRequired(h.name());
Foam::dimLength
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
Definition: dimensionSets.H:50
h0
scalar h0
Definition: readInitialConditions.H:86
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::constant::physicoChemical::F
const dimensionedScalar F
Faraday constant: default SI units: [C/mol].
Foam::dimensionedVector
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Definition: dimensionedVector.H:48
createPhi.H
Creates and initialises the face-flux field phi.
Foam::Info
messageStream Info
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:41
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
h
const volScalarField & h
Planck constant.
Definition: createFields.H:6
Foam::volVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:55
U
volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), Urel+SRF->U())