Presentation is loading. Please wait.

Presentation is loading. Please wait.

Solving Engineering Problems by Using Computer A Case Study on Fed-Batch Bioreactor.

Similar presentations


Presentation on theme: "Solving Engineering Problems by Using Computer A Case Study on Fed-Batch Bioreactor."— Presentation transcript:

1 Solving Engineering Problems by Using Computer A Case Study on Fed-Batch Bioreactor

2 Fed-Batch Bioreactor (1) A fed-batch reactor is a reactor that initially runs as a batch reactor, with volume V 0. As the substrate level drops, cell growth rate and product formation rates decrease. A feed stream is introduced to input substrate and now it is maintained at low cell growth rate. As the feed stream ia introduced, the reactor volume changes from V 0 to V t with time.

3 Fed-Batch Reactor (2) Governing equations: Specific growth rate: Reactor volume: Biomass: Substrate: Product:

4 Fed-Batch Reactor (3) Governing equations (cont’) Feed rate: Feed substrate conc.:

5 Fed-Batch Reactor (4) Initial condition: Reactor volume: Biomass level: Substrate conc.: Product conc.:

6 How to Solve It? (1) This is a typical differential equation problem with initial value(s). We can solve it by using mathematical software packages, such as Polymath, etc. When using the above software packages, the only requirement is to input the governing equations and they can be solved using built-in functions.

7 How to Solve It? (2) Such differential equation problems are solved by using numerical integration. When a differential equation is difficult or impossible to solve analytically,use numerical integration to find approximate solutions.

8 How to Solve It? (3) There are many numerical integration methods, the simplest one is called Euler’s method. To integrate a differential equation from time t 0 to time t final, this time period is divided into many small steps: h. E.g. At t 0, x = x 0. At (t 0 + h), x = x 0 + (h x slope t=0 ) Repeat above steps until t = t final

9 How to Solve It? (4) E.g. Drops in reactant conc. Smaller h will have better approximation. But smaller h will need more computation time.

10 Using Polymath (1)

11 Using Polymath (2) Step functions could be done by using the IF-THEN-ELSE statement to change value of constants according to simulation time: F =IF ( time < 3.5 hr ) THEN ( F = 0 L/hr ) ELSE ( F = 0.1 L/hr )

12 Using Polymath (3) The multiple steps of feed substrate concentration could be done by using multiple IF-THEN-ELSE statements: S Feed =IF ( time < 3.5 hr ) THEN ( S Feed = 0 g/L ) ELSE (IF ( time < 5.5 hr ) THEN ( S Feed = 100 g/L ) ELSE (IF ( time < 7.5 hr ) THEN ( S Feed = 180 g/L ) ELSE (IF ( time < 9.5 hr ) THEN S Feed = 350 g/L ) ELSE ( S Feed = 600 g/L ) ) ) )

13 Using Polymath (4) Advantages: –Polymath already built-in numerical integration methods; –Users only need to input differential equations, etc. –Step functions could be input by using the IF... THEN... ELSE... statement provided by Polymath.

14 Using Polymath (5) Disadvantages: –Number of steps in step functions should be known before setting up the equations; –The numbers of IF-THEN-ELSE statements = number of steps - 1 –If user wants to add more steps, he / she needs to modify the IF- THEN-ELSE statement, i.e. no flexibility; –Complicated IF-THEN-ELSE statements are not easy to read when there are many steps. –Polymath has limitation on the number of equations in a problem, for differential equation problems (Polymath version 6.10): VersionEducationalProfessional Max. # of simultaneous differential equations30300 Max. # of simultaneous explicit equations40300 Max. # of intermediate data points1521200

15 Using Polymath (6)

16 Using Excel (1) It is possible to set up an Excel worksheet with numerical integration methods. E.g. Reactor volume with feed stream: StepTimeVolFeed 0t 0 = 0 V0V0 IF ( ( Time < 3.5 hr ), ( F = 0 ), ( F = 0.1 ) ) 1t 1 = t 0 + h V 1 = V 0 + F x h IF ( ( Time < 3.5 hr ), ( F = 0 ), ( F = 0.1 ) ) 2t 2 = t 1 + h V 2 = V 1 + F x h IF ( ( Time < 3.5 hr ), ( F = 0 ), ( F = 0.1 ) ) 3t 3 = t 2 + h V 3 = V 2 + F x h IF ( ( Time < 3.5 hr ), ( F = 0 ), ( F = 0.1 ) ) 4t 4 = t 3 + h V 4 = V 3 + F x h IF ( ( Time < 3.5 hr ), ( F = 0 ), ( F = 0.1 ) )

17 Using Excel (2) Costs: –Users need to set up their own numerical integration. Advantages: –Possible to perform numerical integration when no mathematical software package is available. Disadvantages: –The same style to input step functions as using Polymath, i.e. no flexibility.

18 Using Excel (3)

19 Using Excel VBA Programming (1) Numerical integration should be set up by user as VBA code. The program performs loops to estimate the solution until time > end time (t final ).

20 Using Excel VBA (2) Can include feed stream as a step function by using IF statement. But, how can we handle multiple steps in those step functions?

21 Using Excel VBA (3) An automatic feed data reading code is introduced; It is possible to handle any number of steps.

22 Using Excel VBA (4) Costs: –Users need to write their own VBA program code. Advantages: –It is more flexible and can handle various kinds of decisions. Disadvantages: –Need more time to set up the program; –Programming is not easy for novices.

23 Using Excel VBA (5)

24 When Do We Need to Write Our Own Program? For example: If it is needed to calculate the effect of various conditions, such as the case of 1 to many steps etc. If it is needed to evaluate different feed strategies.

25 Useful Reference M. Harris, SAMS Teach Yourself Microsoft Excel 2000 Programming in 21 Days, SAMS, 1999 –Although this book is not for the latest version, it is a good introductory book for Excel VBA programming.


Download ppt "Solving Engineering Problems by Using Computer A Case Study on Fed-Batch Bioreactor."

Similar presentations


Ads by Google