Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
applications
solvers
heatTransfer
buoyantPimpleFoam
createFields.H
Go to the documentation of this file.
1
Info
<<
"Reading thermophysical properties\n"
<<
endl
;
2
3
autoPtr<basicRhoThermo>
pThermo
4
(
5
basicRhoThermo::New(
mesh
)
6
);
7
basicRhoThermo&
thermo
=
pThermo
();
8
9
volScalarField
rho
10
(
11
IOobject
12
(
13
"rho"
,
14
runTime.timeName(),
15
mesh
,
16
IOobject::NO_READ,
17
IOobject::NO_WRITE
18
),
19
thermo.rho()
20
);
21
22
volScalarField
&
p
= thermo.p();
23
volScalarField
&
h
= thermo.h();
24
const
volScalarField
&
psi
= thermo.psi();
25
26
27
Info
<<
"Reading field U\n"
<<
endl
;
28
volVectorField
U
29
(
30
IOobject
31
(
32
"U"
,
33
runTime.timeName(),
34
mesh
,
35
IOobject::MUST_READ,
36
IOobject::AUTO_WRITE
37
),
38
mesh
39
);
40
41
#include <
finiteVolume/compressibleCreatePhi.H
>
42
43
44
Info
<<
"Creating turbulence model\n"
<<
endl
;
45
autoPtr<compressible::turbulenceModel>
turbulence
46
(
47
compressible::turbulenceModel::New
48
(
49
rho
,
50
U
,
51
phi
,
52
thermo
53
)
54
);
55
56
Info
<<
"Calculating field g.h\n"
<<
endl
;
57
volScalarField
gh
(
"gh"
, g &
mesh
.C());
58
surfaceScalarField
ghf
(
"ghf"
, g &
mesh
.Cf());
59
60
Info
<<
"Reading field p_rgh\n"
<<
endl
;
61
volScalarField
p_rgh
62
(
63
IOobject
64
(
65
"p_rgh"
,
66
runTime.timeName(),
67
mesh
,
68
IOobject::MUST_READ,
69
IOobject::AUTO_WRITE
70
),
71
mesh
72
);
73
74
// Force p_rgh to be consistent with p
75
p_rgh
= p -
rho
*
gh
;
76
77
Info
<<
"Creating field DpDt\n"
<<
endl
;
78
volScalarField
DpDt
79
(
80
"DpDt"
,
81
fvc::DDt
(
surfaceScalarField
(
"phiU"
,
phi
/
fvc::interpolate
(
rho
)), p)
82
);