how can I make a s-function of PDE script file.
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Mayur Agnani
2018-12-17
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 PDE Solvers 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!