Main Content

Modeling Valves in Simscape Fluids

You can model flow control, pressure control, and directional flow control with Fluids library valve blocks. Flow-controlling valves, such as a gate valve, limit the volumetric flow rate through a valve. Pressure-controlling valves limit valve operational pressures by opening or closing the valve based on pressure, or by venting excess flow.

Directional valves connect different flow paths based on the displacement of a central control member. They can be proportional-area, such as a four-way directional valve, or proportional-pressure, such as a check valve. Directional valves such as a shuttle valve can also control flow switching.

Proportional directional valves are configured based on the flow paths that open and close when the control member displaces, and are classified by:

  • The number of external paths or connecting ports

  • The number of positions the valve can assume

  • Continuous or discrete movement

The directional valves in the Isothermal Liquid, Thermal Liquid, and Gas libraries comprise two-way, three-way, and four-way directional valves with a single, continuous spool control member. The block ports are named to correspond with common connections:

  • P — Pump or pressure port

  • T — Tank or return port

  • A, B — Load ports

  • X, Y — Pilot ports

Additionally, you can add mechanical effects to a valve by connecting blocks modeling damping, friction, and a hard stop to the valve actuator signal, such as in the 4-Way Directional Valve with Mechanical Effects example.

Valve Control with Valve Actuator Blocks

You can model servo or solenoid valve control with blocks from the Valve Actuator sublibrary, such as the Proportional Valve Actuator or the Pilot Valve Actuator (IL). To model solenoid control, you can also use a Solenoid block from the Simscape Electrical library.

The Multiposition Valve Actuator block can be paired with directional valves to control the valve spool position according to input signals or switching time.

Four-Way Directional Valve Schematic

A proportional flow directional valve is characterized by its initial open flow path, the flow paths that open or close with positive or negative control member displacement, and the orifice opening offset. The relationship between the control member stroke and the opening identifies whether an orifice is overlapped, underlapped, or neutral.

When a four-way, three-position directional valve has all ports closed in the neutral position, the valve, connected to a double-acting actuator, looks like this:

Drawing of valve closed in neutral position

When the control member displaces in the positive direction, to the right in the valve diagram, flow paths P-A and B-T open. When the control member displaces in the negative direction, to the left in the valve diagram, flow paths P-B and A-T open. This configuration for positive and negative displacement is schematically represented as:

Diagram of valve closed in neutral position

where the box on the left represents the positive spool displacement connections, and the box on the right represents the negative spool displacement connections.

In a four-way, two-position valve, additional flow configurations may open only during transition. For example, setting the 4-Way 2-Position Directional Valve (IL) block to this valve configuration

Schematic of four-way two-position valve

where:

  • Positive spool position open connections is set to P-A and P-B.

  • Negative spool position open connections is set to P-A and B-T.

results in open P-A, P-B, and B-T flow paths when the spool transitions between the positive and negative positions.

Note

In the 4-Way 3-Position Directional Valve (IL) and 4-Way 2-Position Directional Valve (IL) blocks, you can:

  • Select a pre-parameterization based on manufacturer data sheets. This can be set in the description section of the block dialog.

  • Visualize the opening characteristics of each orifice in the valve. Right-click on the block and select Fluids > Plot Valve Characteristics.

Parameterizing Four-Way Directional Valve Blocks

In the 4-Way 3-Position Directional Valve (IL) and 4-Way 2-Position Directional Valve (IL) blocks, the spool position at maximum orifice area parameter indicates the absolute spool position at which that orifice is fully open. For example, when the valve is configured for a P-A flow path, the P-A orifice is open at the value specified in the Spool position at maximum P-A orifice area parameter. Orifices identified in the Positive spool position open connections parameter must have a positive spool position at the maximum opening. Orifices identified in the Negative spool position open connections parameter must have a negative spool position at the maximum opening. If these valves are not also identified in the Neutral spool position open connections parameter, they must be closed at a spool position of 0.

The spool travel between closed and open orifice parameter is the stroke that opens the orifice. If Area characteristics is set to Different for each flow path, the spool travel between the closed and open orifice can be defined differently for each flow path.

To check that the defined spool positions for each orifice opening and closing position comprise a consistent configuration, the Consistency check for neutral spool position open connections parameter can notify you if parameterization values are inconsistent when the spool is in the neutral position. A warning or error is generated when you plot or refresh the plot of the valve configuration.

In the 4-Way 3-Position Directional Valve (TL) and 4-Way 3-Position Directional Valve (G) blocks, the maximum valve opening parameter is the orifice stroke, which corresponds to the spool travel between closed and open orifice parameter in the isothermal liquid blocks. The parameters under Valve Opening Offsets, such as Between ports P and A, identify the spool displacement from neutral at which the flow path begins to open for each orifice, such as the one between ports P and A. These parameters correspond to the spool position at the orifice minimum opening.

Visualizing a Valve Configuration

In the 4-Way 3-Position Directional Valve (IL) and 4-Way 2-Position Directional Valve (IL) blocks, you can visualize the orifice area for each flow path as a function of spool position:

Plot of valve configuration

This visualization shows a four-way, three-position valve configured with:

  • Positive spool position open connections set to P-A and B-T

  • Neutral spool position open connections set to A-T and B-T

  • Negative spool position open connections set to P-B and A-T

  • Area characteristics set to Different for each flow path

  • Orifice parameterization set to Tabulated data - Volumetric flow rate vs. spool travel and pressure drop

With the following values changed from the block defaults:

  • Spool position at maximum A-T orifice area set to -0.004 m

  • Spool position at maximum B-T orifice area set to 0.006 m

  • B-T orifice spool travel vector, ds set to [0, .00125, .0025, .00375, .0065] m.

The visualization shows that orifices A-T and B-T have a nonzero flow rate, or are open, when the spool position is 0. Orifice B-T is fully closed when the spool displaces to -0.0005 m; it is fully open at 0.006 m and has an opening length of 0.0065 m. Orifice A-T is fully closed at 0.001 m; it is fully open at -0.004 m and has an opening length of 0.005 m.

Changing Spool position at maximum P-A orifice area to 0.003 m results in an open P-A orifice when the spool is in the neutral position, which violates the valve configuration settings. This is because the last element of the P-A orifice spool travel vector, ds, is larger than the Spool position at maximum P-A orifice area, meaning that the valve must start opening when the spool is still in the negative position:

Plot of valve configuration

Parameterization with a Datasheet

Manufacturer data sheets provide flow rate–pressure differential curves for the different flow paths of a directional valve. You can parameterize a directional valve block with data from the manufacturer by setting Orifice parameterization to Tabulated data - Volumetric flow rate vs. spool travel and pressure drop.

If you do not want to manually input data from a data sheet, you can use the MATLAB File Exchange function grabit to extract data points from a plot image:

  1. Enter grabit() at the MATLAB® command line.

  2. From the GUI that appears, click Load Image to load a valve curve in PNG, TIF, JPG, GIF, or BMP format.

  3. Calibrate the image by selecting the axes ranges and entering the range values. Start by clicking on the x-axis origin, entering 0 in the box that appears, and pressing Enter.

  4. Click Grab Points to begin collecting data by clicking along the desired curve. To collect another set of data, press Enter and click Grab Points again.

    grabit GUI

  5. Click Save to file as to save the dataset as P_A_pressure_drop.mat in your working directory.

  6. Enter the saved variables as the parameter setting:

    Input variable in parameter setting

See Also

| | | |

Related Topics