How can I call the density parameter from hydraulic domain in a custom block?

2 ビュー (過去 30 日間)
Miguel Míllara
Miguel Míllara 2018 年 5 月 11 日
回答済み: Yoke Peng Leong 2018 年 5 月 14 日
I'm working in a Simscape Fluids system. I specified the fluid with the Hydraulic Fluid block but I have a custom block in who I need to reference the density as a variable so that if I change the temperature in the Hydraulic Fluid the density could change in the custom block.

回答 (1 件)

Yoke Peng Leong
Yoke Peng Leong 2018 年 5 月 14 日
You can access the density following the example in this documentation: https://www.mathworks.com/help/physmod/hydro/ref/hydraulicfluid.html
For example, to access the density of Skydrol LD-4 at 50 degree Celcius:
>> props = sh_stockfluidproperties;
>> temp = 50;
>> [vis, den, bmod] = props.skydrol_ld_4.prop(temp);
where "temp" is the temperature (C), "vis" is the viscosity (m^2/s), "den" is the density (kg/m^3), and "bmod" is the bulk modulus (Pa).

カテゴリ

Help Center および File ExchangeFoundation and Custom Domains についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by