Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
Chandra Kant Singh
Chandra Kant Singh am 15 Dez. 2018
Beantwortet: Mayur Agnani am 17 Dez. 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.

Antworten (1)

Mayur Agnani
Mayur Agnani am 17 Dez. 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

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by