Removed unnecessary return statement
[foam-extend-3.2.git] / applications / solvers / incompressible / simpleSRFFoam / createFields.H
blob864b1dd93767528eae4191c64808fc44e42d9d80
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     Info<< "Reading field Urel\n" << endl;
16     volVectorField Urel
17     (
18         IOobject
19         (
20             "Urel",
21             runTime.timeName(),
22             mesh,
23             IOobject::MUST_READ,
24             IOobject::AUTO_WRITE
25         ),
26         mesh
27     );
29     Info<< "Reading/calculating face flux field phi\n" << endl;
30     surfaceScalarField phi
31     (
32         IOobject
33         (
34             "phi",
35             runTime.timeName(),
36             mesh,
37             IOobject::READ_IF_PRESENT,
38             IOobject::AUTO_WRITE
39         ),
40         linearInterpolate(Urel) & mesh.Sf()
41     );
43     label pRefCell = 0;
44     scalar pRefValue = 0.0;
45     setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
47     singlePhaseTransportModel laminarTransport(Urel, phi);
49     autoPtr<incompressible::RASModel> turbulence
50     (
51         incompressible::RASModel::New(Urel, phi, laminarTransport)
52     );
54     Info<< "Creating SRF model\n" << endl;
55     autoPtr<SRF::SRFModel> SRF
56     (
57         SRF::SRFModel::New(Urel)
58     );
60     // Create Uabs as a permanent field to make it available for on-the-fly
61     // post-processing operations
62     volVectorField Uabs
63     (
64         IOobject
65         (
66             "Uabs",
67             runTime.timeName(),
68             mesh,
69             IOobject::NO_READ,
70             IOobject::AUTO_WRITE
71         ),
72         Urel + SRF->U()
73     );