ForceSensor

model ForceSensor "Ideal sensor to measure the force between two flanges"
    extends Translational.Interfaces.PartialRelativeSensor;

    Modelica.Blocks.Interfaces.RealOutput f(unit = "N") "Force in flange_a and flange_b (f = flange_a.f = -flange_b.f) as output signal"
        annotation (Placement(transformation(
            origin = {-80, -110},
            extent = {
                {10, -10}, 
                {-10, 10}},
            rotation = 90)));
equation
    flange_a.f = f;
    flange_a.s = flange_b.s;

    annotation (
        Documentation(info = "<html>\n<p>\nMeasures the <em>cut-force between two flanges</em> in an ideal way\nand provides the result as output signal (to be further processed\nwith blocks of the Modelica.Blocks library).\n</p>\n\n</html>"),
        Icon(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Text(
                    extent = {
                        {-40, -70}, 
                        {40, -120}},
                    textString = "f"), 
                Line(
                    points = {
                        {-80, -100}, 
                        {-80, 0}},
                    color = {0, 0, 127})}));
end ForceSensor;