Catalyst Modelling with MATLAB: Modeling Concentration Profile in Photoreactor

In summary, the program is trying to guess the parameters c1 and c2 for the boundary condition function, but is getting errors.
  • #1
AAMAIK
47
0
I have little knowledge of MATLAB. I am trying to model the concentration profile along the photocatalyst film thickness in a photoreactor. Mass Transport takes place by diffusion and the rate of generation of component is given by rA.
Boundary conditions: Concentration of the component that is converted (phenol) on the surface of the catalyst is equal to the bulk
and the concentration gradient with respect to catalyst film thickness evaluated at the other end is equal to zero.
 

Attachments

  • MATLAB 2.png
    MATLAB 2.png
    25.2 KB · Views: 197
  • MATLAB 1.png
    MATLAB 1.png
    39.2 KB · Views: 188
Physics news on Phys.org
  • #3
I am asking for links from which one could learn how to set up the boundary conditions and the differential equations in MATLAB to find a solution (concentration profile along the catalytic film). I have litttle experience in using MATLAB
 
  • #4
d^2c/dσ ^2+ θ^2*c/(1+Φ*c)=0
c evaluated at σ =0 is equal to 1
and the first derivative of c with respect to σ evaluated at σ =1 is equal to zero.
I put the equation above in a form of a system of first order equations by introducing the variables c1 and c2.
c1=c
c2=c'
I rewritten the governing equation as
c1'=c2
c2'=θ^2*c1/(1+Φ*c1)
with the transformed boundary condtions
c1(0)=1
c2(1)=0
The boundary value problem requires three pieces of information, the equation to be solved, its associated boundary condtions and initial guess for the solution and the parameters theta and phi.
phi=0.85
theta=4.5521
init=bvpinit(linspace(0,1,50), bc_init,phi,theta) % bc_init is an initial function profile
sol=bvp4c(@rhs_bvp,@bc_bvp, init);
σ= linspace(0, 1, 100)
BS=deval(sol,x)
plot(σ,BS(1,:)) ;I want to build bc_init
function in=bc_init(σ);
in=[cos((pi/2)*σ)];
my input is going to be a vector is my guess for c1 and c2. Looking at the solutions at the boundary points I would guess the solution to behave like Cos(pi/2*σ)
So the solver will take my guess for the parameters phi and theta and produce an initial function evaluated at 50 points between 0 and 1 and send its on sol and operates on the equation and boundary and iterates towards a solution

function bc=bc_bvp(cl,cr,phi,theta)
bc=[cl(1)-1; cr(2)];
The boundary condition function of the vector c evaluated at the values σ=0,1

the function below represents the differential equation
function rhs=rhs_bvp(σ,c,phi,theta)
rhs=[c(2); ((theta)^2*c(1)/(1+phi*c(1)


I tried to run the program but its generating these errors
w = feval(v,x(1),extraArgs{:});

Error in Guess2 (line 5)
init2=bvpinit(linspace(0,1,50),@mat4init,phi,theta);
 

1. What is the purpose of catalyst modelling with MATLAB?

Catalyst modelling with MATLAB is used to simulate and analyze the behavior of catalysts in a chemical reaction. This helps to understand the factors that affect the performance of a catalyst and optimize its design for better efficiency and selectivity.

2. What is a photoreactor and how does MATLAB help in modeling concentration profiles in it?

A photoreactor is a type of reactor used in photocatalytic processes, where a catalyst is activated by light to drive a chemical reaction. MATLAB is used to create a mathematical model of the photoreactor, taking into account parameters such as light intensity, catalyst concentration, and reaction kinetics, to predict the concentration profiles of reactants and products over time.

3. Can MATLAB be used to model any type of catalyst?

Yes, MATLAB can be used to model any type of catalyst, as long as the relevant kinetic and transport equations are known. It is a versatile platform that allows for the incorporation of various reaction mechanisms and boundary conditions to accurately simulate the behavior of different catalysts.

4. How accurate are the results obtained from catalyst modelling with MATLAB?

The accuracy of the results obtained from catalyst modelling with MATLAB depends on the accuracy of the input data and assumptions used in the model. With proper validation and verification, MATLAB can provide highly accurate predictions of concentration profiles and reaction rates in photoreactors.

5. Are there any limitations to using MATLAB for catalyst modelling?

One limitation of using MATLAB for catalyst modelling is that it requires a good understanding of the underlying mathematical concepts and coding skills to create and manipulate the model. It may also be computationally intensive and time-consuming for complex systems, requiring high-performance computing resources.

Similar threads

  • Materials and Chemical Engineering
Replies
2
Views
2K
Replies
0
Views
328
Replies
0
Views
462
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • Materials and Chemical Engineering
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Atomic and Condensed Matter
Replies
1
Views
1K
  • Materials and Chemical Engineering
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
739
  • Engineering and Comp Sci Homework Help
Replies
2
Views
3K
Back
Top