-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main_Y.f95
94 lines (79 loc) · 2.15 KB
/
Main_Y.f95
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
SUBROUTINE YVELOCITY
USE GLOBAL
IMPLICIT NONE
REAL*8 P1,P2
NF=2
IF(LSOLVE(NF).eqv. .TRUE.) THEN
IST=2
JST=2
ISTF=IST-1
JSTF=JST-1
CALL GAMSOR
DO I=2,L2
AREA=R(1)*XCV(I)
FLOW=AREA*MIV(I,2)*RHO(I,1)
DIF=AREA*GAM(I,1)/YDIF(2)
AJM(I,2)=DIF+MAX(0.0,FLOW)
ENDDO
DO J=2,M2
FLOW=ARX(J)*MIU(2,J)*RHO(1,J)
DIF=ARX(J)*GAM(1,J)/( XDIF(2)*SX(J) )
AIM(2,J)=DIF+MAX(0.0,FLOW)
DO I=2,L2
IF(I==L2) THEN
FLOW=ARX(J)*MIU(L1,J)*RHO(L1,J)
DIF=ARX(J)*GAM(L1,J)/( XDIF(L1)*SX(J) )
ELSE
FLOW=ARX(J)*MIU(I+1,J)*( FX(I+1)*RHO(I+1,J)+FXM(I+1)*RHO(I,J) )
DIF=ARX(J)*2.0*GAM(I,J)*GAM(I+1,J)/( (XCV(I)*GAM(I+1,J)+XCV(I+1)*GAM(I,J)+1.0E-30)*SX(J) )
ENDIF
AIM(I+1,J)=DIF+MAX(0.,FLOW)
AIP(I,J)=AIM(I+1,J)-FLOW
FLUXE(I,J)=FLOW
AREA=RMN(J+1)*XCV(I)
IF(J==M2) THEN
FLOW=AREA*MIV(I,M1)*RHO(I,M1)
DIF=AREA*GAM(I,M1)/YDIF(M1)
ELSE
FLOW=AREA*MIV(I,J+1)*( F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