MATLAB: Use ideal gas in SimHydraulics

simhydraulicsSimscape Fluidssimulink

Hi everyone!
If someone wanted to use simply and ideal gas inside a model of SimHydraulics, would it be enough to just set the "Custom Hydraulic Fluid Block – relative amount of trapped air" into a big ratio, lets say 999 and then just set the density of the fluid to the ideal gas equation?
I wanted the model to know that at different pressures there will be different densities automatically.
Thank you for your help!
Best Regards,
David

Best Answer

Hmm... probably not. That parameter just tweaks the bulk modulus characteristics of the fluid as its pressure changes. You should use the Pneumatic modeling domain, which follows the Ideal Gas law.
All those blocks are under "Simscape > Foundation Library > Pneumatic", and contain basic elements like orifices, resistive tubes, volume chambers, etc. Furthermore, this domain accounts for temperature changes while the hydraulic domain assumes constant temperature fluid. This is not a good assumption for gases.
Also, SimHydraulics has a Pneumo-Hydraulic Actuator block if what you're seeking is to model is a system with an ideal gas/isothermal liquid interface.
- Sebastian