Fluid System Modeling
Simscape Fluid Domains
Simscape™ Foundation library contains several domains for modeling fluid systems. This table provides a summary of fluid domains, to help you select the appropriate domain for your application.
|Domain||Working Fluid||Thermodynamic Effects|
|Isothermal Liquid||Liquid, possibly with a small amount of entrained air||No|
|Two-Phase Fluid||Part liquid and part vapor||Yes|
|Gas||Gas: perfect, semiperfect, or real (single species)||Yes|
|Moist Air||Mixture of dry air, water vapor, and trace gas (or of up to three other semiperfect gas species)||Yes|
The hydraulic domain and Hydraulic block library also let you model fluid systems that do not account for thermodynamic effects and where the working fluid is liquid with a small amount of entrained air. However, MathWorks recommends that you use the Isothermal Liquid library for modeling isothermal hydraulic systems. For more information, see Upgrading Hydraulic Models To Use Isothermal Liquid Blocks.
Specifying the Working Fluid
The rules that you must follow when building a physical model with Simscape software are described in Basic Principles of Modeling Physical Networks. This section briefly reviews the rules that are specific to fluid system modeling.
When modeling systems that contain fluid elements, it is very important to specify the working fluid correctly:
If you have isothermal liquid elements in your model, the working fluid is liquid, possibly with a small amount of entrained air. Attach an Isothermal Liquid Properties (IL) block to each topologically distinct circuit to define the working fluid properties. This block lets you specify whether the liquid bulk modulus is constant or pressure-dependent. You can also specify whether the fluid contains entrained air, and, if present, whether its amount is constant or pressure-dependent. The default working fluid is water, with constant bulk modulus and zero entrained air.
If you have a Simscape Fluids™ license, you can also use the Isothermal Liquid Built-In Properties (IL) block to specify the working fluid in a circuit. This block lets you select from a list of predefined liquids and specify values for various fluid properties, as well as visualize fluid properties in the circuit as a function of pressure.
Similarly, if you have thermal liquid elements in your model, attach a Thermal Liquid Settings (TL) block to each topologically distinct circuit to define the working fluid properties. The block takes as inputs the necessary fluid properties, each specified as a tabulated function of pressure and temperature.
If you have a Simscape Fluids license, you can also use the Thermal Liquid Properties (TL) block to specify the working fluid in a thermal liquid circuit. This block lets you select the name of the fluid from a list that includes water, seawater, and various mixtures with uses in cooling and deicing.
If you have two-phase elements in your model, the working fluid is part liquid and part vapor. Attach a Two-Phase Fluid Properties (2P) block to each topologically distinct circuit to specify the working fluid properties. This block lets you define the properties of liquid and vapor separately, each as a tabulated function of pressure and temperature.
If you have gas elements in your model, default gas properties are for dry air. Attach a Gas Properties (G) block to each topologically distinct circuit to change gas properties.
If you have moist air elements in your model, default properties correspond to dry air, water vapor, and carbon dioxide (the optional trace gas). Attach a Moist Air Properties (MA) block to each topologically distinct circuit to change the air mixture properties.
If you have hydraulic blocks in your model, the working fluid used in the hydraulic circuit defines their global parameters, such as fluid density, fluid kinematic viscosity, and fluid bulk modulus, specified as constant values. To specify the working fluid, attach a Custom Hydraulic Fluid block (or a Hydraulic Fluid block, available with Simscape Fluids block libraries) to each topologically distinct hydraulic circuit.
If you omit the fluid properties block in a circuit, the working fluid in that circuit assumes the domain default properties. The default fluid properties for each domain correspond to the default parameter values of the fluid properties block in the respective Foundation library.