MATLAB Answers

What does "delta_vel_pos_AI" in Pipe (G) means?

조회 수: 3(최근 30일)
PY 2021년 7월 24일
댓글: PY 2021년 8월 10일
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?
Thank you in advance.
  댓글 수: 2
PY 2021년 7월 27일
Thank you for your reply.
I tried to edit the code and use it in a user-defined block, and with the same input parameters, the resulted pressure drop is very different if I delete this term, so I guess it should have a physical meaning instead of just for better numerical robustness.
In the reference there are equations related to the speed of sound in the chapter about compressible flow, however I could not find this exact equation or equation which can be transformed into this term.
I am looking forward to your further explaination. Thank you.

댓글을 달려면 로그인하십시오.

채택된 답변

Yifeng Tang
Yifeng Tang 2021년 7월 30일
Hi PY,
The term is using a trick to avoid using the abs() function, which may otherwise trigger frequent zero-crossing when mdot is small. Using the sqrt() formulation and having a value that's always > 0, no zero-crossing would be triggered when solving the equations.
Later the momentum balance equation needs to compute abs(delta_vel_AI)*mdot_A/area. Here delta_vel_pos_AI is approximately abs(delta_vel_AI) when delta_vel_AI is not very small. If delta_vel_AI is small or close to 0.001*speed_of_sound, the mdot_A term would also be small, and the impact on the total momentum balance should also be neglible.
I'm curious what you found after modifying the block. Would you be able to share the .ssc file and a test model?
  댓글 수: 3
PY 2021년 8월 10일
Thank you for the advice.
If there are any results after the discussion with the development team, I should be grateful, if you could provide me with the updated informations.

댓글을 달려면 로그인하십시오.

추가 답변(0개)




Community Treasure Hunt

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

Start Hunting!

Translated by