InternalSupport

model InternalSupport "Adapter model to utilize conditional support connector"
    input SI.Force f "External support force (must be computed via force balance in model where InternalSupport is used; = flange.f)";
    SI.Position s "External support position (= flange.s)";
    Flange_a flange "Internal support flange (must be connected to the conditional support connector for useSupport=true and to conditional fixed model for useSupport=false)"
        annotation (Placement(transformation(extent = {
            {-10, -10}, 
            {10, 10}})));
equation
    flange.f = f;
    flange.s = s;

    annotation (
        Icon(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Text(
                    extent = {
                        {-200, 80}, 
                        {200, 40}},
                    lineColor = {0, 0, 255},
                    textString = "%name"), 
                Rectangle(
                    extent = {
                        {-20, 20}, 
                        {20, -20}},
                    lineColor = {0, 127, 0},
                    fillColor = {175, 190, 175},
                    fillPattern = FillPattern.Solid)}),
        Documentation(info = "<html>\n<p>\nThis is an adapter model to utilize a conditional support connector\nin an elementary component, i.e., where the component equations are\ndefined textually:\n</p>\n\n<ul>\n<li> If <em>useSupport = true</em>, the flange has to be connected to the conditional\n     support connector.</li>\n<li> If <em>useSupport = false</em>, the flange has to be connected to the conditional\n     fixed model.</li>\n</ul>\n\n<p>\nVariable <strong>f</strong> is defined as <strong>input</strong> and must be provided when using\nthis component as a modifier (computed via a force balance in\nthe model where InternalSupport is used). Usually, model InternalSupport is\nutilized via the partial models:\n</p>\n\n<blockquote>\n<a href=\"modelica://Modelica.Mechanics.Translational.Interfaces.PartialElementaryOneFlangeAndSupport\">\nPartialElementaryOneFlangeAndSupport</a>,<br>\n<a href=\"modelica://Modelica.Mechanics.Translational.Interfaces.PartialElementaryTwoFlangesAndSupport\">\nPartialElementaryTwoFlangesAndSupport</a>,<br>\n<a href=\"modelica://Modelica.Mechanics.Translational.Interfaces.PartialElementaryRotationalToTranslational\">\nPartialElementaryRotationalToTranslational</a>.\n</blockquote>\n\n<p>\nNote, the support position can always be accessed as internalSupport.s, and\nthe support force can always be accessed as internalSupport.f.\n</p>\n</html>"));
end InternalSupport;