repo.or.cz
/
foam-extend-3.2.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Forward compatibility: flex
[foam-extend-3.2.git]
/
applications
/
solvers
/
compressible
/
rhoSonicFoam
/
createFields.H
blob
f0c0e4a22a0ceecf7095ac6c175f7a6635efb355
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
);
14
15
16
Info<< "Reading field T\n" << endl;
17
volScalarField T
18
(
19
IOobject
20
(
21
"T",
22
runTime.timeName(),
23
mesh,
24
IOobject::MUST_READ,
25
IOobject::AUTO_WRITE
26
),
27
mesh
28
);
29
30
Info<< "Reading field U\n" << endl;
31
volVectorField U
32
(
33
IOobject
34
(
35
"U",
36
runTime.timeName(),
37
mesh,
38
IOobject::MUST_READ,
39
IOobject::AUTO_WRITE
40
),
41
mesh
42
);
43
44
volScalarField psi
45
(
46
IOobject
47
(
48
"psi",
49
runTime.timeName(),
50
mesh,
51
IOobject::NO_READ,
52
IOobject::NO_WRITE
53
),
54
1.0/(R*T)
55
);
56
psi.oldTime();
57
58
volScalarField rho
59
(
60
IOobject
61
(
62
"rho",
63
runTime.timeName(),
64
mesh
65
),
66
psi*p,
67
p.boundaryField().types()
68
);
69
70
volVectorField rhoU
71
(
72
IOobject
73
(
74
"rhoU",
75
runTime.timeName(),
76
mesh,
77
IOobject::NO_READ,
78
IOobject::NO_WRITE
79
),
80
rho*U,
81
U.boundaryField().types()
82
);
83
84
volScalarField rhoE
85
(
86
IOobject
87
(
88
"rhoE",
89
runTime.timeName(),
90
mesh,
91
IOobject::NO_READ,
92
IOobject::NO_WRITE
93
),
94
rho*Cv*T + 0.5*rho*magSqr(rhoU/rho),
95
T.boundaryField().types()
96
);