# What is the pressure sensor measuring in simscape fluids?

조회 수: 5(최근 30일)
Luke 2021년 7월 6일
답변: Yifeng Tang 2021년 7월 23일
In simscape fluids is the pressure sensor measuring total pressure, static pressure or stagnation pressure.
And depending on the answer how do I output static pressure, total pressure and dynamic pressure seperately?

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

### 답변(1개)

Yifeng Tang 2021년 7월 23일
My understanding is that it's the static pressure.
The definition of dynamic pressure would involve a flow velocity, hence a flow rate and a cross section area. So I guess it only makes sense for components like Pipes and Restrictions. It's not necessarily included in simlog or shown in Simscape Result Explorer, but it's possible to modify the code a bit to expose those. Below are snippets of source code from the Local Restriction (G) component:
Line 74-89
variables (Access = protected)
mdot_A = {0, 'kg/s'}; % Mass flow rate into port A
mdot_B = {0, 'kg/s'}; % Mass flow rate into port B
Phi_A = {0, 'kW' }; % Energy flow rate into port A
Phi_B = {0, 'kW' }; % Energy flow rate into port B
p_R = {0.1, 'MPa'}; % Pressure at the restriction
T_R = {300, 'K' }; % Temperature at the restriction
end
variables (Access = protected, ExternalAccess = none)
T_A = {300, 'K'}; % Temperature at port A including choking effects
T_B = {300, 'K'}; % Temperature at port B including choking effects
velocity_R = {0, 'm/s'}; % Velocity at the restriction
end
if you move velocity_R to the variables section above, it will be available in logged data, and for total pressure calculation. You can include that calculation inside the custom block if you want by adding vel^2 terms to p_R (restriction) or p_I (pipe).

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

R2019b

### Community Treasure Hunt

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

Start Hunting!