Why is the 'Pipe (G)' block giving wrong results at low flow conditions?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 10 de Feb. de 2023
Respondida: MathWorks Support Team
el 13 de Feb. de 2023
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?
Respuesta aceptada
MathWorks Support Team
el 10 de Feb. de 2023
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Gas Models en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!