Effacer les filtres
Effacer les filtres

how can I make a s-function of PDE script file.

1 vue (au cours des 30 derniers jours)
Chandra Kant Singh
Chandra Kant Singh le 15 Déc 2018
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.

Réponses (1)

Mayur Agnani
Mayur Agnani le 17 Déc 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

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by