MapleSim Hydraulics Library from Modelon
Spool_4_2_X Template for a spool with 2 positions and four ports to be configured by the user
Use the Spool_4_2_X component to build your own model of a directional control valve with two positions (that is, two stable states) and four ports.
Enter the valve behavior in the Parameters Spool Geometry section (found under the Inspector tab) by populating the six connection vectors (open_P_A, open_P_B, open_A_T, open_B_T, open_P_T, and open_A_B). Each vector has five entries corresponding to the five normalized spool positions [ 0 0.25 0.5 0.75 1 ]. Enter a 1 for the spool position if the connection is open at that spool position; enter a 0 for the spool position if the connection is closed at that spool position.
The Example section on this page provides more detail on how to configure a custom spool, including information on setting the parameters for leakage and nominal flow rates between ports.

Example


The following valve sketch will be used for this example:
Note: Information on how to sketch a valve is in the Sketching a Valve section on this page.
To enter the data for your custom valve into MapleSim
1.

In MapleSim, under the Libraries tab, browse to Modelon Hydraulics Directional Control Basic, and drag a Spool 4 2 X component to the Model Workspace.

2.

Under the Inspector tab, browse to the Parameters Spool geometry section. The spool position (xaxis) is already given in the vector spool_x_axis with marks at [ 0 0.25 0.5 0.75 1 ]. Enter values of either 1 or 0 in the vectors open_P_A, open_P_B, open_A_T, open_B_T, open_P_T, and open_A_B. Enter 1 if there is a connection between the ports at the respective position; enter 0 when there is no connection. For this example, the vectors are as follows:

open_P_A = [ 0 0 1 0 0 ]
open_P_B = [ 0 0 1 1 1 ]
open_A_T = [ 0 0 1 1 1 ]
open_B_T = [ 0 0 1 0 0 ]
open_P_T = [ 1 1 1 0 0 ]
open_A_B = [ 0 0 0 0 0 ]
3.

Specify the nominal data for the pressure drop (in the Parameters Flow section). This value is used to calculate the flow resistance for all six flow paths.

4.

Specify the nominal data for the flow rates for the six flow paths: qnom_P_A, qnom_P_B, qnom_A_T, qnom_B_T, qnom_P_T, and qnom_A_B. The parameter qnom gives the nominal flow rate of the fully opened flow path at the pressure drop .

For example, the maximum diameter for the flow path from P to B is given by :
5.

Enter a value for .

When the valve is not activated, there is leakage from P A, P B, A T, B T, P T, and A B. This leakage flow is described by the diameter of an equivalent orifice . If in doubt about the value for , build a small model consisting of a pressure source, an orifice, and a tank and vary the orifice diameter until the required flow rate is reached at the specified pressure.
6.

Enter values for P_max and coeff_P.

When the pump pressure and the flow rate are high, the unbalanced forces and flow forces acting on the spool are higher than the force generated by the solenoid and the valve is partially closed. This effect can be modeled by the parameters P_max and coeff_P. Specify the maximum hydraulic power in (where the valve is still completely open) and use coeff_P to adjust the model to the manufacturer's data.
7.

(Optional) To give your custom valve the correct icon, convert the Spool 4 2 X component to a subsystem, and then draw an icon on the subsystem.

8.

Save the model and build a small test circuit to compare the catalogue data with the model.



Sketching a Valve


This is a brief discussion on how to generate the connection versus spool position plots for a valve. We will be using the following valve icon as an example.
The preceding figure shows a valve with four ports (A, B, P, and T) and two states based on two spool positions. The connections and flow paths for the three states are given in the following table.
Spool Position

Command signals

Flow paths

0 (Left square)


Flow from P T.

+1 (Right Square)


Flow from P B. Flow from A T.



To generate the connection versus spool position plots for a valve
1.

Redraw your valve icon as two large separate squares (one for each stable position). Include all arrows and lines connecting the ports.

2.

Sketch 1 smaller square for connections between the stable positions (see your valve catalogue for details). This smaller square represents the transition between the two stable positions.

4.

For flow path P A, sketch the connection as a function of spool position. A 1 means the connection is open, a 0 means there is no connection.

a.

Left square: if there is flow from P A (arrow from P to A in the left square), put marks at x = 0 and y = 1 and x = 0.25 and y = 1. If there is no flow from P A (no arrow from P to A in the left square), put marks at x = 0 and y = 0 and x = 0.25 and y = 0.

b.

Right square: if there is flow from P A (arrow from P to A in the right square), put marks at x = 0.75 and y = 1, x = 1 and y = 1. If there is no flow from P A (no arrow from P to A in the right square), put marks at x = 0.75 and y = 0, x = 1 and y = 0.

c.

Small square (intermediate position): if there is flow from P A (arrow from P to A in the small middle square), put marks at x = 0.5 and y = 1. If there is no flow from P A (no arrow from P to A in the small middle square), put marks at x = 0.5 and y = 0.

The P A connection versus spool position plot for the valve in this example is represented in the following figure.


Variables


Name

Value

Units

Description

Modelica ID





mor_P_A





mor_B_T





mor_P_B





mor_A_T





mor_A_B





mor_P_T





checkFlow





command_diameter





port_pressure





port_flow


[1]


Gas saturation pressure

p_sat




Absolute pressure at port P

pP_abs




Pressure at port A

summary_pA




Pressure at port B

summary_pB




Pressure at port P

summary_pP




Pressure at port T

summary_pT




Pressure drop

summary_dp_PA




Pressure drop

summary_dp_PB




Pressure drop

summary_dp_AT




Pressure drop

summary_dp_BT




Flow rate flowing port_P to port_A

summary_qPA




Flow rate flowing port_P to port_B

summary_qPB




Flow rate flowing port_A to port_T

summary_qAT




Flow rate flowing port_B to port_T

summary_qBT





spoolGeometry



1.

[1]



Connections


Name

Description

Modelica ID


Port A, one of valve connections to actuator or motor

port_A


Port B, one of valve connections to actuator or motor

port_B


Port P, where oil enters the component from the pump

port_P


Port T, where oil flows to the tank

port_T


Command signal for spool position

spool_position



oil





Parameters



General Parameters


Name

Default

Units

Description

Modelica ID

flow path A to B



There is a spool position with flow from port A to B

flowPath_AB

flow path P to T



There is a spool position with flow from port P to T

flowPath_PT




Temperature offset from system temperature

dT_system





Flow Parameters


Name

Default

Units

Description

Modelica ID

use CheckFlow



True, if a warning should be printed to user

useCheckFlow




Pressure drop at nominal flow rate qnom

dpnom




Nominal flow rate from P > A

qnom_P_A




Nominal flow rate from P > B

qnom_P_B




Nominal flow rate from A > T

qnom_A_T




Nominal flow rate from B > T

qnom_B_T




Nominal flow rate from A > B

qnom_A_B




Nominal flow rate from P > T

qnom_P_T




Max. hydraulic power

P_max




Influence of hydraulic power on flow rate

coeff_P




Laminar part of orifice model

k1




Turbulent part of orifice model,

k2





Spool Geometry Parameters


Name

Default

Units

Description

Modelica ID




Normalized spool position

spool_x_axis




Open (1) and closed (0) path P > A as function of normalized spool position

open_P_A




Open (1) and closed (0) path P > B as function of normalized spool position

open_P_B




Open (1) and closed (0) path A > T as function of normalized spool position

open_A_T




Open (1) and closed (0) path B > T as function of normalized spool position

open_B_T




Open (1) and closed (0) path P > T as function of normalized spool position

open_P_T




Open (1) and closed (0) path A > B as function of normalized spool position

open_A_B




Diameter of equivalent orifice to model leakage of closed valve

dleak





Constant Parameters


Name

Default

Units

Description

Modelica ID


[spool_x_axis; open_P_A; open_P_B; open_A_T; open_B_T; open_A_B; open_P_T]



spool_data





