In the source code of simscape component Pipe (G), line 237-241 % 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); and line 326-328 % Momentum balance p_A - p_I == delta_vel_pos_AI*mdot_A/area + pressure_loss_AI; p_B - p_I == delta_vel_pos_BI*mdot_B/area + pressure_loss_BI; What do delta_vel_pos_AI and delta_vel_pos_BI mean? According to the documentation Rigid conduit for gas flow - MATLAB - MathWorks Deutschland, the momentum balance does not consider anything related to the speed of sound for unchoked flow. What is the meaning of the term "(0.001*a_AI)^2"? I tried to find it in the two references of the documentaion but could not find anything related. Should it not simply be p_A - p_I == delta_vel_AI*mdot_A/area + pressure_loss_AI; so that it matches the momentum balance equation stated in the documentation?
John Williams answered .
2025-11-20