Why is the 'Pipe (G)' block giving wrong results at low flow conditions?
7 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2023-2-10
回答: MathWorks Support Team
2023-2-13
I am using Simscape Fluids release R2022b and a "Pipe (G)" block, documented here:
I realized that the block is producing incorrect results when my model has very low flow rates, low velocities, or low Reynolds numbers.
Why is that?
采纳的回答
MathWorks Support Team
2023-2-10
A possible cause of the inaccurate results is the smoothing applied to the calculations of velocity change inside the 'Pipe (G)' block. If you inspect the source code (MATLAB R2022b), you can see that the lines 245-250 contain the following:
% Change in flow velocity
delta_vel_AI = (1/rho_I - 1/rho_AI)*mdot_A/area;
delta_vel_BI = (1/rho_I - 1/rho_BI)*mdot_B/area;
delta_vel_pos_AI = sqrt(delta_vel_AI^2 + (0.001*a_AI)^2);
delta_vel_pos_BI = sqrt(delta_vel_BI^2 + (0.001*a_BI)^2);
There is a factor of 0.001 that serves as a smoothing factor. Cases of low flow have to be handled carefully because the blocks support flow reversal, which could cause discontinuities when accounting for the input flow properties. Some variables are smoothed during the flow reversal transition to aid numerical stability.
There is currently no way to tune the "0.001" value in "Pipe (G)" and other similar blocks. The best workaround is to create a block with the same Simscape code and change that value manually if your application requires high accuracy at very low flow conditions.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Gas Models 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!