Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
8 views

Assignment 7

Uploaded by

mohityadaviitb
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Assignment 7

Uploaded by

mohityadaviitb
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

CL 249 Computational Methods Lab

Assignment 7

Q1. A system of reactors is given below whose dynamics need to be simulated. The mass balance for
the first reactor can be written as:

d c1
V1 =Q01 c 01 +Q31 c 3 − Q12 c 1 −Q15 c1
dt
or, after substituting of parameters:

d c1
=− 0.12 c1 +0.02 c 3 +1
dt

Similarly write the mass balance for the remaining four reactors and then using fourth-order RK
method, compute the dynamic response of the network of reactors (that is plot the concentration in
the reactors as a function of time).

V1 = 50 m3, V2 = 20 m3, V3 = 40 m3, V4 = 80 m3, and V5 = 100 m3. Assume that at t=0 all the
concentrations in the reactors are at zero. Use h = 0.1.

(Please write down the values obtained for the first two iterations on the paper provided.)

Q2. A python code to solve the following second order differential equations for a damped harmonic
oscillator using Heun’s predictor corrector method is given:
2
d y dy
2 +2 β +ɷ 02 y = A cos(ɷt)
dt dt

where β=0.1, ɷ0=1.0, A=1.0, ɷ=0.5 and

at t=0, y=0 and v=0.


However some part of the code is missing, which you are supposed to write. Please fill the missing
part of the code and submit the python script.

You might also like