Main Content

Simple Gas Model

In this example, you create a simple open-loop gas model. The model consists of a local restriction between two reservoirs. The local restriction represents a valve or an orifice. The reservoir blocks set up the boundary conditions for the local restriction.

Reservoir blocks are useful for setting up pressure and temperature boundary conditions. If you want the pressure and temperature boundary conditions to change over time, use controlled reservoir blocks.

To open the completed model, in the MATLAB® Command Window, type ssc_gas_tutorial_step1.

To create this model:

  1. In the MATLAB Command Window, type:

    ssc_new

    Note

    By default, Simulink® Editor hides the automatic block names in model diagrams. To display hidden block names for training purposes, clear the Hide Automatic Block Names check box. For more information, see Configure Model Element Names and Labels.

  2. Delete the Simulink-PS Converter block.

  3. To reduce diagram clutter, right-click the PS-Simulink Converter block and, from the context menu, select Format > Show Block Name > Off.

  4. Add the following blocks.

    Block NameLibraryQuantity
    Local Restriction (G)Gas/Elements1
    Reservoir (G)Gas/Elements2
    Gas Properties (G)Gas/Utilities1
    Flow Rate Sensor (G)Gas/Sensors1
  5. Change the reservoir block names and connect the blocks as shown in the diagram.

  6. Leave the Downstream Reservoir block at standard atmospheric conditions.

  7. Change the Upstream Reservoir block to have a specified pressure of 0.12 MPa and temperature of 400 K.

  8. Simulate the model. The mass flow rate through the restriction is approximately 0.13 kg/s.

Related Examples

More About