CBE 291b - Computation And Optimization For Engineers

Similar documents
NUMERICAL INTEGRATION. The inverse process to differentiation in calculus is integration. Mathematically, integration is represented by.

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives

Ordinary Differential Equations- Boundary Value Problem

State space systems analysis (continued) Stability. A. Definitions A system is said to be Asymptotically Stable (AS) when it satisfies

A-Level Mathematics Transition Task (compulsory for all maths students and all further maths student)

PART 1 MULTIPLE CHOICE Circle the appropriate response to each of the questions below. Each question has a value of 1 point.

ARITHMETIC OPERATIONS. The real numbers have the following properties: a b c ab ac

UNIT 1 FUNCTIONS AND THEIR INVERSES Lesson 1.4: Logarithmic Functions as Inverses Instruction

Review of Calculus, cont d

Pre-Session Review. Part 1: Basic Algebra; Linear Functions and Graphs

Unit #9 : Definite Integral Properties; Fundamental Theorem of Calculus

Math& 152 Section Integration by Parts

13: Diffusion in 2 Energy Groups

SUMMER KNOWHOW STUDY AND LEARNING CENTRE

Improper Integrals, and Differential Equations

Math 113 Exam 1-Review

Consequently, the temperature must be the same at each point in the cross section at x. Let:

HW3, Math 307. CSUF. Spring 2007.

Chapter 3 Solving Nonlinear Equations

20 MATHEMATICS POLYNOMIALS

Operations with Polynomials

Math 113 Exam 2 Practice

P 3 (x) = f(0) + f (0)x + f (0) 2. x 2 + f (0) . In the problem set, you are asked to show, in general, the n th order term is a n = f (n) (0)

A REVIEW OF CALCULUS CONCEPTS FOR JDEP 384H. Thomas Shores Department of Mathematics University of Nebraska Spring 2007

Scientific notation is a way of expressing really big numbers or really small numbers.

Numerical integration

Numerical Integration

Conservation Law. Chapter Goal. 5.2 Theory

DIRECT CURRENT CIRCUITS

A. Limits - L Hopital s Rule ( ) How to find it: Try and find limits by traditional methods (plugging in). If you get 0 0 or!!, apply C.! 1 6 C.

Lecture 14: Quadrature

Department of Chemical Engineering ChE-101: Approaches to Chemical Engineering Problem Solving MATLAB Tutorial VII

Math 1B, lecture 4: Error bounds for numerical methods

SOLUTIONS FOR ADMISSIONS TEST IN MATHEMATICS, COMPUTER SCIENCE AND JOINT SCHOOLS WEDNESDAY 5 NOVEMBER 2014

Algebra Readiness PLACEMENT 1 Fraction Basics 2 Percent Basics 3. Algebra Basics 9. CRS Algebra 1

Polynomials and Division Theory

How can we approximate the area of a region in the plane? What is an interpretation of the area under the graph of a velocity function?

Math 31S. Rumbos Fall Solutions to Assignment #16

The Regulated and Riemann Integrals

The Wave Equation I. MA 436 Kurt Bryan

Lesson 1: Quadratic Equations

New Expansion and Infinite Series

First Law of Thermodynamics. Control Mass (Closed System) Conservation of Mass. Conservation of Energy

Predict Global Earth Temperature using Linier Regression

Math 8 Winter 2015 Applications of Integration

7.2 The Definite Integral

Monte Carlo method in solving numerical integration and differential equation

Improper Integrals. Type I Improper Integrals How do we evaluate an integral such as

Exam 2, Mathematics 4701, Section ETY6 6:05 pm 7:40 pm, March 31, 2016, IH-1105 Instructor: Attila Máté 1

#6A&B Magnetic Field Mapping

Consolidation Worksheet

2008 Mathematical Methods (CAS) GA 3: Examination 2

( ) as a fraction. Determine location of the highest

MATH SS124 Sec 39 Concepts summary with examples

3.4 Numerical integration

AB Calculus Review Sheet

( ) where f ( x ) is a. AB Calculus Exam Review Sheet. A. Precalculus Type problems. Find the zeros of f ( x).

CHAPTER 4a. ROOTS OF EQUATIONS

We know that if f is a continuous nonnegative function on the interval [a, b], then b

Fig. 1. Open-Loop and Closed-Loop Systems with Plant Variations

Quantum Physics II (8.05) Fall 2013 Assignment 2

Chapter 7 Notes, Stewart 8e. 7.1 Integration by Parts Trigonometric Integrals Evaluating sin m x cos n (x) dx...

A. Limits - L Hopital s Rule. x c. x c. f x. g x. x c 0 6 = 1 6. D. -1 E. nonexistent. ln ( x 1 ) 1 x 2 1. ( x 2 1) 2. 2x x 1.

III. Lecture on Numerical Integration. File faclib/dattab/lecture-notes/numerical-inter03.tex /by EC, 3/14/2008 at 15:11, version 9

Math 520 Final Exam Topic Outline Sections 1 3 (Xiao/Dumas/Liaw) Spring 2008

Jim Lambers MAT 169 Fall Semester Lecture 4 Notes

Orthogonal Polynomials

NUMERICAL INTEGRATION

Review of basic calculus

Calculus - Activity 1 Rate of change of a function at a point.

We divide the interval [a, b] into subintervals of equal length x = b a n

MATH 144: Business Calculus Final Review

Goals: Determine how to calculate the area described by a function. Define the definite integral. Explore the relationship between the definite

1. Weak acids. For a weak acid HA, there is less than 100% dissociation to ions. The B-L equilibrium is:

1.1. Linear Constant Coefficient Equations. Remark: A differential equation is an equation

MIXED MODELS (Sections ) I) In the unrestricted model, interactions are treated as in the random effects model:

We partition C into n small arcs by forming a partition of [a, b] by picking s i as follows: a = s 0 < s 1 < < s n = b.

Ordinary differential equations

Math Calculus with Analytic Geometry II

Chapters 4 & 5 Integrals & Applications

x = b a N. (13-1) The set of points used to subdivide the range [a, b] (see Fig. 13.1) is

University of Washington Department of Chemistry Chemistry 453 Winter Quarter 2009

Chapter 1: Fundamentals

Riemann Integrals and the Fundamental Theorem of Calculus

13.4 Work done by Constant Forces

Section 6.1 INTRO to LAPLACE TRANSFORMS

( ) where f ( x ) is a. AB/BC Calculus Exam Review Sheet. A. Precalculus Type problems. Find the zeros of f ( x).

APPROXIMATE INTEGRATION

1.2. Linear Variable Coefficient Equations. y + b "! = a y + b " Remark: The case b = 0 and a non-constant can be solved with the same idea as above.

Precalculus Spring 2017

Best Approximation. Chapter The General Case

Module 6: LINEAR TRANSFORMATIONS

Duality # Second iteration for HW problem. Recall our LP example problem we have been working on, in equality form, is given below.

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?

Partial Derivatives. Limits. For a single variable function f (x), the limit lim

Review of Gaussian Quadrature method

1 Techniques of Integration

Chapter 4 Contravariance, Covariance, and Spacetime Diagrams

The use of a so called graphing calculator or programmable calculator is not permitted. Simple scientific calculators are allowed.

Purpose of the experiment

Transcription:

The University of Western Ontrio Fculty of Engineering Science Deprtment of Chemicl nd Biochemicl Engineering CBE 9b - Computtion And Optimiztion For Engineers Mtlb Project Introduction Prof. A. Jutn Jn 07 A unique set of rndom numbers will be supplied to ech student, b, c, d. These numbers will form the bsis of your project. Mny problems nd progrms tht you re required to complete will be bsed on these numbers. 6.b mens tke b (ignore sign) shift deciml left dd it to 6, etc. For exmple, if b = -4.63, then 6.b = 6.463 A comprehensive report in MS Word complete with Mtlb progrms, output, grphs nd solutions is due two weeks before the finl exms. Erlier prt submission my lso be required. A 5% levy per dy will pply to lte submission. Extr mrks will be wrded for nlysis nd discussion of your results nd detiled comments on progrm lines. DO NOT INCLUDE long tbles of numericl dt in your project submission. Lbeled grphs must be used to show ll dt. Avoid submitting nswers without explntion or nlysis. Show ll fully documented progrms nd Mtlb commnds to ccomplish ll steps.. Generte tble of conversions from vrible T formed using the : opertor which strts with nd increses by, then stops t 0. The tble should look like this. The fctor in brckets re used to convert T to other units. T T (/b) T (c/d)... 0. Form mtrix of the form below, where (elements) re numbers from the mgic commnd. Do not insert, b, c, d one t time. First form vector v = [, b, c, d., b, c, d] nd insert whole vector.

A = b c d [elements] [elements] b c d b c d Clculte the squre of ll the elements round the perimeter of the mtrix(squre first, then Sum). Use Mtlb commnds sum to ccomplish this. Use mtrix extrction commnds to pick up whole rows nd columns. e.g. top row = A(, :) 3. Write for loop to clculte vector nmed S which contins the sum of the min digonl of A, nd every digonl sum bove the min (\). Hint: use dig nd sum. Crete new mtrix clled B by removing the first nd the lst 3 columns of A. b. Using the commnds find nd ==, locte ll occurrences of b in mtrix B. Using single commnd, replce ll vlues of b with c*b. c. Crete plot using vector S for the x-xis dt nd the first column of mtrix B for the y-xis dt. Sort the dt in scending order before you plot. Lbel both xes.

4. Pump flow dt F cn be generted from the dt for qudrtic eqution F = x + bx + c. Where x is the vlve opening (use rnge of x from : 0. : 0). Use polyfit to re-estimte the pump curve coefficients ^ ^ ^, b, c nd compre to originl vlues. Add some noise to the dt using F = F + n* rndn (size (y)). Do this for low noise n =. Refit the dt nd compre chnge in fitted vlues, b, c. Repet for n = 0. Comment on effect of noise. Plot ll three curves using different symbols on the sme grph. Use legend to distinguish them. Repet the plot using the subplot commnd with three seprte plots. 5. Given the polynomil: f(x) =.cx 5 + x 4 + bx 3 + cx + 5.cx + 4 Find numericlly ll of the roots of f(x).. Confirm the roots by plotting f(x) over n pproprite rnge of x. b. How mny extremum (mx or min) points does f(x) hve? c. Find the vlues of x tht correspond to these extremum points. d. Find the extremum vlues of f(x). e. Confirm your nswers in questions c. nd d. grphiclly. Useful commnds: polyvl, polyder, roots subplot grid hold xis. 6. Bckground. Het clcultions re employed routinely in chemicl nd petroleum engineering s well s in mny other fields of engineering. This ppliction provides simple but useful exmple of such computtions. One problem tht is often encountered is the determintion of the quntity of het required to rise the temperture of mteril. The chrcteristic tht is needed to crry out this computtion is the het cpcity c. This prmeter represents the quntity of het required to

rise unit mss by unit temperture. If c is constnt over the rnge of tempertures being exmined, the required het ΔH (in clories) cn be clculted by ΔH = mc ΔT (4.) where c hs units of cl/(g. C), m = mss (g), nd ΔT = chnge in temperture ( C). For exmple, the mount of het required to rise 0 g of wter from 5 to 0 C is equl to ΔH = 0() (0-5) = 00 cl where the het cpcity of wter is pproximtely cl/ (g. C). Such computtion is dequte when ΔT is smll. However, for lrge rnge of temperture, the het cpcity is not constnt nd, in fct, vries s function of temperture. The het cpcity of your mteril increses with temperture ccording to the reltionship. c(t) =.c + b x 0-4 T +. x 0-7 T 3 (4.) In this instnce you re sked to compute the het required to rise 000 g of this mteril from 00 to 00 C. Solution: We cn clculte the verge vlue of c(t): _ c ( T ) T c( T ) dt T = T T (4.3) which cn be substituted into Eq. (4.) to yield ΔH = m T T c( T ) dt (4.4) where ΔT = T T. Now becuse, for the present cse, c(t) is simple polynomil, ΔH cn be determined nlyticlly. Plot c vs. T nd clculte ΔH nlyticlly for your mteril nd then clculte it numericlly using qud. Compre the two results. 7. The following dt hve been collected from btch rector: x Y 0.4 0.36 30.66 40 3. 50 8.8

djust y to give y = Y + 0.b where 0.b mens tke your number b nd shift the deciml to the left side (ignoring sign). Which of the following three models best represent the reltionship between y nd x? To nswer this you cn plot ech cse nd compre visully. You cn lso supplement this with comprison of the lest squres for the residuls eg sum(ydt-ymodel)^. For ) below you cn use logs to convert the equtions to stright line form..) y = e β x + β y = e β + β x + β x^ y = αx β b.) y = α x β /( + x α ) use lsqcurvefit for this cse. Why is this necessry? 8. A rector converts n orgnic compound to product P by heting the mteril in the presence of n dditive A. The dditive cn be injected into the rector, while stem cn be injected into heting coil inside the rector to provide het. Some conversion cn be obtined by heting without ddition of A, nd vice vers.. In order to predict the yield of P, Y p (lb mole product per lb mole feed), s function of the mole frction of A, X A, nd the stem ddition S (in lb/lb mole feed), the following dt hve been obtined. Y p X A S 0. 0.3 0 0.3 0 35 0.5 0 65 0.b 0.4 9. Fit liner model Y P = c o + c X A + c S Tht provides lest squres fit to the dt b. If we require tht the model lwys must fit the point Y P = 0 for X A = S = 0 obtin c 0, c, c, so tht lest-squres fit is obtined.

9. The conservtion of het cn be used to develop het blnce for long, thin rod (Fig. 3). If the rod is not insulted long its length (x) nd the system is t stedy stte, the differentil eqution (DE) tht results is d T + h ( T T) = 0 Where h is het trnsfer coefficient (cm - ) tht prmeterizes the rte of het dissiption to the surrounding ir nd T is the temperture of the surrounding ir ( C). Becuse this is second order DE, two boundry conditions (BC's) re required. These re initil vlue (x = 0) BC's nd re given s dt T (0) = 40. b C nd (0) = 0 C / cm The vlues of the other prmeters re h = b cm T = c C 0.0, 0.. Write Mtlb min (script) progrm nd function using ode45 to integrte this eqution. Wht is the vlue of the temperture T t distnce 0 cm long the rod, i.e. T (0). plot T vs. x (show xis scles nd intercepts). b. nother wy of giving BC's for similr problem is clled Boundry Vlue problem. For this second cse we give the BC's t two seprte vlues of x. ( ) T 0 = 40. b C nd T(0) = 00. c C In order to solve this problem using ode45 with these BC's, guess for the initil derivtive dt ( 0) must first be mde, followed by n integrtion to x = 0. Then compre the result to the required T (0) nd guess gin. One cn use liner interpoltion (interp.m) to find suitble vlue of ( 0) the correct T (0). dt which gives

Write script file to perform these clcultions nd hence clculte the correct vlue of dt ( 0) (to 4 decimls) which gives the correct BC t x = 0 cm. i.e. T(0) = 00.c C. 0. A simple biorector model (ssuming stedy-stte opertion) is μmx x 0 = D x k m x kx + + s x D C k μ + x x + k x x m mx 0 = ( ) f where μ mx = 0.5b k m = 0. k = 0.4545 C = 0.4 s f = 4.c (use your personl c) x is the biomss concentrtion (mss of cells) nd x is the substrte concentrtion (food source for the cells). Find the stedy-stte vlues for x nd x if D = 0.3 (There my be up to three solutions, depending on your set of numbers, but you my find less ).. Use fsolve nd severl initil guesses for the solution vector. b. Check these vlues by substitution into the originl equtions c. Assume x is not zero in the first eqution, solve for D nd substitute for it in the second eqution. Then multiply out by hnd to form polynomil, substitute the (non zero) vlue for x found in prt., then use roots to solve for x nd compre this nswer to tht obtined in prt. Note fsolve cnnot find solutions tht re complex ( it cuts of complex prt), wheres roots cn. Downlod the document: StirredTnks.pdf from my home pge under mfiles/9. Set up the solution to these equtions using Simulink using your own choice of prmeters. Plot the motion of the concentrtion in both tnks in response to step chnge in the flow dye into the first tnk. Does the concentrtion response you obtin for the tnks mke sense to you?

Support this by discussion of your results using bsic engineering common sense. Explin your Simulink block digrm nd your results.