model vap ! Test vaporiser model parameter Tb = 360 ; ! 1 atm boiling point of material Cp = 100 ; ! molar hear capacity lambda = 360*92 ; ! Molar latent heat by Troutons Rule kv = 0.1 ; ! outlet vapour valve constant ! Feed information: F = 1 ; ! flowrate Tf = 300 ; ! temperature ! Heat input to boiler Q = 1000 end parameter variable M, V, U, hv P, T end variable equation ! Balance equations .M = F - V ; ! mass balance .U = F*Tf*Cp - V*hv + Q ; ! heat balance ! rate equation V = kv*(P-1.0) ; ! outflow vapour rate ! equations of state P = @exp(10*(1-Tb/T)) ; ! vapour pressure gives pressure in vessel T = U/M/Cp hv = Cp*T+lambda end equation initial M = 2 U = 370*2*100 ; ! Temperature in boiler is initially 370K end initial schedule deltat = 0.1 steps = 100 end end model