![]() ![]() Import numpy as np from scipy import integrate from matplotlib.pylab import ( plot, grid, xlabel, ylabel, show, legend ) def PBR_model ( indep, depnt ): """ Dynamic balance for the packed bed reactor (PBR) demo problem class 05C indep: the independent ODE variable, such as time or length depnt: a vector of dependent variables X = depnt = the conversion y = depnt = the pressure ratio = P/P_0 = y Returns d(depnt)/d(indep) = a vector of ODEs """ # Assign some variables for convenience of notation X = depnt y = depnt # Constants FA0 = 0.1362 # kdash = 0.0074 # alpha = 0.0367 # eps = - 0.15 #Algebraic equations rAdash = - kdash * ( 1 - X ) / ( 1 + eps * X ) * y # Output from this ODE function must be a COLUMN vector, with n rows n = len ( depnt ) d_depnt_d_indep = np. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |