Removed unneeded lib dependency from mdInitialise
[foam-extend-3.2.git] / applications / solvers / surfaceTracking / bubbleInterTrackFoam / createFields.H
blob25256d07aa9cbc1ba1c4150fbe47f1e86622f999
2 Info<< "\nReading field p\n" << endl << flush;
3 volScalarField p
5     IOobject
6     (
7         "p",
8         runTime.timeName(),
9         mesh,
10         IOobject::MUST_READ,
11         IOobject::AUTO_WRITE
12     ),
13     mesh
17 Info<< "Reading field U\n" << endl << flush;
18 volVectorField U
20     IOobject
21     (
22         "U",
23         runTime.timeName(),
24         mesh,
25         IOobject::MUST_READ,
26         IOobject::AUTO_WRITE
27     ),
28     mesh
32 #   include "createPhi.H"
35 volScalarField rho
37     IOobject
38     (
39         "rho",
40         runTime.timeName(),
41         mesh,
42         IOobject::NO_READ,
43         IOobject::NO_WRITE
44     ),
45     mesh,
46     dimensionedScalar("0", dimMass/dimVolume, 0)
50 freeSurface interface(mesh, rho, U, p, phi);
53 volScalarField* fluidIndicatorPtr = NULL;
55 if(Pstream::parRun())
57     fluidIndicatorPtr = new volScalarField
58     (
59         IOobject
60         (
61             "fluidIndicator",
62             runTime.timeName(),
63             mesh,
64             IOobject::MUST_READ,
65             IOobject::AUTO_WRITE
66         ),
67         mesh
68     );
70 else
72     fluidIndicatorPtr = new volScalarField
73     (
74         IOobject
75         (
76             "fluidIndicator",
77             runTime.timeName(),
78             mesh,
79             IOobject::NO_READ,
80             IOobject::NO_WRITE
81         ),
82         interface.fluidIndicator()
83     );
86 volScalarField& fluidIndicator = *fluidIndicatorPtr;
89 rho = fluidIndicator
90    *(
91         interface.rhoFluidA()
92       - interface.rhoFluidB()
93     )
94   + interface.rhoFluidB();
97 volScalarField mu
99     IOobject
100     (
101         "mu",
102         runTime.timeName(),
103         mesh,
104         IOobject::NO_READ,
105         IOobject::NO_WRITE
106     ),
107     fluidIndicator
108    *(
109         interface.muFluidA()
110       - interface.muFluidB()
111     )
112   + interface.muFluidB()
116 // Read interpolators if present
117 if (interface.twoFluids())
119     interface.interpolatorAB();
123 #   include "setRefCell.H"