Gas Systems
Explore examples that illustrate modeling, control, and simulation of gas systems.
Featured Examples
Pneumatic Actuation Circuit
How the Foundation Library gas components can be used to model a controlled pneumatic actuator. The Directional Valve is a masked subsystem created from Variable Local Restriction (G) blocks to model the opening and closing of the flow paths. The Double-Acting Actuator is a masked subsystem created from Translational Mechanical Converter (G) blocks to model the interface between the gas network and the mechanical translational network.
Pneumatic Motor Circuit
How a pneumatic vane motor can be modeled using the Simscape™ language. The Pneumatic Motor component is built using the Simscape Foundation gas domain. It inherits from the foundation.gas.two_port_steady
base class, which contains common equations that implement the upwind energy flow rate and the gas properties at the ports. The Pneumatic Motor subclass implements equations that describe behaviors specific to the component, such as the motor torque and flow rate characteristics and the mass and energy balance. The Pneumatic Motor block is inserted into the model using the Simscape Component block without the need to generate a separate library.
Choked Flow in Gas Orifice
The choking behavior of a gas orifice modeled by the Local Restriction (G) block. The Controlled Reservoir (G) blocks are used to set up controlled pressure and temperature boundary conditions from the Reservoir Inputs subsystem to test the gas orifice.
Brayton Cycle (Gas Turbine) with Custom Components
Models a gas turbine auxiliary power unit (APU) based on the Brayton Cycle. The Compressor and Turbine blocks are custom components based on the Simscape™ Foundation Gas Library. The power input to the system is represented by heat injection into the combustor; actual combustion chemistry is not modeled. A single shaft connects the compressor and the turbine so that the power from the turbine drives the compressor. The APU is a free turbine that further expands the exhaust stream to produce output power.
Building Ventilation
Models a ventilation circuit in a building. The air volume inside the building is divided into four zones. The ventilation unit blows cool air into Zone 1 and extracts air from Zone 3. The extracted air can be optionally recycled back into Zone 1. A door in Zone 4 can be opened to vent air out to the atmosphere.
Gamma Stirling Engine
Model a Gamma Stirling engine using gas, thermal, and mechanical Simscape™ components and domains.
Fanno Flow Gas Pipe Validation
The Fanno flow model is an analytical solution of an adiabatic (perfectly insulated) compressible perfect gas flow through a constant area pipe with friction. This example shows a comparison and validation of the Simscape™ Pipe (G) block against the Fanno flow model. While you typically need empirical data to validate a block over a range of scenarios, it may still be useful to perform limited validation against analytical models for specific scenarios. This is because the theory and derivation behind the analytical model may provide more insight into where the block works well and how to address limitations. The comparison shows that, for short to moderate pipe lengths, the Simscape pipe model agrees well with the Fanno flow model. For long pipe lengths, a segmented pipe model agrees well with the Fanno flow model.
Compressor Map with Scattered Lookup
Gas flow through a compressor which is modeled using a simple controlled mass flow rate source. The compressor map that governs this mass flow rate is modeled using the PS Scattered Lookup (2D) block whose data coordinates are the pressure ratio (Pa/Pa) and the engine RPM, and the output is the mass flow rate (kg/s). The scattered lookup block performs delaunay triangulation on the input data (which is shown in plots below), and uses this to interpolate and calculate the mass flow rate based on the input. Scattered lookup allows modeling of the compressor even if the data provided is in an unstructured format.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)