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
utilities
postProcessing
velocityField
Mach
thermophysicalMach.H
Go to the documentation of this file.
1
for
(label i=
startTime
; i<
endTime
; i++)
2
{
3
runTime.setTime(Times[i], i);
4
5
Info
<<
"Time = "
<< runTime.timeName() <<
endl
;
6
7
mesh
.readUpdate();
8
9
IOobject Uheader
10
(
11
"U"
,
12
runTime.timeName(),
13
mesh
,
14
IOobject::MUST_READ
15
);
16
17
if
(Uheader.headerOk())
18
{
19
volVectorField
U
(Uheader,
mesh
);
20
21
autoPtr<basicPsiThermo>
thermo
22
(
23
basicPsiThermo::New(
mesh
)
24
);
25
26
volScalarField
Cp = thermo->Cp();
27
volScalarField
Cv = thermo->Cv();
28
29
volScalarField
Ma
30
(
31
IOobject
32
(
33
"Ma"
,
34
runTime.timeName(),
35
mesh
36
),
37
mag
(U)/(
sqrt
((Cp/Cv)*(Cp - Cv)*thermo->T()))
38
);
39
Ma.
write
();
40
}
41
else
42
{
43
Info
<<
" No U"
<<
endl
;
44
}
45
}
46
47
// ************************ vim: set sw=4 sts=4 et: ************************ //