[Fortran] 纯文本查看 复制代码
program tajing
implicit none
real,external::H,LV
real,external::W,C,Ci
real L,V,Rl,Rv,Ht,hli,st
call sub_di(V,W)
end
subroutine sub_di(V,W)
implicit none
real,external::W,Ci
real L,V,Rl,Rv,Ht,hli,st
read Ht,hli
read L,V,Rl,Rv
read st
call W(C,Rl,Rv)
Di=(V/0.785/W(C,Rl,Rv))**0.5
print *,"初步估计塔径Di:",Di
end subroutine
subroutine W(C,Rl,Rv)
implicit none
real,external::C
real Rl,Rv,W
call C(Ci,st)
W=0.8*C*((Rl-Rv)/Rv)**0.5
print *,"选取计算空速W:",W
end subroutine
subroutine C(Ci,st)
implicit none
real,external::Ci
real st,C
read st
call Ci(H,LV)
C=Ci/(20/st)**0.2
print *,"经验系数C:",C
end subroutine
subroutine Ci(H,LV)
implicit none
real,external::H,LV
real Ci
Ci=exp(-4.531+1.6562*H+5.5496*H**2-6.4695*H**3+&
(-0.474675+0.079*H-1.39*H**2+1.3212H**3)*log(expr)LV&
+(-0.07291+0.088307*H-0.49123*H**2+0.43196*H**3)*(log(expr)LV)**2)
print *,"标准系数Ci:",Ci
end subroutine
function H(Ht,hli)
implicit none
real Ht,hli
real H
read Ht,hli
H=Ht-hli
end function
function LV(L,V,Rl,Rv)
implicit none
real L,V,Rl,Rv
real LV
read L,V,Rl,Rv
LV=L*(Rl/Rv)**0.5/V
end function
[Fortran] 纯文本查看 复制代码
program tajing
implicit none
real,external::H,LV
real,external::W,C,Ci
real L,V,Rl,Rv,Ht,hli,st
call sub_di(V,W)
end
subroutine sub_di(V,W)
implicit none
real,external::W,Ci
real L,V,Rl,Rv,Ht,hli,st
read(*,*)Ht,hli
read(*,*)L,V,Rl,Rv
read(*,*)st
call W(C,Rl,Rv)
Di=(V/0.785/W(C,Rl,Rv))**0.5
print *,"初步估计塔径Di:",Di
end subroutine
subroutine W(C,Rl,Rv)
implicit none
real,external::C
real Rl,Rv,W
call C(Ci,st)
W=0.8*C*((Rl-Rv)/Rv)**0.5
print *,"选取计算空速W:",W
end subroutine
subroutine C(Ci,st)
implicit none
real,external::Ci
real st,C
read(*,*)st
call Ci(H,LV)
C=Ci/(20/st)**0.2
print *,"经验系数C:",C
end subroutine
subroutine Ci(H,LV)
implicit none
real,external::H,LV
real Ci
Ci=exp(-4.531+1.6562*H+5.5496*H**2-6.4695*H**3+&
(-0.474675+0.079*H-1.39*H**2+1.3212H**3)*log(expr)(LV)&
+(-0.07291+0.088307*H-0.49123*H**2+0.43196*H**3)*(log(expr)(LV))**2)
print *,"标准系数Ci:",Ci
end
function H(Ht,hli)
implicit none
real Ht,hli
real H
read(*,*)Ht,hli
H=Ht-hli
end function
function LV(L,V,Rl,Rv)
implicit none
real L,V,Rl,Rv
real LV
read(*,*)L,V,Rl,Rv
LV=L*(Rl/Rv)**0.5/V
end function