# 2-Way Directional Valve (IL)

2-way flow control valve in an isothermal liquid systems

Since R2020a

Libraries:
Simscape / Fluids / Isothermal Liquid / Valves & Orifices / Directional Control Valves

## Description

The 2-Way Directional Valve (IL) block represents a two-way valve, such as a shut-off valve. Use this block to simulate a flow-reducing control element that responds to pressures in another part of the system.

The block uses a variable orifice to control the flow between ports A and B. The physical signal at port S triggers the spool motion to open or shut the valve. For more details about how the block calculates flow rate through a variable orifice, see Orifice (IL).

### Orifice Parameterizations

You can parameterize the valve opening linearly or by using tabulated data.

Linear

When you set Orifice parameterization to `Linear - Area vs. spool travel`, the opening area is a linear function of the spool travel distance.

`${A}_{orifice}=\frac{\left({A}_{\mathrm{max}}-{A}_{leak}\right)}{\Delta {S}_{\mathrm{max}}}\Delta S+{A}_{leak},$`

where

• Aorifice is the opening area.

• ΔS is the spool travel distance input at port S. $\Delta S=S-{S}_{\mathrm{max}}+\Delta {S}_{\mathrm{max}}.$

• ΔSmax is the value of the Spool travel between closed and open orifice parameter.

• ALeak is the value of the Leakage area parameter.

• Amax is the value of the Maximum orifice area parameter.

Note the linear scaling from ALeak to Amax in the figure.

When the valve is in a near-open or near-closed position in the linear parameterization, you can maintain numerical robustness in your simulation by adjusting the parameter. If the parameter is nonzero, the block smoothly saturates the opening area between Aleak and Amax. For more information, see Numerical Smoothing.

Tabulated

When you set Orifice parameterization to `Tabulated data - Area vs. spool travel`, the block uses the Spool travel vector and Orifice area vector parameters to define the relationship between Aorifice and ΔS by interpolation. Aleak and Amax are the first and last parameters of the Orifice area vector parameter, respectively.

When you set Orifice parameterization to ```Tabulated data - Volumetric flow rate vs. spool travel and pressure drop```, the block uses the Volumetric flow rate table, q(ds,dp), Pressure drop vector, dp, and Spool travel vector, ds parameters to define the volumetric flow rate, q(ΔS,p).

### Visualize Orifice Openings

To visualize the spool offsets and displacement, right-click the block and select Fluids > Plot Valve Characteristics. The plot shows the valve open area or volumetric flow rate as a function of spool position.

To update the data after changing the block parameters, click in the figure window.

This figure shows the valve configuration with:

• Spool position at maximum orifice area set to `2e-3` m.

• Spool travel between closed and open orifice set to `6e-3` m.

All other parameters are at the default values.

### Faults

When you set Enable faults to `On`, the valve opening stops at a specified spool position in response to how you set the Fault trigger parameter:

• `Temporal` — Fault occurs at the time you specify in the Simulation time for fault event parameter.

• `External` — Faults occur in response to an external trigger from port Tr.

You can choose the type of fault by using the Spool position when faulted parameter:

• `Negative` — The block freezes the valve at its smallest value. The table shows which value the block uses depending on the setting of the Orifice parameterization parameter.

Orifice parameterization Parameter SettingFreeze Position Value
```Linear - Area vs. spool travel```Leakage area parameter
```Tabulated data - Area vs. spool travel```First element of the Orifice area vector parameter
```Tabulated data - Volumetric flow rate vs. spool travel and pressure drop```First row of the Volumetric flow rate table, q(ds,dp) parameter

• `Positive` — The valve freezes at its largest value. The table shows which value the block uses depending on the setting of the Orifice parameterization parameter.

Orifice parameterization Parameter SettingFreeze Position Value
```Linear - Area vs. spool travel```Maximum opening area parameter
```Tabulated data - Area vs. spool travel```Last element of the Orifice area vector parameter
```Tabulated data - Volumetric flow rate vs. spool travel and pressure drop```Last row of the Volumetric flow rate table, q(ds,dp) parameter

• `Maintain last value` — The valve freezes at its last value. The table shows which value the block uses depending on the setting of the Orifice parameterization parameter.

Orifice parameterization Parameter SettingFreeze Position Value
```Linear - Area vs. spool travel```The valve open area when the trigger occurred
```Tabulated data - Area vs. spool travel```The valve open area when the trigger occurred
```Tabulated data - Volumetric flow rate vs. spool travel and pressure drop```Current position

Note that when you set Orifice parameterization to ```Tabulated data - Volumetric flow rate vs. spool travel and pressure drop```, the volumetric flow rate continues to change according to pressure changes in the valve after the valve freezes.

Due to numerical smoothing at the extremes of the valve area, the block applies a minimum area that is larger than the , and a maximum that is smaller than the Maximum orifice area, in proportion to the Smoothing factor value.

After the fault triggers, the valve remains at the faulted area for the rest of the simulation.

## Ports

### Conserving

expand all

Isothermal liquid conserving port.

Isothermal liquid conserving port.

### Input

expand all

Physical signal associated with the spool displacement, in m. A positive value causes the valve to open.

Physical signal port associated with the external fault trigger. Triggering occurs when the value is greater than 0.5.

#### Dependencies

To enable this port, set Enable faults to `On` and Fault trigger to `External`.

## Parameters

expand all

### Model Parameterization

Method the block uses to calculate the valve flow area. To learn more, see Orifice Parameterizations.

Position of the spool travel member when the valve is fully open. The default value represents a zero-lapped system. A positive, nonzero value represents an underlapped, or partially closed, system. A negative, nonzero value represents an overlapped system where the valve remains open over a range of displacements.

Spool offset at the maximum valve opened area.

#### Dependencies

To enable this parameter, set Orifice parametrization to ```Linear - area vs. spool travel```.

Maximum valve area experienced during simulation.

#### Dependencies

To enable this parameter, set Orifice parametrization to ```Linear - area vs. spool travel```.

Sum of all gaps when the valve is in the fully closed position. The block maintains any area smaller than this value at the specified leakage area. This parameter contributes to numerical stability by maintaining continuity in the flow.

#### Dependencies

To enable this parameter, set Orifice parametrization to ```Linear - area vs. spool travel```.

Vector of control member travel distances. A positive value opens the valve. The values in this vector correspond one-to-one to values in the Orifice area vector parameter. The values must ascend from 0. The block interpolates the points linearly.

#### Dependencies

To enable this parameter, set Orifice parametrization to ```Tabulated data - Area vs. spool travel```.

Vector of valve area values for the tabular parametrization of opening area. The values in this vector correspond one-to-one with the elements in the Spool travel vector parameter. The first element of this vector is the leakage area, and the last element is the maximum valve area. The block interpolates the points linearly.

#### Dependencies

To enable this parameter, set Orifice parametrization to ```Tabulated data - Area vs. spool travel```.

Vector of control member travel distances. The spool travel vector forms an independent axis with the Pressure drop vector, dp parameter for the 3-D dependent Volumetric flow rate table, q(ds,dp) parameter. A positive displacement corresponds to valve opening. The values ascend from 0. The block interpolates the points linearly.

#### Dependencies

To enable this parameter, set Orifice parametrization to ```Tabulated data - Volumetric flow rate vs. spool travel and pressure drop```.

Vector of pressure drop values for the volumetric flow rate. The pressure drop vector forms an independent axis with the Spool travel vector, ds parameter for the 3-D dependent Volumetric flow rate table, q(ds,dp) parameter. The values must be positive and ascending. The block interpolates the points linearly

#### Dependencies

To enable this parameter, set Orifice parametrization to ```Tabulated data -Volumetric flow rate vs. spool travel and pressure drop```.

M-by-N matrix of volumetric flow rates based on independent values of pressure drop and spool travel distance. M and N are the sizes of the correlated vectors:

• M is the number of elements in the Pressure drop vector, dp parameter.

• N is the number of elements in the parameter.

#### Dependencies

To enable this parameter, set Orifice parametrization to ```Tabulated data - Volumetric flow rate vs. spool travel and pressure drop```.

Discharge loss for a hydraulic structure. The default discharge coefficient for an valve in Simscape™ Fluids™ is 0.64.

#### Dependencies

To enable this parameter, set Orifice parametrization to either:

• ```Tabulated data - Area vs. spool travel```

• ```Linear - area vs. spool travel```

Upper Reynolds number limit for laminar flow through the valve.

#### Dependencies

To enable this parameter, set Orifice parametrization to either:

• ```Tabulated data - Area vs. spool travel```

• ```Linear - area vs. spool travel```

Continuous smoothing factor that introduces a layer of gradual change based to the flow response when the valve is in near-open and near-closed positions. To increase the stability of your simulation in these regimes, set this parameter to a nonzero value less than one.

#### Dependencies

To enable this parameter, set Orifice parametrization to ```Linear - area vs. spool travel```.

Whether to account for pressure increase when the fluid flows from a region of smaller cross-sectional area to a region of larger cross-sectional area.

Cross-sectional area at ports A and B. The block uses this area in the pressure-flow rate equation to determine the volumetric flow rate through the valve.

#### Dependencies

To enable this parameter, set Orifice parametrization to either:

• ```Tabulated data - Area vs. spool travel```

• ```Linear - area vs. spool travel```

### Faults

Enable externally or temporally triggered faults. When a fault occurs, the block sets the valve area to the value specified in the Spool position when faulted parameter.

Sets the faulted valve spool position. You can choose for the valve to seize when the spool is in the positive position, negative position, or at the position when the fault triggers.

#### Dependencies

To enable this parameter, set Enable faults to `On`.

Whether a fault occurs due to an external event or at a specified time.

• `External` — A physical signal at port Tr that is greater than `0.5` triggers a fault.

• `Temporal` — The block sets the valve area to the value specified in the Spool position when faulted parameter once the simulation reaches the time specified in the Simulation time for fault event parameter.

#### Dependencies

To enable this parameter, set Enable faults to `On`.

Simulation time when fault occurs.

#### Dependencies

To enable this parameter, set Enable faults to `On` and Fault trigger to `Temporal`.

## Version History

Introduced in R2020a