Che 314 Chemical Engineering Mathematics: Assignment 1 (8 Marks) Problem 1: (Marks 2)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

ChE 314 Chemical Engineering Mathematics

Assignment 1 (8 Marks)
Problem 1: (Marks 2)
Consider the initial value problem.

𝑑𝑦
= 𝑐𝑜𝑠(5𝜋 𝑡)
𝑑𝑡
𝑦(0) = 1

1. Determine approximate values of φ (t) at t = 0.2, 0.4, and 0.6 using the Euler method with
h = 0.2.
2. Determine the solution y = φ (t) and draw a graph of y = φ (t) for 0 ≤ t ≤ 1.
3. Use the Runge-Kutta method with h = 0.1. What is the difference in accuracy in Euler
and Runge Kutta Method

Problem 2: (Marks 3)

Consider the following chemical reaction:

A+B⟶C

The rate law for this reaction is given by the following equation:

Rate = 𝑘 ∗ [𝐴]2 ∗ [𝐵]

where [A] and [B] are the concentrations of species A and B, respectively, and k is the rate
constant.

Write a MATLAB code to solve the ODEs governing the concentration changes of A, B, and C
over time. Assume the initial concentrations of A, B, and C are [A] = 0, [B] = 0, and [C] = 0,
respectively. The rate constant k is known and given as a constant value.

1. Implement the necessary functions or scripts to define the ODE system and its
corresponding rate equations.
2. Set up the appropriate initial conditions and parameters.
3. Use a suitable numerical method to solve the ODEs and obtain the concentration profiles
of A, B, and C as functions of time.
4. Plot the concentration profiles of A, B, and C as a function of time on the same graph.
5. Comment on the behavior of the concentrations over time and the significance of the rate
constant.

Note: You may choose any suitable numerical method to solve the ODEs, such as the built-in
MATLAB functions like ode45 or ode15s, or you can implement your own numerical method if
desired.
In your solution, include the MATLAB code, the concentration profiles plot, and a brief
discussion of the results obtained.

Problem 3: (Marks 3)

Consider the following one-dimensional steady-state heat conduction problem in a rod:

𝑑2 𝑇
= −𝑄
𝑑𝑥 2

where 𝑇 is the temperature distribution along the rod, x is the spatial coordinate, and 𝑄 is a
constant heat source term. The rod is subject to the following boundary conditions:

T(0) = 𝑇0 (fixed temperature at x=0) 𝑇(𝐿) = 𝑇𝐿 (fixed temperature at x=L)

1. Implement a shooting method in MATLAB to solve this boundary value problem.


Assume that the rod has a length 𝐿 and the temperatures at the boundaries are fixed as 𝑇0
and 𝑇𝐿 , respectively.
2. Use a suitable root finding technique, such as the bisection method or Newton's method,
to determine the appropriate initial condition for the shooting method such that the
boundary condition at x=L is satisfied.
3. Consider different values of 𝑄, 𝐿, 𝑇0 , and 𝑇𝐿 in your problem setup. Run your MATLAB
code to obtain the temperature distribution T(x) for each set of parameters.
4. Plot the temperature distribution T(x) along the rod for each case, showing the variation
of temperature with respect to the spatial coordinate x.
5. Analyze and discuss the influence of the different parameters (𝑄, 𝐿, 𝑇0 , 𝑇𝐿 ) on the
temperature distribution and the choice of the initial condition for the shooting method.

In your solution, include the MATLAB code for the shooting method and root finding technique,
the temperature distribution plots for different parameter sets, and a detailed analysis of the
results obtained.

Note: You may assume appropriate physical units and values for the parameters (e.g., length
units for 𝐿, temperature units for 𝑇0 and 𝑇𝐿 , etc.).

You might also like