DCV_4_2_X $—$ Template for a directional control valve with 2 positions and four ports to be configured by the user

Use the DCV_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 $\to$ Spool Geometry section (found under the Properties 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.

 1 In MapleSim, under the Libraries tab, browse to Modelon Hydraulics $\to$ Directional Control, and drag a DCV 4 2 X component to the Model Workspace.
 2 Under the Properties tab ( ), browse to the Parameters $\to$ Spool geometry section. The spool position (x-axis) is already given in the vector spool_x_axis with marks at [0, 0.25, 0.5, 0.75, 1]. You need to enter values of 1 or 0 in the vectors open_P_A, open_P_B, open_A_T, open_B_T, open_P_T, open_A_B. Enter 1 if there is a connection between the respective ports and 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 ${\mathrm{Δp}}_{\mathrm{nom}}$ (in the Parameters $\to$ 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 ${\mathrm{Δp}}_{\mathrm{nom}}$.

${A}_{\mathrm{max}}={q}_{\mathrm{nom}}\sqrt{\frac{1}{2}\frac{\mathrm{\rho }{k}_{2}}{{\mathrm{Δp}}_{\mathrm{nom}}}}$

${d}_{\mathrm{max}}=2\sqrt{\frac{{A}_{\mathrm{max}}}{\mathrm{\pi }}}$

For example, the maximum diameter for the flow path from P to B is given by ${d}_{\mathrm{max}\left(\mathrm{PB}\right)}$:

${A}_{\mathrm{max}\left(\mathrm{PB}\right)}={q}_{\mathrm{nom}\left(\mathrm{PB}\right)}\sqrt{\frac{1}{2}\frac{\mathrm{\rho }{k}_{2}}{{\mathrm{Δp}}_{\mathrm{nom}}}}$

${A}_{\mathrm{max}\left(\mathrm{PB}\right)}={q}_{\mathrm{nom}\left(\mathrm{PB}\right)}\sqrt{\frac{1}{2}\frac{\mathrm{\rho }{k}_{2}}{{\mathrm{Δp}}_{\mathrm{nom}}}}$

${d}_{\mathrm{max}\left(\mathrm{PB}\right)}=2\sqrt{\frac{{A}_{\mathrm{max}\left(\mathrm{PB}\right)}}{\mathrm{\pi }}}$

 5 Enter a value for ${d}_{\mathrm{leak}}$.

When the valve is not activated, there is leakage from P $\to$ A, P $\to$ B, A $\to$ T, B $\to$ T, P $\to$ T, and A $\to$ B. Leakage flow is described by the diameter of an equivalent orifice, ${d}_{\mathrm{leak}}$. If in doubt, 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. The effect can be modeled by the parameters P_max and coeff_P. Specify the maximum hydraulic power in $W$ (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 DCV 4 2 X component to a subsystem, and then draw its icon.
 8 Save the model and build a small test circuit to compare the catalogue data with the model.

Use the modifier(s)

VolumeA(port_A(p(start=1e5,fixed=true)))

and/or

VolumeB(port_A(p(start=1e5,fixed=true)))

and/or

VolumeP(port_A(p(start=1e5,fixed=true)))

and/or

VolumeT(port_A(p(start=1e5,fixed=true)))

to set the initial condition(s) for the pressure of the lumped volume(s) $\left[\mathrm{Pa}\right]$.

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) $\mathrm{commandB}=\mathrm{false}$ Flow from P $\to$ T. +1 (Right Square) $\mathrm{commandB}=\mathrm{true}$ Flow from P $\to$ B. Flow from A $\to$ 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 a smaller square between the left and right square (see valve catalogue for details). This smaller square represents the intermediate position that occurs between the left and right squares (that is, $\mathrm{commandB}$ is neither $\mathrm{true}$ nor $\mathrm{false}$). Your sketch should look like the following figure:

 3 Draw six horizontal lines representing the six possible flow paths: P $\to$ A, P $\to$ B, A $\to$ T, B $\to$ T, P $\to$ T, A $\to$ B. The x-axes represent the spool position [0..1] and the y-axes the connection states (1 or 0).
 4 For the P $\to$ A flow path, sketch the connection as a function of spool position. A 1 for the connection state means that the connection is open; a 0 means that there is no connection.
 a. Left square: if there is flow from P $\to$ A (that is, an arrow from P to A in the left square), put marks at x = 0 and y = 1 and at x = 0.25 and y = 1. If there is no flow from P $\to$ A (no arrow from P to A in the left square), put marks at x = 0 and y = 0 and at x = 0.25 and y = 0.
 b. Right square: if there is flow from P $\to$ A, put marks at x = 0.75 and y = 1 and at x = 1 and y = 1. If there is no flow from P $\to$ A, put marks at x = 0.75 and y = 0 and at x = 1 and y = 0.
 c. Smaller square (intermediate position): if there is flow from P $\to$ A, put a mark at x = 0.5 and y = 1. If there is no flow from P $\to$ A, put a mark at x = 0.5 and y = 0.

The P $\to$ A connection versus spool position plot for the valve in this example is given in the following figure.

 1 Repeat the marking process for the other flow paths: P $\to$ B, A $\to$ T, B $\to$ T, P $\to$ T, A $\to$ B. For this example, the connection versus spool position plots for all six connections is given in the following figure.

Variables

 Name Value Units Description Modelica ID $\mathrm{p_A}\left(\mathrm{summary}\right)$ $\mathrm{spool_42.p_A}$ $\mathrm{Pa}$ Pressure at port A summary_pA $\mathrm{p_B}\left(\mathrm{summary}\right)$ $\mathrm{spool_42.p_B}$ $\mathrm{Pa}$ Pressure at port B summary_pB $\mathrm{p_P}\left(\mathrm{summary}\right)$ $\mathrm{spool_42.p_P}$ $\mathrm{Pa}$ Pressure at port P summary_pP $\mathrm{p_T}\left(\mathrm{summary}\right)$ $\mathrm{spool_42.p_T}$ $\mathrm{Pa}$ Pressure at port T summary_pT ${\mathrm{Δp}}_{\mathrm{PA}\left(\mathrm{summary}\right)}$ [1] $\mathrm{Pa}$ Pressure drop summary_dp_PA ${\mathrm{Δp}}_{\mathrm{PB}\left(\mathrm{summary}\right)}$ [2] $\mathrm{Pa}$ Pressure drop summary_dp_PB ${\mathrm{Δp}}_{\mathrm{AT}\left(\mathrm{summary}\right)}$ [3] $\mathrm{Pa}$ Pressure drop summary_dp_AT ${\mathrm{Δp}}_{\mathrm{BT}\left(\mathrm{summary}\right)}$ [4] $\mathrm{Pa}$ Pressure drop summary_dp_BT ${V}_{A}$ VolumeA ${V}_{B}$ VolumeB ${V}_{P}$ VolumeP $\mathrm{coil}$ coil $\mathrm{spool_42}$ spool_4_2 ${V}_{T}$ VolumeT $\mathrm{q_PA}\left(\mathrm{summary}\right)$ $\mathrm{spool_42.mor_PA.q}$ $\frac{{m}^{3}}{s}$ Flow rate flowing port_P to port_A summary_qPA $\mathrm{q_PB}\left(\mathrm{summary}\right)$ $\mathrm{spool_42.mor_PB.q}$ $\frac{{m}^{3}}{s}$ Flow rate flowing port_P to port_B summary_qPB $\mathrm{q_AT}\left(\mathrm{summary}\right)$ $\mathrm{spool_42.mor_AT.q}$ $\frac{{m}^{3}}{s}$ Flow rate flowing port_A to port_T summary_qAT $\mathrm{q_BT}\left(\mathrm{summary}\right)$ $\mathrm{spool_42.mor_BT.q}$ $\frac{{m}^{3}}{s}$ Flow rate flowing port_B to port_T summary_qBT

 1 [1] $\mathrm{spool_42.port_P.p}-\mathrm{spool_42.port_A.p}$
 2 [2] $\mathrm{spool_42.port_P.p}-\mathrm{spool_42.port_B.p}$
 3 [3] $\mathrm{spool_42.port_A.p}-\mathrm{spool_42.port_T.p}$
 4 [4] $\mathrm{spool_42.port_B.p}-\mathrm{spool_42.port_T.p}$

Connections

 Name Description Modelica ID ${\mathrm{port}}_{A}$ Port A, one of valve connections to actuator or motor port_A ${\mathrm{port}}_{B}$ Port B, one of valve connections to actuator or motor port_B ${\mathrm{port}}_{P}$ Port P, where oil enters the component from the pump port_P ${\mathrm{port}}_{T}$ Port T, where oil flows to the tank port_T $\mathrm{commandB}$ Command signal for valve commandB $\mathrm{oil}$ oil

Parameters

General Parameters

 Name Default Units Description Modelica ID use volume A $\mathrm{true}$ If true, a volume is present at port_A useVolumeA use volume B $\mathrm{true}$ If true, a volume is present at port_B useVolumeB use volume P $\mathrm{true}$ If true, a volume is present at port_P useVolumeP use volume T $\mathrm{true}$ If true, a volume is present at port_T useVolumeT ${V}_{A}$ ${10}^{-6}$ ${m}^{3}$ Geometric volume at port A volumeA ${V}_{B}$ ${10}^{-6}$ ${m}^{3}$ Geometric volume at port B volumeB ${V}_{P}$ ${10}^{-6}$ ${m}^{3}$ Geometric volume at port P volumeP ${V}_{T}$ ${10}^{-6}$ ${m}^{3}$ Geometric volume at port T volumeT ${\mathrm{ΔT}}_{\mathrm{system}}$ $0$ $K$ Temperature offset from system temperature dT_system

Dynamic Parameters

 Name Default Units Description Modelica ID ${\mathrm{\tau }}_{\mathrm{opening}}$ $0.03$ $s$ Switching time to open valve 95% tau_opening ${\mathrm{\tau }}_{\mathrm{closing}}$ $0.02$ $s$ Switching time to close valve 95% tau_closing

Flow Parameters

 Name Default Units Description Modelica ID ${\mathrm{Δp}}_{\mathrm{nom}}$ $7.·{10}^{5}$ $\mathrm{Pa}$ Pressure drop at nominal flow rate qnom dpnom ${q}_{\mathrm{nom}\left(\mathrm{PA}\right)}$ $0.00158$ $\frac{{m}^{3}}{s}$ Nominal flow rate from P -> A qnom_P_A ${q}_{\mathrm{nom}\left(\mathrm{PB}\right)}$ ${q}_{\mathrm{nom}\left(\mathrm{PA}\right)}$ $\frac{{m}^{3}}{s}$ Nominal flow rate from P -> B qnom_P_B ${q}_{\mathrm{nom}\left(\mathrm{AT}\right)}$ ${q}_{\mathrm{nom}\left(\mathrm{PA}\right)}$ $\frac{{m}^{3}}{s}$ Nominal flow rate from A -> T qnom_A_T ${q}_{\mathrm{nom}\left(\mathrm{BT}\right)}$ ${q}_{\mathrm{nom}\left(\mathrm{PA}\right)}$ $\frac{{m}^{3}}{s}$ Nominal flow rate from B -> T qnom_B_T ${q}_{\mathrm{nom}\left(\mathrm{PT}\right)}$ $0$ $\frac{{m}^{3}}{s}$ Nominal flow rate from P -> T qnom_P_T ${q}_{\mathrm{nom}\left(\mathrm{AB}\right)}$ $0$ $\frac{{m}^{3}}{s}$ Nominal flow rate from A -> B qnom_A_B ${P}_{\mathrm{max}}$ $1.26·{10}^{5}$ $W$ Max. hydraulic power P_max ${\mathrm{coeff}}_{P}$ $10$ Influence of hydraulic power on flow rate coeff_P ${k}_{1}$ $10$ Laminar part of orifice model k1 ${k}_{2}$ $2$ Turbulent part of orifice model, ${k}_{2}=\frac{1}{{C}_{d}^{2}}$ k2

Spool Geometry Parameters

 Name Default Units Description Modelica ID ${\mathrm{spool}}_{x-\mathrm{axis}}$ $\left[0.,0.250,0.500,0.750,1.\right]$ Normalized spool position spool_x_axis ${\mathrm{open}}_{\mathrm{PA}}$ $\left[0.,0.,0.,0.,0.\right]$ Open (1) and closed (0) path P -> A as function of normalized spool position open_P_A ${\mathrm{open}}_{\mathrm{PB}}$ $\left[0.,0.,0.,0.,0.\right]$ Open (1) and closed (0) path P -> B as function of normalized spool position open_P_B ${\mathrm{open}}_{\mathrm{AT}}$ $\left[0.,0.,0.,0.,0.\right]$ Open (1) and closed (0) path A -> T as function of normalized spool position open_A_T ${\mathrm{open}}_{\mathrm{BT}}$ $\left[0.,0.,0.,0.,0.\right]$ Open (1) and closed (0) path B -> T as function of normalized spool position open_B_T ${\mathrm{open}}_{\mathrm{PT}}$ $\left[0.,0.,0.,0.,0.\right]$ Open (1) and closed (0) path P -> T as function of normalized spool position open_P_T ${\mathrm{open}}_{\mathrm{AB}}$ $\left[0.,0.,0.,0.,0.\right]$ Open (1) and closed (0) path A -> B as function of normalized spool position open_A_B ${d}_{\mathrm{leak}}$ $1.67·{10}^{-5}$ $m$ Diameter of equivalent orifice to model leakage of closed valve; P -> A, P -> B,A -> T, B -> T dleak