# What is the pressure sensor measuring in simscape fluids?

9 views (last 30 days)
Luke on 6 Jul 2021
Answered: Yifeng Tang on 23 Jul 2021
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?

Yifeng Tang on 23 Jul 2021
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).

### Categories

Find more on Simscape Fluids in Help Center and File Exchange

R2019b

### Community Treasure Hunt

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

Start Hunting!

Translated by