Removed unnecessary return statement
[foam-extend-3.2.git] / applications / solvers / multiphase / cavitatingFoam / createFields.H
blob49c7de1473355e69429cf309091dc81aaea5a563
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     );
15     volScalarField rho
16     (
17         IOobject
18         (
19             "rho",
20             runTime.timeName(),
21             mesh,
22             IOobject::MUST_READ,
23             IOobject::AUTO_WRITE
24         ),
25         mesh
26     );
28     volScalarField gamma
29     (
30         IOobject
31         (
32             "gamma",
33             runTime.timeName(),
34             mesh,
35             IOobject::NO_READ,
36             IOobject::AUTO_WRITE
37         ),
38         max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0))
39     );
40     gamma.oldTime();
42     Info<< "Creating compressibilityModel\n" << endl;
43     autoPtr<barotropicCompressibilityModel> psiModel =
44         barotropicCompressibilityModel::New
45         (
46             thermodynamicProperties,
47             gamma
48         );
50     const volScalarField& psi = psiModel->psi();
52     rho == max
53     (
54         psi*p
55       + (1.0 - gamma)*rhol0
56       + ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat,
57         rhoMin
58     );
60     Info<< "Reading field U\n" << endl;
61     volVectorField U
62     (
63         IOobject
64         (
65             "U",
66             runTime.timeName(),
67             mesh,
68             IOobject::MUST_READ,
69             IOobject::AUTO_WRITE
70         ),
71         mesh
72     );
74     #include "createPhiv.H"
75     #include "compressibleCreatePhi.H"
77     Info<< "Reading transportProperties\n" << endl;
79     twoPhaseMixture twoPhaseProperties(U, phiv, "gamma");
81     // Create incompressible turbulence model
82     autoPtr<incompressible::turbulenceModel> turbulence
83     (
84         incompressible::turbulenceModel::New(U, phiv, twoPhaseProperties)
85     );