用1stOpt很方便啊,假如 m=1,t1=2,t2=3,d=4
代码:
Constant m=1,t1=2,t2=3,d=4;
Constant
A=pi*d^2/4,
G=m/A,
x1=0,
vf1=1*10^-8*t1^2+2^-6*t1+0.0008,
vf2=1*10^-8*t2^2+2^-6*t2+0.0008,
vg1=3*10^-5*t1^2-0.0023*t1+0.0705,
vg2=3*10^-5*t2^2-0.0023*t2+0.0705,
v1=vf1*(1-x1)+vg1*x1,
V1=G*v1,
hf1=0.0018*t1^2+1.3414*t1+199.97,
hf2=0.0018*t2^2+1.3414*t2+199.97,
hfg2=-0.0034*t2^2-0.7528*t2+198.85,
hg1=-0.0015*t1^2+0.5869*t1+398.84,
hg2=-0.0015*t2^2+0.5869*t2+398.84,
h1=hf1*(1-x1)+hg1*x1;
Function vfg2-vf2*(1-x2)+hg2*x2;
1000*hf2+1000*hfg2*x2+(G^2*(vf2+vfg2*x2)^2)/2-1000*h1+V1^2/2;
结果:
vfg2 = 2.80008954480262
x2 = -0.00687013194790977 |