Removed unnecessary return statement
[foam-extend-3.2.git] / applications / solvers / multiphase / bubbleFoam / createFields.H
blob875a4f1be13550588c393b2d52e17a19e3990a4a
1     Info<< "Reading field alpha\n" << endl;
2     volScalarField alpha
3     (
4         IOobject
5         (
6             "alpha",
7             runTime.timeName(),
8             mesh,
9             IOobject::MUST_READ,
10             IOobject::AUTO_WRITE
11         ),
12         mesh
13     );
15     volScalarField beta
16     (
17         IOobject
18         (
19             "beta",
20             runTime.timeName(),
21             mesh,
22             IOobject::NO_READ,
23             IOobject::NO_WRITE
24         ),
25         scalar(1) - alpha
26         //,alpha.boundaryField().types()
27     );
29     Info<< "Reading field p\n" << endl;
30     volScalarField p
31     (
32         IOobject
33         (
34             "p",
35             runTime.timeName(),
36             mesh,
37             IOobject::MUST_READ,
38             IOobject::AUTO_WRITE
39         ),
40         mesh
41     );
43     Info<< "Reading field Ua\n" << endl;
44     volVectorField Ua
45     (
46         IOobject
47         (
48             "Ua",
49             runTime.timeName(),
50             mesh,
51             IOobject::MUST_READ,
52             IOobject::AUTO_WRITE
53         ),
54         mesh
55     );
57     Info<< "Reading field Ub\n" << endl;
58     volVectorField Ub
59     (
60         IOobject
61         (
62             "Ub",
63             runTime.timeName(),
64             mesh,
65             IOobject::MUST_READ,
66             IOobject::AUTO_WRITE
67         ),
68         mesh
69     );
71     volVectorField U
72     (
73         IOobject
74         (
75             "U",
76             runTime.timeName(),
77             mesh,
78             IOobject::NO_READ,
79             IOobject::AUTO_WRITE
80         ),
81         alpha*Ua + beta*Ub
82     );
85     Info<< "Reading transportProperties\n" << endl;
87     IOdictionary transportProperties
88     (
89         IOobject
90         (
91             "transportProperties",
92             runTime.constant(),
93             mesh,
94             IOobject::MUST_READ,
95             IOobject::NO_WRITE
96         )
97     );
99     dimensionedScalar rhoa
100     (
101         transportProperties.lookup("rhoa")
102     );
104     dimensionedScalar rhob
105     (
106         transportProperties.lookup("rhob")
107     );
109     dimensionedScalar nua
110     (
111         transportProperties.lookup("nua")
112     );
114     dimensionedScalar nub
115     (
116         transportProperties.lookup("nub")
117     );
119     dimensionedScalar da
120     (
121         transportProperties.lookup("da")
122     );
124     dimensionedScalar db
125     (
126         transportProperties.lookup("db")
127     );
129     dimensionedScalar Cvm
130     (
131         transportProperties.lookup("Cvm")
132     );
134     dimensionedScalar Cl
135     (
136         transportProperties.lookup("Cl")
137     );
139     dimensionedScalar Ct
140     (
141         transportProperties.lookup("Ct")
142     );
144 #   include "createPhia.H"
145 #   include "createPhib.H"
147     surfaceScalarField phi
148     (
149         IOobject
150         (
151             "phi",
152             runTime.timeName(),
153             mesh
154         ),
155         fvc::interpolate(alpha)*phia
156       + fvc::interpolate(beta)*phib
157     );
160 #   include "createRASTurbulence.H"
162     Info<< "Calculating field DDtUa and DDtUb\n" << endl;
164     volVectorField DDtUa =
165         fvc::ddt(Ua)
166       + fvc::div(phia, Ua)
167       - fvc::div(phia)*Ua;
169     volVectorField DDtUb =
170         fvc::ddt(Ub)
171       + fvc::div(phib, Ub)
172       - fvc::div(phib)*Ub;
175     Info<< "Calculating field g.h\n" << endl;
176     volScalarField gh("gh", g & mesh.C());
179     label pRefCell = 0;
180     scalar pRefValue = 0.0;
181     setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);