27.07.2013 Views

Design og modellering af metanolanlæg til VEnzin-visionen Bilag

Design og modellering af metanolanlæg til VEnzin-visionen Bilag

Design og modellering af metanolanlæg til VEnzin-visionen Bilag

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

methanol.for<br />

d:/DTU/Eksamensprojekt/bilag/<br />

subroutine METTAB(P,h,t,v,s,X,u,IN1,IN2,EPSVA,IVMAX,fiter,fiter0)<br />

implicit none<br />

integer in1,in2,IVMAX,error,i,in(2),KODE,IMAX,k,file_size,rec_nr<br />

double precision p,h,t,v,s,x,u,T_ref,rho,rho_ref,omega,tau,EPSVA<br />

$ ,omega_g,omega_l,M,rho_start,T_start,f(2),par_file(7,100)<br />

$ ,value_old,value,EPSV,R,P_c,T_c,s_ref,h_formation,rho_star<br />

$ ,T_0C,x_start<br />

l<strong>og</strong>ical fiter,fiter0,fiters,exist_file,equal,iterate_rho_l,con<br />

common/constants/EPSV,R,P_c,T_c,T_ref,rho_ref,rho_star,M,T_0C,IMAX<br />

$ ,fiters<br />

common/switches/iterate_rho_l<br />

CHARACTER filename*20<br />

R=8.31448d0<br />

s_ref=239.81d0<br />

c J/(K*mol)<br />

P_c=8.1035d0<br />

c MPa<br />

T_c=512.60d0<br />

T_ref=513.380d0<br />

T_0C=273.15d0<br />

c K<br />

rho_ref=0.00878517d0<br />

rho_star=0.00871d0<br />

c mol/cm^3<br />

M=0.03204216d0<br />

c kg/mol<br />

h_formation=−2.013d5<br />

c J/mol<br />

fiters=fiter<br />

EPSV=EPSVA<br />

IMAX=IVMAX<br />

error=0<br />

file_size=40<br />

i=1<br />

if ((in1.eq.1).or.(in2.eq.1)) then<br />

f(i)=p<br />

in(i)=1<br />

i=i+1<br />

p=1.d5*p<br />

endif<br />

if ((in1.eq.2).or.(in2.eq.2)) then<br />

if (abs(h).lt.0.01) h=0.01d0<br />

f(i)=h<br />

in(i)=2<br />

i=i+1<br />

h=1.d3*h*M−h_formation<br />

endif<br />

if ((in1.eq.3).or.(in2.eq.3)) then<br />

f(i)=t<br />

in(i)=3<br />

i=i+1<br />

T=t+T_0C<br />

tau=T_ref/T<br />

endif<br />

if ((in1.eq.4).or.(in2.eq.4)) then<br />

f(i)=v<br />

in(i)=4<br />

i=i+1<br />

rho=1/(v*M)*1.d−6<br />

endif<br />

if ((in1.eq.5).or.(in2.eq.5)) then<br />

if (abs(s).lt.0.001) s=0.001d0<br />

f(i)=s<br />

in(i)=5<br />

i=i+1<br />

s=1.d3*s*M−s_ref<br />

endif<br />

if ((in1.eq.6).or.(in2.eq.6)) then<br />

if (abs(x).lt.1.d−7) x=1.d−7<br />

f(i)=x<br />

in(i)=6<br />

i=i+1<br />

endif<br />

if ((in1.eq.7).or.(in2.eq.7)) then<br />

if (abs(u).lt.0.01) u=0.01d0<br />

f(i)=u<br />

in(i)=7<br />

1/19<br />

19−03−2007

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!