您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 综合/其它 > 流体力学简单计算MATLAB程式
用matlab进行编程计算第一问:z=30;p1=50*9.8*10^4;p2=2*9.8*10^4;jdc=0.00015;gama=9800;d=0.257;L=50000;mu=6*10^(-6);hf=z+(p1-p2)/(0.86*gama)xdc=2*jdc/d;beta=4.15;m=1;Q=(hf*d^(5-m)/(beta*mu^m*L))^(1/(2-m));v=4*Q/(pi*d^2);Re=v*d/mu;Re1=59.7/xdc^(8*xdc/7);Re2=(665-765*log(xdc))/xdc;i=hf/L;ifRe3000Q=Q;elseif3000ReRe1m=0.25;beta=0.0246;Q=(hf*d^(5-m)/(beta*mu^m*L))^(1/(2-m));v=4*Q/(pi*d^2);Re=v*d/mu;elseifRe1ReRe2m=0.123;A=10^(0.127*log(jdc/d)-0.627);beta=0.0802*A;Q=(hf*d^(5-m)/(beta*mu^m*L))^(1/(2-m));v=4*Q/(pi*d^2);Re=v*d/mu;elsem=0;langda=1/(2*log(3.7*d/jdc))^2;beta=0.0816*langda;Q=(hf*d^(5-m)/(beta*mu^m*L))^(1/(2-m));v=4*Q/(pi*d^2);Re=v*d/mu;endiQRevhf=588.1395i=0.0118Q=0.0915Re=7.5526e+004v=1.7632利用IF语句对四种流态一一进行试算,最终的结果水力损失为588.1395m,水力坡降0.0118第二问:将其中10km换成直径305mm的管子z=30;p1=50*9.8*10^4;p2=2*9.8*10^4;jdc=0.00015;gama=9800;mu=6*10^(-6);d=[0.2570.305];L=[4000010000];x=zeros(4,1);Q1=0.0915;hf=z+(p1-p2)/(0.86*gama);xdc=2*jdc./d;beta=4.15;m=1;Q=(hf/(beta*mu^m*(L(1)/d(1)^(5-m)+L(2)/d(2)^(5-m))))^(1/(2-m));v(1)=4*Q/(pi*d(1)^2);v(2)=4*Q/(pi*d(2)^2);Re(1)=v(1)*d(1)/mu;Re(2)=v(2)*d(2)/mu;Re1(1)=59.7/xdc(1)^(8/7);Re1(2)=59.7/xdc(2)^(8/7);Re2(1)=(665-765*log(xdc(1)))/xdc(1);Re2(2)=(665-765*log(xdc(2)))/xdc(2);ifRe(1)3000&Re(2)3000Q=Q;elseif3000Re(1)Re1&3000Re(2)Re1m=0.25;beta=0.0246;Q=(hf/(beta*mu^m*(L(1)/d(1)^(5-m)+L(2)/d(2)^(5-m))))^(1/(2-m));v(1)=4*Q/(pi*d(1)^2);v(2)=4*Q/(pi*d(2)^2);Re(1)=v(1)*d(1)/mu;Re(2)=v(2)*d(2)/mu;elseifRe1Re(1)Re2&Re1Re(2)Re2m=0.123;A=10^(0.127*log(jdc/d)-0.627);beta=0.0802*A;Q=(hf/(beta*mu^m*(L(1)/d(1)^(5-m)+L(2)/d(2)^(5-m))))^(1/(2-m));v(1)=4*Q/(pi*d(1)^2);v(2)=4*Q/(pi*d(2)^2);Re(1)=v(1)*d(1)/mu;Re(2)=v(2)*d(2)/mu;elsem=0;langda=1/(2*log(3.7*d/jdc))^2;beta=0.0816*langda;Q=(hf/(beta*mu^m*(L(1)/d(1)^(5-m)+L(2)/d(2)^(5-m))))^(1/(2-m));v(1)=4*Q/(pi*d(1)^2);v(2)=4*Q/(pi*d(2)^2);Re(1)=v(1)*d(1)/mu;Re(2)=v(2)*d(2)/mu;endQRevq=Q-Q1baifenbi=q/Q1Q=0.0978Re=1.0e+004*8.07956.8080v=1.88631.3393q=0.0063baifenbi=0.0694先假设流态均为层流,再进行试算,最终可得输量可提高6.94个百分点
本文标题:流体力学简单计算MATLAB程式
链接地址:https://www.777doc.com/doc-5575335 .html