How to solve this partial differential equation in simulink?

1 view (last 30 days)
Hello , I want to simulate the following partial equation on simulink , but I dont know if what I already built is fine , I have some struggle with dc/dz ,because it gives me error when I try to build it , so I conected rate transition and discrete derivative ,but dont know it is ok . I am building a fixed bed reactor full loaded with carbon absorbed gold in which a cyanide flow is pumped into and absorbs the gold loading , depleting the carbon . Following the equations:
So i tried finite differences for dc/dz with forward difference for eactor entry , central along the reactor , and backward in the exit, and dc/dt and dq/dt use integrator blocks, I consider Co= 0 and q0=4320. The problem is that when I remove rate transition and discrete derivative in 4th reactor,gives error.
Being that said, is correct to represent dc/dz as following? :
Adjoint the simulink file down here and thanks in advance:
  2 Comments
Chuguang Pan
Chuguang Pan on 14 Jan 2025
As far as I know, the solvers embed in Simulink can only solve ODEs. I think if you want to solve PDEs in Simulink, you should transform PDEs to ODEs.
Yifeng Tang
Yifeng Tang on 15 Jan 2025
Do you HAVE TO solve this in Simulink? This equation won't be too hard to write and solve in MATLAB. Are you trying to integrate some kind of controller later?

Sign in to comment.

Answers (0)

Products


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!