Simple cylinder

exercise image

Show the model or download it
model Cylinder
parameter SFPLibDyn.Units.Pressure param_RV_pcrack = 1e7 "RV cracking pressure";
parameter SFPLibDyn.Units.Volume param_pump_displ = 5e-06 "pump displacement";
parameter SFPLibDyn.Units.Dimensionless param_load_force = 1200 "load force (N)";

SFPLibDyn.Hydraulic.Valves.ReliefValve RV( is_set = false, p_crack = param_RV_pcrack) annotation(
    Placement(transformation(origin = {-12, -101}, extent = {{14, -14}, {-14, 14}}, rotation = -180)));
SFPLibDyn.Signals.Source.Constant rpm(k = 1000) annotation(
    Placement(transformation(origin = {-116, -93}, extent = {{-10, -10}, {10, 10}})));
SFPLibDyn.Mechanical.Translational.Mass mass(coeff_viscous(displayUnit = "N/(m/s)") = 30, endstops_model = SFPLibDyn.Units.Choices.mass_type.Ideal, high_lim = 0.06, low_lim = 0, mass(displayUnit = "kg") = 10) annotation(
    Placement(transformation(origin = {48, 124}, extent = {{-12, -12}, {12, 12}})));
SFPLibDyn.Hydraulic.Volumes.Volume3p vol_pump( pressure(displayUnit = "Pa"), vol_0 = 0.001000000000000001) annotation(
    Placement(transformation(origin = {-12, -67}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
SFPLibDyn.Mechanical.Translational.Sources.ForceSource force(direction = -1, scale = 1) annotation(
    Placement(transformation(origin = {80, 124}, extent = {{10, -10}, {-10, 10}})));
SFPLibDyn.Signals.Source.Constant force_signal(k = param_load_force) annotation(
    Placement(transformation(origin = {108, 124}, extent = {{10, -10}, {-10, 10}})));
SFPLibDyn.Signals.Source.LinearStages Pilot(stage1_duration = 1, stage1_end = 0, stage2_duration = 0.1, stage2_end = 1, stage3_duration = 2- 0.1, stage3_end = 1, stage4_duration = 0.1, stage4_end = -1, stage5_end = -1) annotation(
    Placement(transformation(origin = {-38, 37}, extent = {{10, 10}, {-10, -10}}, rotation = 180)));
SFPLibDyn.Mechanical.Rotational.Sources.Motor motor annotation(
    Placement(transformation(origin = {-87, -93}, extent = {{-14, -14}, {14, 14}})));
SFPLibDyn.Hydraulic.Valves.DirControlValves.DirValves4x3.DirValv4x3C01 Distributor(AT_k_area = {1, 0, 0}, AT_p_ch = 399999.9999999999, AT_q_ch = 0.00025, BT_k_area = {0, 0, 1}, BT_p_ch = 399999.9999999999, BT_q_ch = 0.00025, PA_k_area = {0, 0, 1}, PA_p_ch = 200000, PA_q_ch = 0.00025, PB_k_area = {1, 0, 0}, PB_p_ch = 200000, PB_q_ch = 0.00025, PT_k_area = {0, 0, 0}, signal = {-1, 0, 1}) annotation(
    Placement(transformation(origin = {11.0907, 39.8996}, extent = {{-25.0632, -13.367}, {25.0632, 13.367}})));
SFPLibDyn.Hydraulic.Orifices.Orifice orifice( or_model = SFPLibDyn.Units.Choices.orifice_type.PQChar, p_ch = 200000, q_ch = 0.00025) annotation(
    Placement(transformation(origin = {36, -48}, extent = {{-6, -12}, {6, 12}})));
SFPLibDyn.Hydraulic.Sources.Pumps.FixedUniDirPump pump(is_set = false, max_displ = param_pump_displ) annotation(
    Placement(transformation(origin = {-48, -93}, extent = {{-15, -15}, {15, 15}})));
SFPLibDyn.Hydraulic.Sources.Tank tank annotation(
    Placement(transformation(origin = {-48, -139}, extent = {{-6, -3}, {6, 6}})));
SFPLibDyn.Hydraulic.Sources.Tank tank1 annotation(
    Placement(transformation(origin = {-12, -139}, extent = {{-6, -3}, {6, 6}})));
SFPLibDyn.Hydraulic.Sources.Tank tank2 annotation(
    Placement(transformation(origin = {36, -139}, extent = {{-6, -3}, {6, 6}})));
SFPLibDyn.Hydraulic.Volumes.Volume2p vol_P(vol_0 = 5.000000000000003e-05) annotation(
    Placement(transformation(origin = {-12, 0}, extent = {{-10, -10}, {10, 10}})));
SFPLibDyn.Hydraulic.Volumes.Volume2p vol_T(vol_0 = 5.000000000000003e-05) annotation(
    Placement(transformation(origin = {36, -1}, extent = {{-10, -10}, {10, 10}})));
SFPLibDyn.Hydraulic.Volumes.Volume2p vol_A(vol_0 = 1e-5) annotation(
    Placement(transformation(origin = {-13, 80}, extent = {{-10, -10}, {10, 10}})));
SFPLibDyn.Hydraulic.Volumes.Volume2p vol_B(vol_0 = 1e-5) annotation(
    Placement(transformation(origin = {25, 80}, extent = {{-10, -10}, {10, 10}})));
SFPLibDyn.Hydraulic.Actuators.Cylinders.Cylinder Cylinder(coeff_viscous = 30, d_piston = 0.07, d_rod = 0.025, stroke = 0.06) annotation(
    Placement(transformation(origin = {6, 124}, extent = {{-17.5, -12}, {19.5, 10}})));
SFPLibDyn.Hydraulic.Valves.CheckValve CV(p_crack = 2e5, grad = 1.6666666666666667e-9)  annotation(
    Placement(transformation(origin = {-12, -32}, extent = {{-6, -12}, {6, 12}})));
inner SFPLibDyn.Properties.Hydraulic.FluidProp fluidProp annotation(
    Placement(transformation(origin = {-111, 124}, extent = {{-10, -10}, {10, 10}})));
equation
connect(force.u1, force_signal.y1) annotation(
    Line(points = {{90, 124}, {98, 124}}, color = {85, 0, 127}));
connect(rpm.y1, motor.u1) annotation(
    Line(points = {{-106, -93}, {-101, -93}}));
connect(motor.r1, pump.r1) annotation(
    Line(points = {{-70, -93}, {-63.2, -93}}));
connect(pump.h2, vol_pump.h1) annotation(
    Line(points = {{-48, -78}, {-48, -68}, {-22, -68}}));
connect(pump.h1, tank.h1) annotation(
    Line(points = {{-48, -108}, {-48, -133}}));
connect(orifice.h1, tank2.h1) annotation(
    Line(points = {{36, -60}, {36, -133}}));
connect(vol_pump.h3, RV.h1) annotation(
    Line(points = {{-12, -77}, {-12, -87}}));
connect(RV.h2, tank1.h1) annotation(
    Line(points = {{-12, -115}, {-12, -133}}));
connect(vol_T.h1, orifice.h2) annotation(
    Line(points = {{36, -11}, {36, -36}}));
connect(vol_A.h1, Distributor.hA) annotation(
    Line(points = {{-13, 70}, {-13, 60}, {9, 60}, {9, 51}}));
connect(Distributor.hB, vol_B.h1) annotation(
    Line(points = {{15, 51}, {15, 60}, {25, 60}, {25, 70}}));
connect(vol_A.h2, Cylinder.h1) annotation(
    Line(points = {{-13, 90}, {-13, 102}, {-6, 102}, {-6, 112}}));
connect(Cylinder.h2, vol_B.h2) annotation(
    Line(points = {{18, 112}, {18, 102}, {25, 102}, {25, 90}}));
connect(Pilot.y1, Distributor.u1) annotation(
    Line(points = {{-28, 37}, {-13, 37}}));
connect(Cylinder.t1, mass.t1) annotation(
    Line(points = {{25.5, 124}, {35.5, 124}}));
connect(mass.t2, force.t1) annotation(
    Line(points = {{60, 124}, {70, 124}}));
connect(vol_P.h1, CV.h2) annotation(
    Line(points = {{-12, -10}, {-12, -20}}));
connect(CV.h1, vol_pump.h2) annotation(
    Line(points = {{-12, -44}, {-12, -57}}));
connect(vol_P.h2, Distributor.hP) annotation(
    Line(points = {{-12, 10}, {-12, 22}, {9, 22}, {9, 28}}));
connect(Distributor.hT, vol_T.h2) annotation(
    Line(points = {{15, 28}, {15, 22}, {36, 22}, {36, 9}}));
annotation(
    Diagram(coordinateSystem(extent = {{-130, 140}, {120, -150}}, grid = {1, 1})),
    Icon(graphics = {Rectangle(origin = {-7, 4}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, lineThickness = 1, extent = {{-79, 34}, {93, -42}}), Rectangle(origin = {-61, -1}, lineColor = {72, 72, 72}, fillColor = {255, 255, 255}, fillPattern = FillPattern.HorizontalCylinder, extent = {{-11, 37}, {27, -35}}), Rectangle(origin = {18, 2}, lineColor = {72, 72, 72}, fillColor = {255, 255, 255}, fillPattern = FillPattern.HorizontalCylinder, extent = {{-52, 8}, {72, -12}})}, coordinateSystem(extent = {{-100, 40}, {100, -40}})),
    __OpenModelica_commandLineOptions = "",
    experiment(StartTime = 0, StopTime = 5, Tolerance = 1e-06, Interval = 0.001));
end Cylinder;

In this exercise a circuit with fixed displacement pump regulated by a maximum pressure relief valve is proposed. The distribution is controlled by a check valve and a 4/4 directional valve, connected to the actuation represented by a single-acting cylinder to which a certain load is applied.

The distributor signal follows these phases:

  • 0s -> 1s: signal = 0 (central position, closed center)
  • 1s -> 1.1s: signal 0 -> 1 (switching to left position)
  • 1.1s -> 3s: signal = 1 (left position, cylinder extension)
  • 2s -> 2.1s: signal 1 -> -1 (switching to right position)
  • 2.1s -> 5s: signal = -1 (right position, cylinder retraction)

The load on the cylinder is in the same direction throughout the simulation: therefore it is resistant in the extension phase and driving in the retraction phase.