[Fortran] 纯文本查看 复制代码
SUBROUTINE BIANTIAO(DI,DJ,FAIXC,FAIYC,LIC,VX,VY,DEN,STAPRE,RATE)
IMPLICIT NONE
INTEGER :: I,J,K,DI,DJ
REAL(8):: DENIN = 1.293D0,STAPREIN = 85419.0D0, TOTALTEM = 330.0D0,TOTALPRE = 2500000.0D0
REAL(8):: RGAS = 287.06D0,STAPREI,RATE,MAII,STATEMI,GAMA = 1.4D0,KK,RR
REAL(8):: VY(0:DI,0:DJ),VX(0:DI,0:DJ),DEN(0:DI,0:DJ),STAPRE(0:DI,0:DJ),FAIXC(0:DI,0:DJ),FAIYC(0:DI,0:DJ)
REAL(8):: LIC(0:DI,0:DJ)
DO J= 1,DJ-1
STAPREI = DMIN1(STAPRE(1,J),TOTALPRE)
KK = ((GAMA-1.0D0)/GAMA)
RR = (TOTALPRE/STAPREI)
RATE =REAL(RR**KK)
MAII =DSQRT((RATE-1.0D0)*2.0D0/(GAMA-1.0D0))
STATEMI = TOTALTEM/RATE
VY(0,J) = 0.0D0
STAPRE(0,J) = STAPREI
DEN(0,J) = STAPREI/(STATEMI*RGAS)
VX(0,J) = MAII*DSQRT(GAMA*RGAS*STATEMI)
END DO
DO J=1,DJ-1
DEN(DI,J) = DEN(DI-1,J)
VX(DI,J) = VX(DI-1,J)
VY(DI,J) = VY(DI-1,J)
STAPRE(DI,J) = STAPREIN
END DO
DO I = 1,DI-1
VX(I,DJ) = VX(I,DJ-1)-2.0D0*(VX(I,DJ-1)*FAIXC(I,DJ-1)+VY(I,DJ-1)*FAIYC(I,DJ-1))*FAIXC(I,DJ-1)/(LIC(I,DJ-1)**2)
VY(I,DJ) = VY(I,DJ-1)-2.0D0*(VX(I,DJ-1)*FAIXC(I,DJ-1)+VY(I,DJ-1)*FAIYC(I,DJ-1))*FAIYC(I,DJ-1)/(LIC(I,DJ-1)**2)
DEN(I,DJ) = DEN(I,DJ-1)
STAPRE(I,DJ) = STAPRE(I,DJ-1)
END DO
DO I =1,DI-1
VX(I,0) = VX(I,1)-2.0D0*(VX(I,1)*FAIXC(I,1)+VY(I,1)*FAIYC(I,1))*FAIXC(I,1)/(LIC(I,1)**2)
VY(I,0) = VY(I,1)-2.0D0*(VX(I,1)*FAIXC(I,1)+VY(I,1)*FAIYC(I,1))*FAIYC(I,1)/(LIC(I,1)**2)
DEN(I,0) = DEN(I,1)
STAPRE(I,0) = STAPRE(I,1)
ENDDO
RETURN
END
小白求助,哪位老师帮忙看看