how can I make a s-function of PDE script file.
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying to Use PID with concentric heat exchanger to maintain the cold water (flowing ini inner tube) outlet temperature at a specific temperature using steam(in outer tube).for that I have written .m file expressing model equation of heat exchanger. I want to make a s function representing heat exchanger to use in simulink with PID.
I am having lot of errors. i have attached my both .m files and simulink file.
0 Commenti
Risposte (1)
Mayur Agnani
il 17 Dic 2018
Hi Chandra,
I understand that you are trying to use a PID controller and you are trying use heat exchanger in Simulink by creating a S function.After simulationg your model. It seems the error is in your .m code inside the for loop.Which is invoked when the flag=1.
for i=2:N-1
dcdz(i)=(c(i+1)-c(i-1))/(2*dz);
d2cdz2(i)=(c(i+1)-2*c(i)+c(i-1))/(dz^2);
end
the index value of c is getting out of bouds for the iternation of N.
Mayur
0 Commenti
Vedere anche
Categorie
Scopri di più su PDE Solvers in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!