difficulty in modifying thermal liquid setting for air , water and oil

9 次查看(过去 30 天)
i want to modify my thermal liquid setting so i can havve air , water or oil with a particular cp flowing from reservoir

采纳的回答

Umar
Umar 2025-9-27
编辑:Umar 2025-9-27

Hi @Oreoluwa,

I saw your comment regarding the difficulty in modifying thermal liquid settings to have air, water, or oil with a particular specific heat capacity (cp) flowing from a reservoir.

To achieve this, I recommend using a Variant Subsystem in Simulink (if that is what you probably using), which allows you to switch between different fluid property blocks dynamically without rebuilding your model each time.

Here’s a brief outline of the approach:

1. Create a Variant Subsystem containing three subsystems, each representing one fluid (Air, Water, Oil).

Refer to the official MATLAB documentation here: [ https://www.mathworks.com/help/simulink/ug/variant-subsystems.html ]

2. Set the thermal liquid properties in each subsystem’s Thermal Liquid Properties block (e.g., cp, density, viscosity, thermal conductivity) according to the fluid. You can find the Thermal Liquid blocks under Simscape > Foundation Library > Thermal Liquid.

Documentation link:[ https://www.mathworks.com/help/simscape/thermal-liquid.html]

3. Control which fluid is active by defining a variant control variable, such as `FLUID_TYPE`, in the MATLAB workspace:

   * `FLUID_TYPE = 1` for Air
   * `FLUID_TYPE = 2` for Water
   * `FLUID_TYPE = 3` for Oil

More on variant control: [ https://www.mathworks.com/help/simulink/ug/using-variants.html ]

4. Connect the output of this Variant Subsystem to your Thermal Liquid Reservoir or the rest of your fluid network.

5. Run the simulation after setting `FLUID_TYPE` to simulate the desired fluid properties.

This method offers flexibility and makes it easy to switch between fluids with their respective properties without modifying the model architecture.

Please let me know if you would find that helpful or if you have any further questions.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Thermal Liquid Library 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by