HW 6
Problem 1
A continuous stirred tank reactor reacts chemical species A according to the following ODE:
$$\frac{dA}{dt} = \frac{A_{in}-A}{\tau} - kA^2.$$- Solve this equation using the explicit Euler method. Plot $A(t)$ out to $t=10$ if $A_{in}=1$, $A_0=0$, $\tau=2$, and $k=0.1$. Use $\Delta t=0.1$.
- What is the long-time (steady state) value of $A$ from your solution?
- In the above equation, set $dA/dt=0$ and solve for $A$. This is the analytic steady state value of $A$. How does it compare to the long-time solution from the ODE? Does this make sense? Why?
Problem 2
A $d_p=1$ mm diameter raindrop falls in still air at 300 K, 1 atm. The initial position and velocity of the drop are both 0. The drop’s velocity and position evolve according to the following 2 ODEs:
$$\frac{dv}{dt} = g - \frac{18\mu}{\rho_p d_p^2}v,$$$$\frac{dx}{dt} = v.$$
Here, $\mu$ is the viscosity of air, $\rho_p$ is the density of water, and $g$ is the gravitational constant.
- Review the notes if needed to get the Explicit Euler equations.
- Plot the velocity versus time and the position versus time on two separate plots. Label the axes as usual.
- Find the long-time velocity (called the terminal velocity) of the droplet.
- Also, find the distance the droplet falls before reaching 90% of this velocity.
Problem 3
A reaction among species $A$, $B$, and $C$ is written as
$$A \rightarrow B \rightarrow C.$$The first reaction has rate constant $k_1=2$ and the second reaction has rate constant $k_2=1.$
The ODEs for the concentrations of the three species are \begin{align} \frac{dA}{dt} &= -k_1A, \\ \frac{dB}{dt} &= k_1A - k_2B, \\ \frac{dC}{dt} &= k_2B. \end{align}
The initial concentrations are $A_0=1$, $B_0=C_0=0$.
On a single plot, show the concentrations of the three species to a time of 5 seconds. Use $\Delta t=0.1$. The plot should include x and y axis labels and a legend. Don’t include a chart title. Use straight lines connecting data points and no data markers.