0% found this document useful (0 votes)
46 views2 pages

Fundamental Gas Dynamics Subroutines and Example: # Problem Call and Arguments Return Variables List Isentropic Process

This document describes 7 gas dynamics subroutines: 1) isentropic process, 2) normal shock process, 3) oblique shock process, 4) Prandtl-Meyer angle, 5) Prandtl-Meyer fan, 6) Fanno flow process, and 7) Rayleigh flow process. For each subroutine, it lists the problem addressed, required inputs like the case code N and variable v, and output return variables. It also provides the Maple code for the isentropic flow procedure as an example.

Uploaded by

Kamal Hosny
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views2 pages

Fundamental Gas Dynamics Subroutines and Example: # Problem Call and Arguments Return Variables List Isentropic Process

This document describes 7 gas dynamics subroutines: 1) isentropic process, 2) normal shock process, 3) oblique shock process, 4) Prandtl-Meyer angle, 5) Prandtl-Meyer fan, 6) Fanno flow process, and 7) Rayleigh flow process. For each subroutine, it lists the problem addressed, required inputs like the case code N and variable v, and output return variables. It also provides the Maple code for the isentropic flow procedure as an example.

Uploaded by

Kamal Hosny
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Fundamental Gas Dynamics Subroutines and Example

PROBLEM

CALL AND ARGUMENTS

Isentropic Process

ir(N,v)

Normal Shock Process


nr(N,v)

2
Oblique Shock Process

os(N,v1,v2)

Prandtl Meyer Angle


pa(N,v)

4
Prandtl Meyer Fan

pf(N,v1,v2)

Fanno Flow Process

fa(N,v)

Rayleigh Flow Process

ra(N,v)

1
2
3
4
5
6
7
8
1
2
3
4
1
2
3
4
5
6
7
8
9
10
11
1

M
PPT
MS
C
TTT
RRT
AAS(SUB)
AAS(SUP)
M1
P2P1
M2
PT2PT1
M1
DL
M1
P2P1
M1
M2
M2
DL
M2
P2P1
P2P1 DL
M1
TH
M2
TH
DL
TH
P2P1 TH
P2P1 --M

2
1
2
3
4
5
6
1
2
3
4
5
6
7
8
9
10
1
2
3
4
5
6
7
8
9
10
11

NU
M1, DL
M1, P2P1
M1, M2
M2, DL
M2, P2P1
P2P1, DL
M
TTS
PPS
VVS
PTPTS(SUB)
PTPTS(SUP)
SSSCP(SUB)
SSSCP(SUP)
FL4DH(SUB)
FL4DH(SUP)
M
TTS(SUB)
TTS(SUP)
PPS
VVS
PTPTS(SUB)
PTPTS(SUP)
SSSCP(SUB)
SSSCP(SUP)
T0T0S(SUB)
T0T0S(SUP)

NB N is the case code, v,v1,v2 are arbitrary variables


1

RETURN VARIABLES LIST

[M, PPT, MS, C, TTT, RRT, AAS]

[M1, P2P1, M2, V1V2, PT2PT1, P1PT2, T2T1]


NB M1>1, M2<1, V1V2=R2R1, T2T1=A2A1^2

[M1, P2P1, M2, DL, PT2PT1, P1PT2, T2T1, R2R1,


TH, DLMAX, THMAX]

NB M1>1, M2>1, Angles IN/OUT in radians

[M, NU]

[M1, P2P1, M2, DL, NU1, NU2, AL1, AL2]

[M, TTS, PPS, VVS, PTPTS, SSSCP, FL4DH]

[M, TTS, PPS, VVS, PTPTS, SSSCP, TTTTS]

Maple Code for Isentropic Flow Procedure


Isentropic Flow Procedure
> restart: G:=() -> 1.4:
> ir := proc(N,v) local K,PTR,KM1,KP1,GO, M,MS,C,PPT,TTT,RRT,AAS,eq,o;
KM1
if
elif
elif
elif
elif
elif
elif
elif

:=
N
N
N
N
N
N
N

K
=
=
=
=
=
=
=

1
2
3
4
5
6
7

1 :
then
then
then
then
then
then
then

KP1
M
PPT
MS
C
TTT
RRT
AAS
M
N = 8 then AAS
M

:=
:=
:=
:=
:=
:=
:=
:=
:=
:=
:=

K:=G():

K + 1
: GO := 1 :
v
v : M := sqrt( 2 * (PPT^(-KM1/K)-1 ) / KM1 )
:
v : M := sqrt( 1 / (KP1/(2 *MS^2)-KM1/2 )
)
:
v : M := sqrt( 2 / (KM1*(1 /(C^2)-1 ))
)
:
v : M := sqrt( 2 * (1/TTT-1 )
/ KM1 )
:
v : M := sqrt( 2 * (1/RRT^KM1-1 )
/ KM1 )
:
v : eq:= AAS-(2*(1+KM1*M^2/2)/KP1)^(KP1/(2*KM1))/M:
fsolve(eq,M,0..1)
: GO := 2 :
v : eq:= AAS-(2*(1+KM1*M^2/2)/KP1)^(KP1/(2*KM1))/M:
fsolve(eq,M,1..infinity)
: GO := 2 :

fi:
if GO<>2 then AAS := (2 *(1 +KM1*M^2/2 )/KP1)^(KP1/(2 *KM1))/M
fi
PTR:=(1+KM1*M^2/2) : PPT:=PTR^(-K/KM1) : TTT:=PTR^(-1) : RRT:=PTR^(-1/KM1)
if N <> 3 then MS := sqrt( KP1 / (2 /(
M^2)+KM1) )
fi
if N <> 4 then C := sqrt( 1 / (2 /(KM1*M^2)+ 1 ) )
fi
o := evalf([M,PPT,MS,C,TTT,RRT,AAS])
end :
> ir(1,3);
[ 3., 0.02722368370 , 1.963961012 , 0.8017837256 , 0.3571428571 , 0.07622631437 , 4.234567903 ]

:
:
:
:

You might also like