[Fortran] 纯文本查看 复制代码
program ex_Ci
implicit none
real Ls,Ci,Vs,Rl,Rv,Ht,hli,st,H0,LV
real,intrinsic::log
read(*,*) Ls,Vs,Rl,Rv,Ht,hli
Ci = exp(-4.531+1.6562*(H0)+5.5496*(H0)**2-6.4695*(H0)**3+&
(-0.474675+0.079*(H0)-1.39*(H0)**2+1.3212*(H0)**3)*log(LV)&
+(-0.07291+0.088307*(H0)-0.49123*(H0)**2+0.43196*(H0)**3)*&
(log(LV))**2)
print *,"标准系数Ci:",Ci
end program
function H0(Ht,hli)
implicit none
real Ht,hli
real H0
H0=Ht-hli
end function
function LV(Ls,Vs,Rl,Rv)
implicit none
real Ls,Vs,Rl,Rv
real LV
LV = (Ls/Vs)*sqrt(Rl/Rv)
end function
[Fortran] 纯文本查看 复制代码
program ex_Ci
implicit none
real Ls,Ci,Vs,Rl,Rv,Ht,hli,st,H0,LV
real :: h0_f , lv_f
real,intrinsic::log
read(*,*) Ls,Vs,Rl,Rv,Ht,hli
h0 = h0_f( ht , hli )
Lv = Lv_f( Ls,Vs,Rl,Rv )
Ci = exp(-4.531+1.6562*(H0)+5.5496*(H0)**2-6.4695*(H0)**3+&
(-0.474675+0.079*(H0)-1.39*(H0)**2+1.3212*(H0)**3)*log(LV)&
+(-0.07291+0.088307*(H0)-0.49123*(H0)**2+0.43196*(H0)**3)*&
(log(LV))**2)
print *,"标准系数Ci:",Ci
end program
function H0_f(Ht,hli)
implicit none
real Ht,hli
real H0_f
H0_f=Ht-hli
end function H0_f
function LV_f(Ls,Vs,Rl,Rv)
implicit none
real Ls,Vs,Rl,Rv
real LV_f
LV_f = (Ls/Vs)*sqrt(Rl/Rv)
end function LV_f