Big Chemical Encyclopedia

Chemical substances, components, reactions, process design ...

Articles Figures Tables About

MATLAB Codes

Initially, we develop Matlab code and Excel spreadsheets for relatively simple systems that have explicit analytical solutions. The main thrust of this chapter is the development of a toolbox of methods for modelling equilibrium and kinetic systems of any complexity. The computations are all iterative processes where, starting from initial guesses, the algorithms converge toward the correct solutions. Computations of this nature are beyond the limits of straightforward Excel calculations. Matlab, on the other hand, is ideally suited for these tasks, as most of them can be formulated as matrix operations. Many readers will be surprised at the simplicity and compactness of well-written Matlab functions that resolve equilibrium systems of any complexity. [Pg.32]

Modelling and visualisation of a reaction A —-—> B require only a few lines of Matlab code. A plot of the concentration profiles is given in Figure 3-28. This task can be performed equally well in Excel. [Pg.78]

The organisation of the Matlab ODE solvers requires some explanation. For this example, the core is a function, ode autocat.m, that returns the derivatives of the concentrations at any particular time or better, for any set of concentration of the reacting species. Essentially it is the Matlab code for equation (3.83). [Pg.87]

Defying Matlab elegance, one could write equation (4.46) as a loop, but it is certainly faster to vectorise the equation. The vectorised Matlab code (note that the polynomial degree equals the number of parameters minus one, nd=np-1) ... [Pg.137]

In order to solve chemical/biological problems of differing levels we rely throughout on well tested numerical procedures for which we include MATLAB codes and test files. Moreover, a large part of this book is dedicated to explain the workings of our algorithms on an intuitive level and thereby we give a valuable introduction to the world of scientific computation and numerical analysis. [Pg.4]

Starting with Chapter 3, many relevant chemical/biological engineering problems are solved explicitly in the text. Each section of Chapters 3 to 7 contains its own unsolved exercises and each chapter contains further problems for the whole chapter at its end. Students should first try to solve the worked examples inside each section on their own, with models of their own making and personally developed MATLAB codes for their solution. Then they should compare their results with those offered in the book. And finally they should try to tackle the unsolved section and chapter problems from the experience that they have gained. [Pg.6]

In Section 3.4 we study several systems that have no multiple steady states and we introduce several transcendental and algebraic equations of chemical and biological engineering import. As always, the students and readers should find their own MATLAB codes for the various problems first before relying on those that are supplied and before solving the included exercises. [Pg.7]

Chapter 4.1 deals with an important industrial problem, the vapor-phase cracking of acetone. Here the material- and energy-balance design equations are developed. We advise the students to try and develop the design equations independently before consulting the book s derivations. Numerical solutions and MATLAB codes are developed and explained for this problem and sample results are given that need to be checked against those of the students codes. [Pg.8]

While many solved examples and complete MATLAB codes are given in the book and on the CD, the students should try to excel with his/her codes by personal initiative and by designing his/her own codes. These should be tested by solving the exercises at the end of the section. [Pg.9]

However, here we leave all numerical procedures and MATLAB coding as exercises to the students and readers. For each problem, all the necessary modeling and data is included, as well as samples of numerical results in the form of tables and graphs. Our readers should now be able to use the models and the given parameters to develop their own MATLAB codes along the lines of what has been practiced before. Then the students should be try to solve the exercises given at the end of each section and finally the general exercises at the end of the chapter. [Pg.9]

If an item is entered in MATLAB without a designation such as x =. .. and is not followed by a , such an item will always be designated as ans on screen. This is short for answer . Such an object will be stored as ans in the workspace. Note that the contents of ans is freely and frequently overwritten. Please compare with the on-screen output of the first four size and length commands above that are comma delimited. If an item is named in MATLAB code, such as A, B, or result above are, it will carry that name throughout the computations (until reassigned) and be displayed on screen only if followed by a, or by a blank. [Pg.15]

The latter command will give the answer as 6.2832 in format short g, while the screen output will be 6.283185307179586e+00 in format long e. Powers of the base 10 are always displayed in MATLAB via the e-extension as be a in format e. Thus 400 = 4e+02 and 1/1000 = le-03 in MATLAB s exponential output and screen display. Format statements can be entered at any prompt such as format short, or inside MATLAB code where desired. Commanding format toggles the output format back to the previous format setting. [Pg.18]

In this book we shall use MATLAB codes and explain more involved features of MAT-LAB as we encounter them. MATLAB has a built-in help menu typing help format at the prompt, or help, for example, will show the syntax and variations of these two commands format and backslash . Whenever a student encounters a MATLAB command that is not self explanatory, we suggest using this built-in help function of MATLAB. [Pg.19]

Only the earlier mentioned faster 0(n2) polynomial-root finder pzero discovers the ninefold real root 2 of p correctly see the Resources appendix for a quote of the literature for pzero and the folder pzero on our CD for the actual MATLAB code of pzero. [Pg.32]

The bvp4c MATLAB code can deal with singular ODEs and we shall explain its use and the necessary preparations in Chapter 5. In fact there we show how to modify the inner workings of the built-in MATLAB BVP code bvp4c so that it does not stop when an intermediate Newton iteration encounters a singular or near singular Jacobian matrix, but rather continues with the least squares solution. The modifications to bvp4c will be explained when there is need in Chapter 5. [Pg.43]

The percentage sign makes all that follows on the same line into commentary to be skipped during execution of the file. See p. 232 for details on how to effectively (un)comment whole blocks of MATLAB code. [Pg.47]

The MATLAB codes printed in this book give our readers a varied and solid introduction into the above and many other built-in MATLAB functions, as well as into their functionality. [Pg.53]

The plot-generating MATLAB code for Figure 3.9 is as follows ... [Pg.85]

The current section has covered numerical techniques and MATLAB codes for investigating the static bifurcation behavior of nonadiabatic lumped systems. [Pg.115]

This equation poses no problem at all for MATLAB s root-finder fzero, since F s zeros are always simple and the graph of F intersects the horizontal axis sufficiently steeply. Here is our MATLAB code colebrookplotsolve.m, which adapts itself automatically... [Pg.122]

This MATLAB code takes up to 12 inputs, of which the first four, namely the system parameters qf, A, Tj, and Tf, need to be user-specified. Depending on the specific problem, the remaining eight parameters may or may not be specified. In some of our... [Pg.144]

The respective MATLAB codes for multiple A, Tj, and Tf value curves are all quite similar to the one given in qfrun.m above. Therefore we do not print these out here, but rather refer the user to the accompanying CD. [Pg.154]

Redraw Figure 4.8 for low values of A" such as A = 40, 20, and 10 until full conversion by using our MATLAB code Adprun.m from the CD. [Pg.154]

Figure 4.29 was obtained via the MATLAB code hetcontbifmultiK.m which we have derived from hetcontbif range. m. It features an auxiliary plot of the exponential curve to find the proper axes limits for the plot first. Note also the elaborate sequence of legend commands that we use. [Pg.194]

The commenting or uncommenting of MATLAB code line blocks can best be achieved from the MATLAB text editor window for an m file. Simply highlight a block of code lines via a mouse drag in the MATLAB text editor window, then click on the Text entry of the editor s toolbar and click Comment or Uncomment as appropriate. This action makes % commenting marks appear at or disappear from the front of each code line of the highlighted block. [Pg.232]

These assertions can be verified by our readers using the MATLAB code neurocycle. m. [Pg.244]

Modify the program neurocycle. m to become neurocycleB2.m with the first MATLAB code line function neurocycleB2(B2,Tend,yO,S). [Pg.249]

I.e., (5.45) and (5.46) describe an IVP which we can easily solve in MATLAB. For this we introduce the following MATLAB code that is built exactly as our IVP solvers of Chapter 4. [Pg.293]

We have implemented the 4 dimensional first-order singular BVP system (5.71) in the MATLAB code pellet4etarunfwd.m. [Pg.315]

Develop the model equations and MATLAB code for solving the problem of a packed bed reactor which is packed with porous catalyst pellets that catalyze a first-order exothermic reaction with 2 = 1.8, 7 = 1.1, and (3 = 1.1. Use a dimensionless feed concentration and reactor length, as well as Sh = 250.0 and Nu = 10.0. [Pg.324]

The MATLAB code linearnoneqicol.m implements and solves the two linear equations... [Pg.369]

The following MATLAB code quadnonequicol.m performs these steps naively without implementing the above labor reducing operations. We leave this modification to the... [Pg.377]

Here is our MATLAB code absorbtoweriterHt. m that solves the design problem numerically. [Pg.393]


See other pages where MATLAB Codes is mentioned: [Pg.168]    [Pg.3]    [Pg.6]    [Pg.9]    [Pg.20]    [Pg.100]    [Pg.160]    [Pg.165]    [Pg.272]    [Pg.280]    [Pg.284]    [Pg.298]    [Pg.304]    [Pg.360]    [Pg.382]   


SEARCH



Computer codes Matlab

Laminate MATLAB or Octave Code

MATLAB

© 2024 chempedia.info