Bugfix: clean-up
[foam-extend-4.0.git] / applications / solvers / coupled / conjugateHeatSimpleFoam / createFields.H
blobe84f341f822493c92ada816af31a2b6889e2225b
1     Info<< "Reading transportProperties\n" << endl;
3     IOdictionary transportProperties
4     (
5         IOobject
6         (
7             "transportProperties",
8             runTime.constant(),
9             mesh,
10             IOobject::MUST_READ,
11             IOobject::NO_WRITE
12         )
13     );
15     Info<< "Calculating field g.h\n" << endl;
16     volScalarField gh("gh", g & mesh.C());
17     surfaceScalarField ghf("ghf", g & mesh.Cf());
19     Info<< "Reading field p_rgh\n" << endl;
20     volScalarField p_rgh
21     (
22         IOobject
23         (
24             "p_rgh",
25             runTime.timeName(),
26             mesh,
27             IOobject::MUST_READ,
28             IOobject::AUTO_WRITE
29         ),
30         mesh
31     );
33     Info<< "Reading field U\n" << endl;
34     volVectorField U
35     (
36         IOobject
37         (
38             "U",
39             runTime.timeName(),
40             mesh,
41             IOobject::MUST_READ,
42             IOobject::AUTO_WRITE
43         ),
44         mesh
45     );
47     Info<< "Reading field T\n" << endl;
48     volScalarField T
49     (
50         IOobject
51         (
52             "T",
53             runTime.timeName(),
54             mesh,
55             IOobject::MUST_READ,
56             IOobject::AUTO_WRITE
57         ),
58         mesh
59     );
61 #   include "createPhi.H"
63 #   include "readTransportProperties.H"
65     label pRefCell = 0;
66     scalar pRefValue = 0.0;
67     setRefCell
68     (
69         p_rgh,
70         mesh.solutionDict().subDict("SIMPLE"),
71         pRefCell,
72         pRefValue
73     );
75     autoPtr<incompressible::RASModel> turbulence
76     (
77         incompressible::RASModel::New(U, phi, laminarTransport)
78     );
80 #   include "attachPatches.H"
82     Info<< "Reading field kappaEff\n" << endl;
83     volScalarField kappaEff
84     (
85         IOobject
86         (
87             "kappaEff",
88             runTime.timeName(),
89             mesh,
90             IOobject::MUST_READ,
91             IOobject::AUTO_WRITE
92         ),
93         mesh
94     );
96     // Kinematic density for buoyancy force
97     volScalarField rhok
98     (
99         IOobject
100         (
101             "rhok",
102             runTime.timeName(),
103             mesh,
104             IOobject::READ_IF_PRESENT,
105             IOobject::AUTO_WRITE
106         ),
107         1.0 - beta*(T - TRef)
108     );
110     Info<< "Creating radiation model\n" << endl;
111     autoPtr<radiation::radiationModel> radiation
112     (
113         radiation::radiationModel::New(T)
114     );