多相管流程序

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

附录2

Hagedorn-Brown方法求垂直管流压力的计算程序(VC)#include

#include

double p1,p2,ave_p,pc,ave_T,T_pc,T_pr,P_pr;

double A[16],x,u_g1,ug;

double rg = 0.576;

double z = 0.85;

double eg,e1;

double rw = 1.1926;

double qw;

double A1,d = 0.062;

double q_sc = 0.2315;

double Bg;

double v_sl,v_sg;

double Gm_A;

double N_gv,N_lv,N_l,N_D,a = 0.06;

double g = 9.81;

double ul = 0.0008;

double CN1 = 0.0019;

double result_7;

double Hl_q = 0.47;

double result_8;

double q = 1.00;

double result_9;

double e_m;

double v_m,u_m,R_em,e_ns;

double r1;

double f_m;

double dh,dp;

void get_sum1()

{

p1 = 10;

p2 = 45.26;

ave_p = (p1 + p2) / 2;

pc = 4.669;

P_pr = ave_p / pc;

ave_T = 60 + 273;

T_pc = 193.3;

T_pr = ave_T / T_pc;

printf("P_pr = %.2lf\tT_pr = %.2lf\n",P_pr,T_pr);

}

void get_sum2()

{

A[0] = -2.46211820;

A[1] = 2.97054714;

A[2] = -0.286264054;

A[3] = 0.00805420522;

A[4] = 2.80860949;

A[5] = -3.49803305;

A[6] = 0.360373020;

A[7] = -0.010*******;

A[8] = -0.793385684;

A[9] = 1.39643306;

A[10] = -0.149144925;

A[11] = 0.00441015512;

A[12] = 0.0839387178;

A[13] = -0.186408848;

A[14] = 0.020*******;

A[15] = 0.000609579263;

x = A[0] + A[1] * P_pr + A[2] * pow(P_pr,2) + A[3] * pow(P_pr,3) +T_pr*(A[4]+A[5]*P_pr + A[6] * pow(P_pr,2)+A[7] * pow(P_pr,3)) +pow(T_pr,2) *(A[8] + A[9] * P_pr + A[10] * pow(P_pr,2) + A[11] * pow(P_pr,3)) +pow(T_pr,3) * (A[12] + A[13] * P_pr + A[14] * pow(P_pr,2) + A[15] * pow(P_pr,3));

u_g1 = (17.09-2.062 * rg) / 100000 * (1.8 * ave_T + 32) + (8.188-6.15 * log10(rg)) / 1000;

ug = u_g1 * exp(x) / T_pr;

printf("ug = %lf\n",ug);

}

void get_eg()

{

eg = 3484.4 * rg * ave_p / (z * ave_T);

e1 = 1000 * rw;

A1 = 3.1415926 * pow(d,2) / 4;

qw = 140.449 / 86400;

v_sl = qw / A1;

printf("v_sl = %.3lf\n",v_sl);

Bg = 0.101 * ave_T / (293 * ave_p);

v_sg = q_sc * Bg / A1;

printf("v_sg = %.3lf\n",v_sg);

Gm_A = v_sl * e1 + v_sg * eg;

printf("Gm_A = %.3lf\n",Gm_A);

}

void get_sum5()

{

N_gv = v_sg * pow(e1 /(g * a),0.25);

printf("N_gv = %.3lf\n",N_gv);

N_lv = v_sl * pow(e1 /(g * a),0.25);

printf("N_lv = %.3lf\n",N_lv);

N_l = ul * pow(g / (e1 * a*a*a),0.25);

printf("N_l = %.3lf\n",N_l);

N_D = d * pow(e1 * g / a,0.5);

printf("N_D = %.3lf\n",N_D);

}

void get_sum7()

{

result_7 = N_lv * CN1 * pow(ave_p / 0.101,0.1) / (pow(N_gv,0.575) * N_D);

printf("result_7 = %lf\n",result_7);

}

void get_sum8()

{

result_8 = N_gv * pow(N_l,0.38) / pow(N_D,2.14);

printf("result_8 = %lf\n",result_8);

}

void get_sum9()

{

result_9 = Hl_q / q;

printf("result_9 = %lf\n",result_9);

}

void get_sum10()

{

e_m = e1 * result_9 + eg * (1 - result_9);

printf("e_m = %lf\n",e_m);

}

void get_sum11()

{

v_m = v_sg + v_sl;

printf("v_m = %lf\n",v_m);

r1 = v_sl / v_m;

相关文档
最新文档