Search code examples
simulationfluidmodelicaopenmodelica

Cylinder - Results explanation


I hope you are doing well. Once again, I need your help, please I’ve got this, as a kind of telescopic piston, but I'm having trouble understanding the results I'm getting. Even though it's what I want, I can't explain how I'm achieving this, because I haven't established any connections between the different cylinders. So, how can we explain the fact that the flange of the "NoirCylinder" starts after the "BleuCylinder"? And why does the flange of the "RougeCylinder" begin after the "NoirCylinder"?"

model TestTelescopicPiston2
  inner Modelica.Fluid.System system(T_ambient = 293.15) annotation(
    Placement(visible = true, transformation(origin = {-84, 82}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Sources.Boundary_pT BoundaryP(redeclare package Medium = Modelica.Media.Water.ConstantPropertyLiquidWater, nPorts = 1, p = 10e5) annotation(
    Placement(visible = true, transformation(origin = {-84, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Pipes.StaticPipe Pipe(redeclare package Medium = Modelica.Media.Water.ConstantPropertyLiquidWater, diameter = 0.01, length = 20) annotation(
    Placement(visible = true, transformation(origin = {-28, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Sensors.VolumeFlowRate volumeFlowRate(redeclare package Medium = Modelica.Media.Water.ConstantPropertyLiquidWater)  annotation(
    Placement(visible = true, transformation(origin = {-58, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Sensors.VolumeFlowRate volumeFlowRate3(redeclare package Medium = Modelica.Media.Water.ConstantPropertyLiquidWater)  annotation(
    Placement(visible = true, transformation(origin = {6, -60}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Sensors.VolumeFlowRate volumeFlowRate2(redeclare package Medium = Modelica.Media.Water.ConstantPropertyLiquidWater) annotation(
    Placement(visible = true, transformation(origin = {6, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Sensors.VolumeFlowRate volumeFlowRate1(redeclare package Medium = Modelica.Media.Water.ConstantPropertyLiquidWater) annotation(
    Placement(visible = true, transformation(origin = {8, 60}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.Translational.Components.MassWithStopAndFriction RougeStop(m = 1, s(fixed = true, start = 0.36), smax = 0.54, smin = 0) annotation(
    Placement(visible = true, transformation(origin = {78, -60}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Machines.SweptVolume RougeCylinder(redeclare package Medium = Modelica.Media.Water.ConstantPropertyLiquidWater, clearance = 2.51e-4, nPorts = 1, pistonCrossArea = 0.001256, use_T_start = true, use_portsData = false) annotation(
    Placement(visible = true, transformation(origin = {46, -60}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  Modelica.Mechanics.Translational.Components.MassWithStopAndFriction NoirStop(m = 1, s(fixed = true, start = 0.18), smax = 0.36, smin = 0) annotation(
    Placement(visible = true, transformation(origin = {80, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Machines.SweptVolume NoirCylinder(redeclare package Medium = Modelica.Media.Water.ConstantPropertyLiquidWater, clearance = 3.92699e-4, nPorts = 1, pistonCrossArea = 0.001963, use_T_start = true, use_portsData = false) annotation(
    Placement(visible = true, transformation(origin = {44, 0}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  Modelica.Fluid.Machines.SweptVolume BleuCylinder(redeclare package Medium = Modelica.Media.Water.ConstantPropertyLiquidWater, clearance = 5.6548e-4, nPorts = 1, pistonCrossArea = 0.002827, use_T_start = true, use_portsData = false) annotation(
    Placement(visible = true, transformation(origin = {44, 60}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  Modelica.Mechanics.Translational.Components.MassWithStopAndFriction BleuStop(F_Coulomb = 0, F_Stribeck = 0, F_prop = 0, m = 1, s(start = 0), smax = 0.18, smin = 0) annotation(
    Placement(visible = true, transformation(origin = {82, 60}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
  connect(BoundaryP.ports[1], volumeFlowRate.port_a) annotation(
    Line(points = {{-74, 0}, {-68, 0}}, color = {0, 127, 255}));
  connect(volumeFlowRate.port_b, Pipe.port_a) annotation(
    Line(points = {{-48, 0}, {-38, 0}}, color = {0, 127, 255}));
  connect(Pipe.port_b, volumeFlowRate3.port_a) annotation(
    Line(points = {{-18, 0}, {-12, 0}, {-12, -60}, {-4, -60}}, color = {0, 127, 255}));
  connect(Pipe.port_b, volumeFlowRate2.port_a) annotation(
    Line(points = {{-18, 0}, {-4, 0}}, color = {0, 127, 255}));
  connect(Pipe.port_b, volumeFlowRate1.port_a) annotation(
    Line(points = {{-18, 0}, {-12, 0}, {-12, 60}, {-2, 60}}, color = {0, 127, 255}));
  connect(NoirCylinder.flange, NoirStop.flange_a) annotation(
    Line(points = {{54, 0}, {70, 0}}, color = {0, 127, 0}));
  connect(volumeFlowRate2.port_b, NoirCylinder.ports[1]) annotation(
    Line(points = {{16, 0}, {34, 0}}, color = {0, 127, 255}));
  connect(volumeFlowRate1.port_b, BleuCylinder.ports[1]) annotation(
    Line(points = {{18, 60}, {34, 60}}, color = {0, 127, 255}));
  connect(BleuCylinder.flange, BleuStop.flange_a) annotation(
    Line(points = {{54, 60}, {72, 60}}, color = {0, 127, 0}));
  connect(volumeFlowRate3.port_b, RougeCylinder.ports[1]) annotation(
    Line(points = {{16, -60}, {36, -60}}, color = {0, 127, 255}));
  connect(RougeCylinder.flange, RougeStop.flange_a) annotation(
    Line(points = {{56, -60}, {68, -60}}, color = {0, 127, 0}));
  annotation(
    uses(Modelica(version = "4.0.0")));
end TestTelescopicPiston2;

The simulation results:


Solution

  • The answer should be your parameterization. I'm neither a specialist in the fluid library nor with sticky friction - so take my answer with some care:

    • BleuStop starts because it has the lowest friction - actually none at all. You have set the friction parameters in the MassWithStopAndFriction to zero. (F_Coulomb = 0, F_Stribeck = 0, F_prop = 0)
    • NoirStop and RougeStop use the start values as default parameters (F_Coulomb = 5, F_Stribeck = 10, F_prop = 1). This is mentioned in a translation warning (those warnings should really be read when a model behaves strangely!). Therefore:
      • NoirStop starts next as the cylinder has a bigger cross-section which makes it reach the "Stribeck-peak" first - which starts the movement and reduces friction as the peak was reached (see last picture which is from the documentation of MassWithStopAndFriction.
      • RoughStop does not move due to the Stribeck-effect and due to the pressure falling to a low value as the volume flow goes into NoirCylinder after it started moving.
      • Lastly, RoughStop moves as the pressure is high enough to make it move and there is no other possible path for the volume-flow.

    When setting the friction parameters for all three masses to zero, the result is the following (using the same sub-optimal time-scale as in the original plot for better comparability):

    Result for all masses being frictionless

    Here is a screenshot of how the MassWithStopAndFriction-element describes friction, which is valid for the default parameters: F_Coulomb = 5, F_Stribeck = 10, F_prop = 1

    Friction characteristics of Modelicas "MassWithStopAndFriction"