model RelAccSensor "Ideal sensor to measure the relative acceleration"
extends Translational.Interfaces.PartialRelativeSensor;
SI.Position s_rel "Distance between the two flanges (flange_b.s - flange_a.s)";
SI.Velocity v_rel "Relative velocity between the two flanges (der(flange_b.s) - der(flange_a.s))";
Modelica.Blocks.Interfaces.RealOutput a_rel(unit = "m/s2") "Relative acceleration between two flanges (= der(v_rel)) as output signal"
annotation (Placement(transformation(
extent = {
{-10, -10},
{10, 10}},
rotation = 270,
origin = {0, -110})));
equation
0 = flange_a.f;
a_rel = der(v_rel);
s_rel = flange_b.s - flange_a.s;
v_rel = der(s_rel);
annotation (
Documentation(info = "<html>\n<p>\nMeasures the <em>relative acceleration a</em> of a flange in an ideal way and provides the result as\noutput signals (to be further processed with blocks of the\nModelica.Blocks library).\n</p>\n\n</html>"),
Icon(
coordinateSystem(
preserveAspectRatio = true,
extent = {
{-100, -100},
{100, 100}}),
graphics = {
Text(
extent = {
{7, -68},
{41, -102}},
textString = "a"),
Line(
points = {
{0, -99},
{0, -60}},
color = {0, 0, 127})}));
end RelAccSensor;