How can I use the output value from the first simulation reactor as init value of a second reactor simulation block in Simulink?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Raúl Rivera
el 2 de Mzo. de 2023
Respondida: Paul
el 2 de Mzo. de 2023
Hello, I want to simulate 2 in series reactor(just a bunch of differential equations) in Smulink , but dont know how to pass the output of the first reactor as init value in second reactor.
Here is a look of the layout:
So variable "reactor 1 output" should go as init value in integrator block in reactor 2 , so i can solve diff equations in reactor 2.
Thanks in advance for the help
0 comentarios
Respuesta aceptada
Paul
el 2 de Mzo. de 2023
Hi Raúl,
Change the 'Initial Condition Source' in the Integrator block to 'external'. The integrator will then have another input port. Route the signal that you want to initialize the integrator with to that port.
0 comentarios
Más respuestas (1)
DUY Nguyen
el 2 de Mzo. de 2023
Hi Raul, it's not an optimal solution but you can add To Workspace block, and From Workspace block in between.
- In the first reactor subsystem, add a To Workspace block to save the output of the reactor to a variable in the MATLAB workspace. Set the Save format to Array.
- In the second reactor subsystem, add a From Workspace block to read the saved variable from the MATLAB workspace
0 comentarios
Ver también
Categorías
Más información sobre General Applications en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!