0% found this document useful (0 votes)
13 views13 pages

Lab Manual

Lab manual of mass transfer

Uploaded by

Inzamamul Haque
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views13 pages

Lab Manual

Lab manual of mass transfer

Uploaded by

Inzamamul Haque
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

A

Lab Report on
Experiment No. 2

“Practice examples of Process Modeling & Simulation and


solution of problems using MATLAB”

Submitted by
Anjali Bharti (2200430510002)

PROCESS MODELING AND SIMULATION LAB

Department of Chemical Engineering


Bundelkhand Institute of Engineering & Technology
Jhansi (U.P.) India – 284128
Session 2023-24
EXPERIMENT NO. 2

OBJECTIVE: Practice examples of process Modeling & simulation and


solution of problems using MATLAB.

THEORY:
MATLAB plays a significant role in process modeling and
simulation in chemical engineering by providing a versatile platform for solving
complex engineering problems. Its computational capabilities allow engineers
to design, simulate, and optimize chemical processes efficiently. Here's how
MATLAB proves useful:
1. Modeling Complex Systems: MATLAB handles complex mathematical
models, such as mass and energy balances, using tools like Simulink for
dynamic simulations.
2. Solving Differential Equations: Engineers use MATLAB’s ODE and PDE
solvers to solve differential equations governing chemical reactions, fluid flow,
and heat transfer.
3.Process Simulation: MATLAB simulates both steady-state and dynamic
behavior of processes, enabling engineers to analyze reactors, distillation
columns, heat exchangers, and other equipment.
4. Optimization and Control: MATLAB’s optimization toolbox is used to fine-
tune processes for cost efficiency, while control system design is achieved using
feedback and feedforward strategies.
5. Data Analysis and Visualization: MATLAB simplifies the analysis of process
data and helps visualize trends, performance metrics, and system responses with
its advanced plotting functions.

Let us discuss one by one and run on MATLAB:


Fluid Flow in a Pipe (Laminar Flow)
Problem-1 : Simulate the velocity profile in a pipe for steady, fully developed
laminar flow of an incompressible fluid using the Hagen–Poiseuille law.
Solution:
 Calculate the velocity profile using the analytical formula.

MATLAB Code:

 mu = 0.001; % Viscosity (Pa.s)


 R = 0.05; % Pipe radius (m)
 dpdx = -100; % Pressure gradient (Pa/m)

 r = linspace(0, R, 100); % Radial positions
 v = (dpdx/(4*mu))*(R^2 - r.^2); % Velocity profile

 plot(r, v);
 xlabel('Radial Position (m)');
 ylabel('Velocity (m/s)');
 title('Velocity Profile in Pipe (Laminar Flow)');

RUN ON MATLAB:

OUTPUT:
Plug Flow Reactor (PFR)
Problem-2: Model the concentration profile in a PFR where the feed
concentration is 1 mol/L, the reaction is first-order with rate constant k=0.5 per
second, and the flow rate is Q=1 L/s.
Solution:
 Discretize the reactor along its length.
 Use a material balance on each small segment to calculate the
concentration change along the reactor.

MATLAB Code:

 L = 5; % Reactor length (m)


 n = 100; % Number of segments
 k = 0.5; % Reaction rate constant
 C0 = 1; % Feed concentration
 dx = L/n; % Segment length

 C = zeros(1, n);
 C(1) = C0; % Initial concentration
 for i = 2:n
 C(i) = C(i-1)/(1 + k*dx);
 end

 x = linspace(0, L, n);
 plot(x, C);
 xlabel('Reactor Length (m)');
 ylabel('Concentration (mol/L)');
 title('Concentration Profile in PFR');

RUN ON MATLAB:
OUTPUT:

Transient Heat Conduction in a Slab


Problem-3: Model the transient temperature distribution in a slab of thickness
L=0.1 m, with an initial temperature of 100°C and surface temperature
maintained at 0°C. The thermal diffusivity α=1.4×10−7 m2/s
Solution:
 Use the finite difference method to discretize both space and time.
 Implement a time-stepping solution using the heat equation.

MATLAB Code:

 L = 0.1; % Slab thickness


 alpha = 1.4e-7; % Thermal diffusivity
 nx = 50; % Number of spatial points
 nt = 200; % Number of time steps
 dx = L/nx; % Spatial step
 dt = 0.01; % Time step

 T = 100*ones(nx,1); % Initial temperature
 T(1) = 0; T(end) = 0; % Boundary conditions

 for t = 1:nt
 T_new = T;
 for i = 2:nx-1
 T_new(i) = T(i) + alpha*dt/dx^2 * (T(i+1) - 2*T(i) + T(i-1));
 end
 T = T_new;
 end

 x = linspace(0, L, nx);
 plot(x, T);
 xlabel('Position (m)');
 ylabel('Temperature (°C)');
 title('Transient Heat Conduction in a Slab');

RUN ON MATLAB:

OUTPUT:
Liquid-Liquid Extraction
Problem-4: Simulate the concentration change of a solute between two
immiscible liquids in a counter-current liquid-liquid extraction process. The
partition coefficient between the two phases is K=2.
Solution:
 Apply mass balance equations for each stage of the extraction process.
 Use the stage-wise approach for modeling.

MATLAB Code:

 n_stages = 5; % Number of extraction stages


 C_A_in = 1; % Initial concentration in phase A
 K = 2; % Partition coefficient
 C_B = zeros(1, n_stages); % Concentration in phase B
 C_A = C_A_in; % Start with concentration in phase A

 % Counter-current extraction simulation
 for i = 1:n_stages
 C_B(i) = C_A / K; % Equilibrium between phases
 C_A = C_A - C_B(i); % Mass balance for solute
 end

 stage = 1:n_stages;
 plot(stage, C_B, 'o-');
 xlabel('Stage Number');
 ylabel('Concentration in Phase B (mol/L)');
 title('Solute Concentration in Liquid-Liquid Extraction Stages');

RUN ON MATLAB:
OUTPUT:

Diffusion Through a Porous Catalyst Particle


Problem-5: Simulate diffusion and reaction within a spherical porous catalyst
particle, where the reaction rate follows r=kC and diffusion follows Fick’s law.
Solution:
 Use Fick's second law of diffusion in spherical coordinates and include
the reaction rate term.
 Discretize the particle radius and solve using finite difference methods.

MATLAB Code:

 k = 0.1; % Reaction rate constant (1/s)


 D_eff = 1e-9; % Effective diffusivity (m^2/s)
 R = 1e-3; % Catalyst particle radius (m)
 n = 50; % Number of discretized points
 r = linspace(0, R, n); % Radial positions
 dr = r(2) - r(1); % Radial step size
 C = zeros(n,1); % Initial concentration

 dt = 0.01; % Time step
 tspan = 0:dt:5; % Time span

 for t = tspan
 C_new = C;
 for i = 2:n-1
 C_new(i) = C(i) + dt * D_eff * (C(i+1) - 2*C(i) + C(i-1)) /
dr^2 - dt * k * C(i);
 end
 C = C_new;
 end

 plot(r, C);
 xlabel('Radial Position (m)');
 ylabel('Concentration (mol/m^3)');
 title('Diffusion and Reaction in a Porous Catalyst Particle');

RUN ON MATLAB:
OUTPUT:
REFERENCES

https://matlab.mathworks.com/
https://msubbu.in/ln/ctrl/index.html
https://in.mathworks.com/solutions/chemical-engineering.html
https://ocw.mit.edu/courses/10-450-process-dynamics-operations-and-control-
spring-2006

You might also like