void changguifa(float n[N]) /* 常规法 */
{int i;
for (i=0;i<N;i++)
{r[i] =1.0*fw[i]+r0*(1-fw[i]);
H[i] =Hd[i]+102*(pt[i]-pc[i])/r[i];
n[i]=qc[i]*H[i]/8812.8/Nd[i];
}
}
void gaijinfa(float n1[N]) /* 改进算法 */
{int i;
for(i=0;i<N;i++)
for(i=0;i<N;i++)
{ r[i]=1.0*fw[i]+r0*(1-fw[i]);
Ng[i]=A[i]*sd[i]*fd[i]*cn[i]/60;
Hz[i]=Hp[i]+100*pt[i]/r[i];
Hs[i]=(Hp[i]-Hd[i])*(r0/r[i])+100*pc[i]/r[i]/10000;
n1[i]=Ng[i]/Nd[i]*Hz[i]*qc[i*86400)/(Ng[i]+Hs[i]*qc[i]*1000/102/86400);
}
}youerw.com
void nizipenjingfa(float n2[N]) /* 拟自喷井法 */
{int i;
float f[N],D1[N]; /*f需要计算*/
float Hn[N]; /* Hn-拟自喷井下有效的举液高度 */
for(i=0;i<N;i++)
{r[i]=fw[i]*1.0+(1-fw[i])*r0 ;
D1[i]=sqrt(D[i]*D[i]-d[i]*d[i]) / 100 ;
f[i]=(qc[i]/(10390.8*D1[i]*D1[i]*D1[i]*D1[i])) *r[i];
Hn[i]=L[i]-(L[i]-Hd[i])*(r0/(r[i]+f[i]))+102*(pt[i]-pc[i])/(r[i]+f[i]) ;
n2[i]=9.8*qc[i]*Hn[i]/Nd[i]/86400;
}
}
void nengliangfenxifa(float n3[N]) /*能量分析法*/
{int i;
float E[N]={0};
for(i=0;i<N;i++)
{r[i]=1.0*fw[i]+0.86*(1-fw[i]);
youerw.com
void ceshifa(float n4[N]) /*测试法*/
{int i;
for(i=0;i<N;i++)
{ r[i]=fw[i]*1.0+(1-fw[i])*r0 ;
H1[i]=Hd[i]+1000*(pt[i]-pc[i])/r[i]/9.8;
n4[i]=H1[i]*qc[i]*r[i]*9.8/Nd[i]/86400;
}
}
main()
{int i;
FILE *fp;
float n[N];
float n1[N];
float n2[N];
float n3[N];
float n4[N] ;
changguifa(n) ;
gaijinfa(n1) ;
nizipenjingfa(n2) ;
nengliangfenxifa(n3) ;
ceshifa(n4);
fp=fopen("e:\\shuiqu.txt","wt");
if(fp==NULL) printf("open error");
for(i=0;i<N;i++)
{fprintf(fp,"n[%d]=%f ",i,n[i]);
fprintf(fp,"n1[%d]=%f ",i,n1[i]);
fprintf(fp,"n2[%d]=%f ",i,n2[i]);
fprintf(fp,"n3[%d]=%f ",i,n3[i]);
fprintf(fp,"n4[%d]=%f ",i,n4[i]);
fprintf(fp,"\n"); }
fclose(fp);
}