Removed unneeded lib dependency from mdInitialise
[foam-extend-3.2.git] / applications / solvers / incompressible / icoDyMFoam / createFields.H
blob9c918b565aa5259f38ba75ba83a50a2a810a8f8e
1     Info<< "Reading transportProperties\n" << endl;
3     IOdictionary transportProperties
4     (
5         IOobject
6         (
7             "transportProperties",
8             runTime.constant(),
9             mesh,
10             IOobject::MUST_READ,
11             IOobject::NO_WRITE
12         )
13     );
15     dimensionedScalar nu
16     (
17         transportProperties.lookup("nu")
18     );
21     Info<< "Reading field p\n" << endl;
22     volScalarField p
23     (
24         IOobject
25         (
26             "p",
27             runTime.timeName(),
28             mesh,
29             IOobject::MUST_READ,
30             IOobject::AUTO_WRITE
31         ),
32         mesh
33     );
36     Info<< "Reading field U\n" << endl;
37     volVectorField U
38     (
39         IOobject
40         (
41             "U",
42             runTime.timeName(),
43             mesh,
44             IOobject::MUST_READ,
45             IOobject::AUTO_WRITE
46         ),
47         mesh
48     );
50 #   include "createPhi.H"
53     label pRefCell = 0;
54     scalar pRefValue = 0.0;
55     setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
58     Info<< "Reading field rAU if present\n" << endl;
59     volScalarField rAU
60     (
61         IOobject
62         (
63             "rAU",
64             runTime.timeName(),
65             mesh,
66             IOobject::READ_IF_PRESENT,
67             IOobject::AUTO_WRITE
68         ),
69         mesh,
70         runTime.deltaT(),
71         zeroGradientFvPatchScalarField::typeName
72     );
75     {
76         const dictionary& piso = mesh.solutionDict().subDict("PISO");
78         bool momentumPredictor = true;
79         if (piso.found("momentumPredictor"))
80         {
81             momentumPredictor = Switch(piso.lookup("momentumPredictor"));
82         }
84         bool momentumPredictorSave = momentumPredictor;
85         momentumPredictor = false;
86 #       include "UEqn.H"
87         momentumPredictor = momentumPredictorSave;
89         rAU = 1.0/UEqn.A();
90     }