Files
AIDASimulation/SimulationModels/OpenModelica 1.25/AIDAModelica/AccelerationToSpeed.mo

33 lines
2.3 KiB
Plaintext
Raw Normal View History

within AIDAModelica;
model AccelerationToSpeed "Acceleration to speed convector"
Modelica.Blocks.Interfaces.RealInput Acceleration[3](each quantity = "Mechanics.Translation.Accel", each displayUnit = "m/s²") "'input Real' as connector" annotation(
Placement(transformation(origin = {-26, -30}, extent = {{-120, 10}, {-80, 50}}), iconTransformation(origin = {0, -100}, extent = {{-20, -20}, {20, 20}}, rotation = 90)));
Modelica.Blocks.Interfaces.RealOutput Speed[3](each quantity = "Mechanics.Translation.Velocity", each displayUnit = "m/s") "'output Real' as connector" annotation(
Placement(transformation(origin = {104, -30}, extent = {{-5, 20}, {15, 40}}), iconTransformation(origin = {0, 100}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
Modelica.Blocks.Continuous.Integrator integrator1 annotation(
Placement(transformation(origin = {20, 10}, extent = {{-60, 50}, {-40, 70}})));
Modelica.Blocks.Continuous.Integrator integrator2 annotation(
Placement(transformation(origin = {20, -30}, extent = {{-60, 20}, {-40, 40}})));
Modelica.Blocks.Continuous.Integrator integrator3 annotation(
Placement(transformation(origin = {20, -72}, extent = {{-60, -10}, {-40, 10}})));
equation
connect(integrator1.u, Acceleration[1]) annotation(
Line(points = {{-42, 70}, {-95, 70}, {-95, 0}, {-126, 0}}, color = {0, 0, 127}, thickness = 0.0625));
connect(integrator2.u, Acceleration[2]) annotation(
Line(points = {{-42, 0}, {-126, 0}}, color = {0, 0, 127}, thickness = 0.0625));
connect(integrator3.u, Acceleration[3]) annotation(
Line(points = {{-42, -72}, {-94, -72}, {-94, 0}, {-126, 0}}, color = {0, 0, 127}, thickness = 0.0625));
connect(integrator1.y, Speed[1]) annotation(
Line(points = {{-19, 70}, {0, 70}, {0, 0}, {109, 0}}, color = {0, 0, 127}, thickness = 0.0625));
connect(integrator2.y, Speed[2]) annotation(
Line(points = {{-19, 0}, {109, 0}}, color = {0, 0, 127}, thickness = 0.0625));
connect(integrator3.y, Speed[3]) annotation(
Line(points = {{-19, -72}, {35, -72}, {35, 0}, {109, 0}}, color = {0, 0, 127}, thickness = 0.0625));
annotation(
Acceleration(flags = 2),
Speed(flags = 2),
Icon(graphics = {Rectangle(fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}})}),
experiment(StopTime = 1, StartTime = 0, Interval = 0.001));
end AccelerationToSpeed;