This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Q=400 A=1200 deltat=0.5 t=0:deltat:5 t=0:.5:5 t=0:deltat:5 y=zeros(1,11) for i=1:10 y(i+1)=y(i)+dydt(t(i),Q,A).*deltat end plot(t,y) % We can actually turn this whole thing into a script by simply saving it as lesson.m and running it from the command line ChE 132B Numerical Methods in Chemical Engineering Fall 2005 Homework Assignment: Modify the program so that instead of a fixed coefficient for the input flowrate (the 3) it is actually a variable you can pass to the derivative function. Using a time step of 0.1 days, find the coefficient in the input flowrate that allows the system to remain neutral (i.e., it doesnt fill up or empty to infinity, but rather just oscillates between a minimum and a maximum). How tall of a tank do you need to order from a reputable vendor (in meters)?...
View Full Document
This note was uploaded on 12/29/2011 for the course CHE 132b taught by Professor Ceweb during the Fall '09 term at UCSB.
- Fall '09
- Chemical Engineering