ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / applications / solvers / electromagnetics / mhdFoam / createFields.H
blobfb5a00493222b712387c1e8253f05925b264309b
1     Info<< "Reading transportProperties\n" << endl;
3     IOdictionary transportProperties
4     (
5         IOobject
6         (
7             "transportProperties",
8             runTime.constant(),
9             mesh,
10             IOobject::MUST_READ_IF_MODIFIED,
11             IOobject::NO_WRITE
12         )
13     );
15     dimensionedScalar rho
16     (
17         transportProperties.lookup("rho")
18     );
20     dimensionedScalar nu
21     (
22         transportProperties.lookup("nu")
23     );
25     dimensionedScalar mu
26     (
27         transportProperties.lookup("mu")
28     );
30     dimensionedScalar sigma
31     (
32         transportProperties.lookup("sigma")
33     );
35     Info<< "Reading field p\n" << endl;
36     volScalarField p
37     (
38         IOobject
39         (
40             "p",
41             runTime.timeName(),
42             mesh,
43             IOobject::MUST_READ,
44             IOobject::AUTO_WRITE
45         ),
46         mesh
47     );
50     Info<< "Reading field U\n" << endl;
51     volVectorField U
52     (
53         IOobject
54         (
55             "U",
56             runTime.timeName(),
57             mesh,
58             IOobject::MUST_READ,
59             IOobject::AUTO_WRITE
60         ),
61         mesh
62     );
64     #include "createPhi.H"
66     Info<< "Reading field pB\n" << endl;
67     volScalarField pB
68     (
69         IOobject
70         (
71             "pB",
72             runTime.timeName(),
73             mesh,
74             IOobject::MUST_READ,
75             IOobject::AUTO_WRITE
76         ),
77         mesh
78     );
81     Info<< "Reading field B\n" << endl;
82     volVectorField B
83     (
84         IOobject
85         (
86             "B",
87             runTime.timeName(),
88             mesh,
89             IOobject::MUST_READ,
90             IOobject::AUTO_WRITE
91         ),
92         mesh
93     );
96     #include "createPhiB.H"
98     dimensionedScalar DB = 1.0/(mu*sigma);
99     DB.name() = "DB";
101     dimensionedScalar DBU = 1.0/(2.0*mu*rho);
102     DBU.name() = "DBU";
105     label pRefCell = 0;
106     scalar pRefValue = 0.0;
107     setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);