Removed unnecessary return statement
[foam-extend-3.2.git] / applications / solvers / multiphase / barotropicCavitatingFoam / createFields.H
blob1286f1d6f32727cd182c03c8e12fe6cbc8205f19
1     Info<< "Reading field p\n" << endl;
2     volScalarField p
3     (
4         IOobject
5         (
6             "p",
7             runTime.timeName(),
8             mesh,
9             IOobject::MUST_READ,
10             IOobject::AUTO_WRITE
11         ),
12         mesh
13     );
16     Info<< "Reading field rho\n" << endl;
17     volScalarField rho
18     (
19         IOobject
20         (
21             "rho",
22             runTime.timeName(),
23             mesh,
24             IOobject::MUST_READ,
25             IOobject::AUTO_WRITE
26         ),
27         mesh
28     );
31     Info<< "Reading field U\n" << endl;
32     volVectorField U
33     (
34         IOobject
35         (
36             "U",
37             runTime.timeName(),
38             mesh,
39             IOobject::MUST_READ,
40             IOobject::AUTO_WRITE
41         ),
42         mesh
43     );
45 #   include "createPhi.H"
47     // Mass flux
48     // Initialisation does not matter because rhoPhi is reset after the
49     // gamma solution before it is used in the U equation.
50     surfaceScalarField rhoPhi = fvc::interpolate(rho)*phi;
52     volScalarField gamma
53     (
54         IOobject
55         (
56             "p",
57             runTime.timeName(),
58             mesh,
59             IOobject::NO_READ,
60             IOobject::AUTO_WRITE
61         ),
62         mesh,
63         dimensionedScalar("0", dimless, 0.0)
64     );
66     volScalarField psiByRho
67     (
68         IOobject
69         (
70             "psiByRho",
71             runTime.timeName(),
72             mesh,
73             IOobject::NO_READ,
74             IOobject::AUTO_WRITE
75         ),
76         (gamma*psig + (1.0 - gamma)*psil)/rho
77     );