Main Content

Model a Pressure Relief Valve in the Position-Based Translational Domain

This example shows how to model a pressure relief valve in the position-based translational mechanical network. This example is the first in a series. To learn about how to model other kind of valves, see Model a Spring in Chamber with Composite Components in the Position-Based Translational Domain.

Model the Valve

In this example, you model a pressure relief valve. The valve uses a pre-tensioned spring to push a poppet into its seat to close the valve. The valve opens when the inlet pressure induces a fluid force on the poppet larger than the closing force of the spring. The model uses the Spring in Chamber and Conical Poppet Valve custom component blocks to model a relief valve that consists of two pieces. The Spring in Chamber and the Conical Poppet Valve blocks are composite component blocks built from other Simscape™ blocks and equations, such as springs, masses, spacers, and hard stops.

You can use composite components to build complex blocks from Simscape blocks, which has several advantages. Well designed fundamental blocks can make building complex blocks simpler because the new blocks can build upon previous work. It is also easier to maintain libraries constructed from simpler blocks because any changes to a lower level block automatically propagates to any blocks that use it. You can see the custom components in this example by opening the custom library PositionBasedValve_lib.

Open and simulate the model.

open_system('PositionBasedPressureReliefValveNegative');
set_param('PositionBasedPressureReliefValveNegative/Conical Poppet Valve', 'hardstop_force_specify','off'); % This is the default behavior 
sim('PositionBasedPressureReliefValveNegative');

In this model, the Spring in Chamber block is preloaded, which pushes the Conical Poppet Valve block into its seat and closes the valve.

Plot the logged forces and poppet positions by entering this code at the Command Window.

h = figure;
h.Position(3:4) = [1120 420];
t = tiledlayout(1,2);
nexttile(1);
PositionBasedPressureReliefValvePlotForces('PositionBasedPressureReliefValveNegative', 'noCheckSimLog');
nexttile(2);
PositionBasedPressureReliefValvePlotLocation('PositionBasedPressureReliefValveNegative', 'noCheckSimLog');

Figure contains 2 axes objects. Axes object 1 with title Valve Forces, xlabel Time (s), ylabel Force (N) contains 4 objects of type line. One or more of the lines displays its values using only markers These objects represent Fluid Force, Poppet Hardstop Force, Chamber Spring Force, Chamber Hardstop Force. Axes object 2 with title Poppet Displacement, xlabel Time (s), ylabel Displacement (mm) contains an object of type line. This object represents Poppet Location.

At t = 0, the Spring in Chamber block hard stop is not in contact and has zero force. This hard stop represents the contact of the two piston heads. The Conical Poppet Valve block hard stop represents the contact when the poppet is in the seat. The Spring in Chamber block spring force and the Conical Poppet Valve block hard stop force are balanced and both have a value of 100 N between 0 and 1 seconds, which is the value of the Pre-load parameter in the Spring in Chamber block. Both the Spring in Chamber spring and Conical Poppet Valve hard stop forces are positive, which indicates that they are both in states of compression.

At t ≈ 1.1 seconds, the fluid pressure at port Af in the Conical Poppet Valve block begins to increase. The Conical Poppet Valve hard stop force drops to 0 as the valve begins to open. The spring force increases as the valve opens, which indicates the increased compression of the spring. The force induced on the poppet by the fluid pressure increases. The positive polarity of the fluid force indicates that it drives the valve open. There is no visible F port because it is the grounded casing, but a positive fluid force indicates that the fluid drives the poppet at port B away from the casing at port F, which is in the negative direction.

If you configure the pressure relief valve to open with positive poppet displacement, port B is the grounded casing and port F is exposed. In this case, a positive force indicates that ports B and F are being driven away from each other, which results in a positive displacement at port F. The hidden grounded node at port B or F is the reason that the force convention of this one-port block matches that of two-port blocks. The Conical Poppet Valve block is a two-port block, with one hidden grounded node.

At t ≈ 6.8 seconds, the hard stop in the Spring in Chamber block is contacted and its force starts to increase. The positive sign indicates a compressive state.

Initialize Force

Plot the model behavior at the beginning of the simulation. This figure shows the model behavior at t=0 and shortly after. The rapid transient behavior indicates that the model is not cleanly initialized.

set_param('PositionBasedPressureReliefValveNegative/Conical Poppet Valve', 'hardstop_force_specify','off'); % This is the default behavior 
PositionBasedPressureReliefValvePlotForces('PositionBasedPressureReliefValveNegative');
xlim([0, 0.0001]);
ylim([0, 200]);

Figure PositionBasedPressureReliefValveNegative contains an axes object. The axes object with title Valve Forces, xlabel Time (s), ylabel Force (N) contains 4 objects of type line. One or more of the lines displays its values using only markers These objects represent Fluid Force, Poppet Hardstop Force, Chamber Spring Force, Chamber Hardstop Force.

To initialize cleanly, the initial Conical Poppet Valve hard stop force must balance the Spring in Chamber preload force. In the Conical Poppet Valve block, set the value of the Poppet seat force initial target to match the value of the Pre-load parameter in the Spring in Chamber block, 100 N. Set the value of the Priority parameter to High.

To set the block parameters at the command line, enter:

set_param('PositionBasedPressureReliefValveNegative/Conical Poppet Valve', 'hardstop_force_specify','on'); % Initialize force to non-default value
sim('PositionBasedPressureReliefValveNegative');
PositionBasedPressureReliefValvePlotForces('PositionBasedPressureReliefValveNegative');
xlim([0, 0.0001]);
ylim([0, 200]);

Figure PositionBasedPressureReliefValveNegative contains an axes object. The axes object with title Valve Forces, xlabel Time (s), ylabel Force (N) contains 4 objects of type line. One or more of the lines displays its values using only markers These objects represent Fluid Force, Poppet Hardstop Force, Chamber Spring Force, Chamber Hardstop Force.

Setting the force variable initial targets initializes the model in steady-steady state without oscillations.

Compare Positive and Negative Opening Values

The Conical Poppet Valve block can also open when the poppet displaces in the positive direction. Open the PositionBasedPressureReliefValvePositive model. The PositionBasedPressureReliefValvePositive model is equivalent to the PositionBasedPressureReliefValveNegative model, but the poppet displaces in the positive direction. In addition to the change to the poppet opening direction, the model includes an additional Spacer block because the knob side of the relief valve is connected the maximum location in the model. The value of the Length initial target in the Spacer block is the sum of the knob length and the starting length of the spring, 95 mm.

open_system('PositionBasedPressureReliefValvePositive');

Compare the forces in both poppet orientations. The two models return the same results. The results are consistent with the force convention of two-port position-based translational blocks. Positive forces induce component ports to separate and negative forces drive them together.

PositionBasedPressureReliefValvePlotCompare

Figure contains 2 axes objects. Axes object 1 with title Valve Forces: Negative Poppet, xlabel Time (s), ylabel Force (N) contains 4 objects of type line. One or more of the lines displays its values using only markers These objects represent Fluid Force, Poppet Hardstop Force, Chamber Spring Force, Chamber Hardstop Force. Axes object 2 with title Valve Forces: Positive Poppet, xlabel Time (s), ylabel Force (N) contains 4 objects of type line. One or more of the lines displays its values using only markers These objects represent Fluid Force, Poppet Hardstop Force, Chamber Spring Force, Chamber Hardstop Force.

See Also

Topics