model test model DiffPiston parameter SFPLibDyn.Units.Length D1 = 60e-3 "LP diameter" annotation( HideResult = true); parameter SFPLibDyn.Units.Length d2 = 30e-3 "LP diameter" annotation( HideResult = true); parameter SFPLibDyn.Units.Length stroke = 60e-3 "piston stroke" annotation( HideResult = true); SFPLibDyn.Connectors.HydPinVol h2 annotation( Placement(transformation(origin = {120, -120}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {120, -120}, extent = {{-10, -10}, {10, 10}}))); SFPLibDyn.Connectors.HydPinVol h1 annotation( Placement(transformation(origin = {-120, -120}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {-120, -120}, extent = {{-10, -10}, {10, 10}}))); SFPLibDyn.Connectors.HydPinVol T annotation( Placement(transformation(origin = {30, -120}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {30, -120}, extent = {{-10, -10}, {10, 10}}))); SFPLibDyn.Components.Piston piston(direction = -1, d_rod = d2 - 0.01, d_piston = D1) annotation( Placement(transformation(origin = {-31, 42}, extent = {{-10, -10}, {10, 10}}))); SFPLibDyn.Components.Leakage leakage(direction = -1, d_ext = D1, d_clearance = 5e-5, eccentricity = 2e-5, l_contact_0 = 0.12) annotation( Placement(transformation(origin = {-57, 42}, extent = {{-10, -10}, {10, 10}}))); SFPLibDyn.Components.Piston piston1(d_piston = D1) annotation( Placement(transformation(origin = {-82, 42}, extent = {{10, -10}, {-10, 10}}))); SFPLibDyn.Components.Piston piston2(direction = -1, d_piston = d2) annotation( Placement(transformation(origin = {72, 42}, extent = {{-10, -10}, {10, 10}}))); SFPLibDyn.Components.Leakage leakage1(direction = -1, d_ext = d2, d_clearance = 5e-5, eccentricity = 2e-5, l_contact_0 = 0.12) annotation( Placement(transformation(origin = {46, 42}, extent = {{-10, -10}, {10, 10}}))); SFPLibDyn.Components.Piston piston11(d_piston = d2, d_rod = d2 - 0.01) annotation( Placement(transformation(origin = {21, 42}, extent = {{10, -10}, {-10, 10}}))); SFPLibDyn.Mechanical.Translational.Mass mass(mass(displayUnit = "kg") = 2, endstops_model = SFPLibDyn.Units.Choices.mass_type.Ideal, low_lim = -stroke/2, high_lim = stroke/2, x_mass(start = -stroke/2, fixed = true), coeff_wind = 1e5) annotation( Placement(transformation(origin = {-5, 42}, extent = {{-10, -10}, {10, 10}}))); SFPLibDyn.Hydraulic.Nodes.Node3p node3p annotation( Placement(transformation(origin = {-88, 5}, extent = {{-6, -6}, {6, 6}}))); SFPLibDyn.Hydraulic.Nodes.Node3p node3p1 annotation( Placement(transformation(origin = {78, 3}, extent = {{6, -6}, {-6, 6}}))); SFPLibDyn.Hydraulic.Volumes.Volume6p vol_T(vol_0 = (D1^2 - d2^2)*SFPLibDyn.Constants.pi/4*stroke + 50e-6, pressure(start = 0)) annotation( Placement(transformation(origin = {-3, -11}, extent = {{-10, -10}, {10, 10}}))); SFPLibDyn.Mechanical.Translational.Sources.ZeroForce zeroForce annotation( Placement(transformation(origin = {-111, 42}, extent = {{-10, -10}, {10, 10}}))); SFPLibDyn.Mechanical.Translational.Sources.ZeroForce zeroForce1 annotation( Placement(transformation(origin = {99, 42}, extent = {{10, -10}, {-10, 10}}))); SFPLibDyn.Hydraulic.Sources.ZeroFlowSource zeroFlowSource annotation( Placement(transformation(origin = {-3, 11}, extent = {{-6, -6}, {6, 6}}))); SFPLibDyn.Hydraulic.Orifices.Orifice orifice(diam = 0.016) annotation( Placement(transformation(origin = {30, -80}, extent = {{-6, -12}, {6, 12}}, rotation = 180))); SFPLibDyn.Hydraulic.Volumes.Volume2p vol_A(vol_0 = 2e-4, pressure(start = 0)) annotation( Placement(transformation(origin = {78, -24}, extent = {{-10, -10}, {10, 10}}))); SFPLibDyn.Hydraulic.Pipes.PipeFriction pipeFriction(d_int = 0.004, length = 0.5) annotation( Placement(transformation(origin = {120, -81}, extent = {{-6, -10}, {6, 10}}))); equation connect(piston.t1, leakage.t2) annotation( Line(points = {{-41, 42}, {-47, 42}})); connect(leakage.t1, piston1.t1) annotation( Line(points = {{-67, 42}, {-72, 42}})); connect(piston2.t1, leakage1.t2) annotation( Line(points = {{62, 42}, {56, 42}})); connect(leakage1.t1, piston11.t1) annotation( Line(points = {{36, 42}, {31, 42}})); connect(piston.t2, mass.t1) annotation( Line(points = {{-21, 42}, {-15, 42}})); connect(mass.t2, piston11.t2) annotation( Line(points = {{5, 42}, {11, 42}})); connect(h1, node3p.h1) annotation( Line(points = {{-120, -120}, {-120, -75}, {-88, -75}, {-88, -1}})); connect(node3p.h2, piston1.h1) annotation( Line(points = {{-88, 11}, {-88, 32}})); connect(node3p.h3, leakage.h1) annotation( Line(points = {{-82, 5}, {-63, 5}, {-63, 32}})); connect(piston2.h1, node3p1.h2) annotation( Line(points = {{78, 32}, {78, 9}})); connect(node3p1.h3, leakage1.h2) annotation( Line(points = {{72, 3}, {52, 3}, {52, 32}})); connect(vol_T.h5, piston.h1) annotation( Line(points = {{-13, -7}, {-25, -7}, {-25, 32}})); connect(vol_T.h6, piston11.h1) annotation( Line(points = {{7, -7}, {15, -7}, {15, 32}})); connect(vol_T.h4, leakage1.h1) annotation( Line(points = {{7, -15}, {40, -15}, {40, 32}})); connect(vol_T.h3, leakage.h2) annotation( Line(points = {{-13, -15}, {-51, -15}, {-51, 32}})); connect(piston1.t2, zeroForce.t1) annotation( Line(points = {{-92, 42}, {-101, 42}})); connect(zeroForce1.t1, piston2.t2) annotation( Line(points = {{89, 42}, {82, 42}})); connect(zeroFlowSource.h1, vol_T.h2) annotation( Line(points = {{-3, 5}, {-3, -1}})); connect(orifice.h2, T) annotation( Line(points = {{30, -92}, {30, -120}})); connect(orifice.h1, vol_T.h1) annotation( Line(points = {{30, -68}, {30, -51.5}, {-3, -51.5}, {-3, -21}})); connect(node3p1.h1, vol_A.h2) annotation( Line(points = {{78, -3}, {78, -14}})); connect(h2, pipeFriction.h1) annotation( Line(points = {{120, -120}, {120, -91}})); connect(pipeFriction.h2, vol_A.h1) annotation( Line(points = {{120, -71}, {120, -59}, {78, -59}, {78, -34}})); annotation( Icon(coordinateSystem(grid = {1, 1}, extent = {{-180, -120}, {180, 100}}), graphics = {Rectangle(origin = {-75, 0}, extent = {{-30, -60}, {30, 60}}), Rectangle(extent = {{-45, -15}, {45, 15}}), Polygon(points = {{-135, 60}, {0, 60}, {0, 30}, {135, 30}, {135, -30}, {0, -30}, {0, -60}, {-135, -60}, {-135, 60}}), Line(origin = {30, -120}, points = {{0, 0}, {0, 75}, {-30, 75}}, pattern = LinePattern.Dash), Polygon(origin = {-120, -34}, fillPattern = FillPattern.Solid, points = {{0, 0}, {-15, -25.9808}, {15, -25.9808}, {0, 0}}), Polygon(origin = {120, -30}, rotation = 180, fillPattern = FillPattern.Solid, points = {{0, 0}, {-15, -25.9808}, {15, -25.9808}, {0, 0}}), Rectangle(origin = {75, 0}, extent = {{-30, -30}, {30, 30}}), Line(origin = {-120, -120}, points = {{0, 0}, {0, 60}}), Line(origin = {120, -120}, points = {{0, 0}, {0, 90}})}), Diagram(coordinateSystem(extent = {{-180, -120}, {180, 100}}, grid = {1, 1})), experiment(StartTime = 0, StopTime = 1, Tolerance = 1e-06, Interval = 0.002)); end DiffPiston; SFPLibDyn.Units.Volume V_leaks(start = 0) "volume of oil leaked from booster" annotation( Placement(visible = false, transformation(extent = {{0, 0}, {0, 0}}))); SFPLibDyn.Hydraulic.Actuators.Cylinders.Cylinder cylinder(d_piston = 0.2, d_rod = 0.16, stroke = 0.15) annotation( Placement(transformation(origin = {-32, 85}, extent = {{-18.5, -11}, {18.5, 11}}))); SFPLibDyn.Mechanical.Translational.Mass mass(endstops_model = SFPLibDyn.Units.Choices.mass_type.Ideal, mass(displayUnit = "kg") = 1500, low_lim = 0, high_lim = 0.15, x_mass(fixed = true), coeff_wind = 1e7) annotation( Placement(transformation(origin = {4, 86}, extent = {{-10, -10}, {10, 10}}))); SFPLibDyn.Mechanical.Translational.Sensors.DisplacementSensor displacementSensor annotation( Placement(transformation(origin = {29, 79}, extent = {{-10, 13}, {10, -13}}))); SFPLibDyn.Signals.Tables.TableFun1D tableFun1D(table_file = false, table = [0, 100; 120, 100; 145, 200; 147, 1500; 150, 1500]) annotation( Placement(transformation(origin = {106, 86}, extent = {{10, -10}, {-10, 10}}))); SFPLibDyn.Mechanical.Translational.Sources.ForceSource forceSource(direction = -1, scale = 1000) annotation( Placement(transformation(origin = {55, 86}, extent = {{10, -10}, {-10, 10}}))); SFPLibDyn.Hydraulic.Sources.Tank tank annotation( Placement(transformation(origin = {-21, -35}, extent = {{-6, -4.5}, {6, 4.5}}))); SFPLibDyn.Hydraulic.Valves.CheckValve checkValve(p_crack = 2e5, saturation = true, p_ch = 1.5e5, q_ch = 0.0013333333333333333) annotation( Placement(transformation(origin = {-74, 25}, extent = {{-6, -12}, {6, 12}}))); SFPLibDyn.Hydraulic.Valves.SequenceValve sequenceValve(p_crack = 3.3e7) annotation( Placement(transformation(origin = {-117, 25}, extent = {{-14, -12}, {14, 12}}))); DiffPiston booster(D1 = 0.065, d2 = 0.05, stroke = 0.12) annotation( Placement(transformation(origin = {-107, 84}, extent = {{-18, -10.5}, {18, 10}}))); SFPLibDyn.Hydraulic.Volumes.Volume3p vol_A(vol_0 = 5e-4, pressure(start = 0)) annotation( Placement(transformation(origin = {-74, 62}, extent = {{-10, -10}, {10, 10}}))); SFPLibDyn.Hydraulic.Volumes.Volume2p vol_amp(vol_0 = 0.005, pressure(start = 0)) annotation( Placement(transformation(origin = {-119, 56}, extent = {{-10, -10}, {10, 10}}))); SFPLibDyn.Hydraulic.Nodes.Node3p node3p annotation( Placement(transformation(origin = {-21, 43}, extent = {{6, -6}, {-6, 6}}))); SFPLibDyn.Hydraulic.Sources.Pumps.FixedUniDirPump fixedUniDirPump annotation( Placement(transformation(origin = {-74, -44}, extent = {{-15, -15}, {15, 15}}))); SFPLibDyn.Mechanical.Rotational.Sources.Motor motor annotation( Placement(transformation(origin = {-118, -44}, extent = {{-15, -15}, {15, 15}}))); SFPLibDyn.Hydraulic.Sources.Tank tank1 annotation( Placement(transformation(origin = {-74, -68}, extent = {{-6, -4.5}, {6, 4.5}}))); SFPLibDyn.Signals.Source.Constant constant1(k = 1500) annotation( Placement(transformation(origin = {-154, -44}, extent = {{-10, -10}, {10, 10}}))); SFPLibDyn.Hydraulic.Volumes.Volume4p vol_P(vol_0 = 0.006, pressure(start = 0)) annotation( Placement(transformation(origin = {-74, -9}, extent = {{-10, -10}, {10, 10}}))); SFPLibDyn.Hydraulic.Valves.ReliefValve reliefValve(p_crack = 3.5e7, saturation = false, grad = 4.166666666666667e-9) annotation( Placement(transformation(origin = {-45, -9}, extent = {{-12, -12}, {12, 12}}, rotation = -90))); SFPLibDyn.Hydraulic.Nodes.Node3p node3p1 annotation( Placement(transformation(origin = {-21, -9}, extent = {{6, -6}, {-6, 6}}))); inner SFPLibDyn.Properties.Hydraulic.FluidProp fluidProp(redeclare SFPLibDyn.Properties.Hydraulic.Fluid.Custom Fluid_1(T = 343.15, redeclare SFPLibDyn.Properties.Hydraulic.Fluid.ViscosityModel.ISO3448Extended ViscModel_l)) annotation( Placement(transformation(origin = {96, -53}, extent = {{-10, -10}, {10, 10}}))); SFPLibDyn.Signals.Continuous.Derivative derivative(k = 10) annotation( Placement(transformation(origin = {55, 44}, extent = {{-10, -10}, {10, 10}}))); SFPLibDyn.Signals.Source.Constant constant2 annotation( Placement(transformation(origin = {107, 44}, extent = {{-10, 10}, {10, -10}}, rotation = -180))); SFPLibDyn.Signals.Math.Multiplication multiplication annotation( Placement(transformation(origin = {81, 86}, extent = {{10, -10}, {-10, 10}}))); Modelica.Blocks.Math.Min min annotation( Placement(transformation(origin = {81, 60}, extent = {{-10, 10}, {10, -10}}, rotation = 90))); equation der(V_leaks) = node3p.h3.q; connect(cylinder.t1, mass.t1) annotation( Line(points = {{-13.5, 86}, {-6.5, 86}})); connect(mass.t2, displacementSensor.t1) annotation( Line(points = {{14, 86}, {19, 86}})); connect(forceSource.t1, displacementSensor.t2) annotation( Line(points = {{45, 86}, {39, 86}})); connect(vol_A.h2, booster.h2) annotation( Line(points = {{-84, 62}, {-95, 62}, {-95, 74}})); connect(vol_A.h3, cylinder.h1) annotation( Line(points = {{-64, 62}, {-46, 62}, {-46, 74}, {-45, 74}})); connect(checkValve.h2, vol_A.h1) annotation( Line(points = {{-74, 37}, {-74, 52}})); connect(booster.h1, vol_amp.h2) annotation( Line(points = {{-119, 73.5}, {-119, 65.5}})); connect(vol_amp.h1, sequenceValve.h2) annotation( Line(points = {{-119, 46}, {-119, 37}})); connect(cylinder.h2, node3p.h2) annotation( Line(points = {{-21, 74}, {-21, 49}})); connect(motor.u1, constant1.y1) annotation( Line(points = {{-132.6, -44}, {-143.6, -44}})); connect(fixedUniDirPump.r1, motor.r1) annotation( Line(points = {{-92, -44}, {-100, -44}})); connect(node3p.h3, booster.T) annotation( Line(points = {{-27, 43}, {-104, 43}, {-104, 74}}, pattern = LinePattern.Dash)); connect(node3p.h1, node3p1.h2) annotation( Line(points = {{-21, 37}, {-21, -3}})); connect(tank.h1, node3p1.h1) annotation( Line(points = {{-21, -30.5}, {-21, -15.5}})); connect(node3p1.h3, reliefValve.h2) annotation( Line(points = {{-27, -9}, {-33, -9}})); connect(reliefValve.h1, vol_P.h4) annotation( Line(points = {{-57, -9}, {-64, -9}})); connect(vol_P.h1, fixedUniDirPump.h2) annotation( Line(points = {{-74, -19}, {-74, -29}})); connect(vol_P.h2, checkValve.h1) annotation( Line(points = {{-74, 1}, {-74, 13}})); connect(vol_P.h3, sequenceValve.h1) annotation( Line(points = {{-84, -9}, {-119, -9}, {-119, 13}})); connect(displacementSensor.y1, tableFun1D.u1) annotation( Line(points = {{29, 66}, {29, 29}, {123, 29}, {123, 86}, {116, 86}})); connect(multiplication.y1, forceSource.u1) annotation( Line(points = {{71, 86}, {65, 86}})); connect(tableFun1D.y1, multiplication.u1) annotation( Line(points = {{96, 86}, {91, 86}})); connect(multiplication.u2, min.y) annotation( Line(points = {{81, 76}, {81, 71}})); connect(min.u1, constant2.y1) annotation( Line(points = {{87, 48}, {87, 44}, {97, 44}}, color = {0, 0, 127})); connect(derivative.y1, min.u2) annotation( Line(points = {{65, 44}, {75, 44}, {75, 48}})); connect(displacementSensor.y1, derivative.u1) annotation( Line(points = {{29, 66}, {29, 44}, {45, 44}})); connect(fixedUniDirPump.h1, tank1.h1) annotation( Line(points = {{-74, -59}, {-74, -63}})); annotation( uses(SFPLibDyn(version = "4.0"), Modelica(version = "4.0.0")), Diagram(coordinateSystem(grid = {1, 1}, extent = {{-190, -100}, {150, 120}})), Icon(coordinateSystem(grid = {1, 1}, extent = {{-190, -100}, {150, 120}})), version = "", experiment(StartTime = 0, StopTime = 13, Tolerance = 1e-08, Interval = 0.002)); end test;