IdealReliefResistor

model IdealReliefResistor
    extends HydraulicsByFluidon.Components.Base.PartialReliefResistor;

    Modelica.Blocks.Interfaces.RealInput u annotation (Placement(
        visible = true,
        transformation(
            origin = {-100, 0},
            extent = {
                {-20, -20}, 
                {20, 20}},
            rotation = 0),
        iconTransformation(
            origin = {-80, 0},
            extent = {
                {-20, -20}, 
                {20, 20}},
            rotation = 0)));
    Modelica.Blocks.Nonlinear.Limiter limiter(limitsAtInit = true, strict = true, uMax = 1, uMin = 0) annotation (Placement(
        visible = true,
        transformation(
            origin = {-50, 0},
            extent = {
                {-10, -10}, 
                {10, 10}},
            rotation = 0)));
equation
    connect(limiter.u,u) annotation (Line(
        points = {
            {-62, 0}, 
            {-100, 0}},
        color = {0, 0, 127}));
    InputSignal = limiter.y;

    annotation (
        Icon(
            coordinateSystem(initialScale = 0.1),
            graphics = {
                Line(points = {
                    {-26, -13}, 
                    {26, 13}}), 
                Polygon(
                    origin = {40, 20},
                    rotation = 297,
                    fillPattern = FillPattern.Solid,
                    points = {
                        {0, 0}, 
                        {-5, -20}, 
                        {5, -20}, 
                        {0, 0}})}),
        Documentation(info = "<html>\n            <p>\n                The component IdealReliefResistor is a model of a flow resistance that behaves as an orifice.\n            </p>\n            <p>\n                Flow is adjusted via the input signal with nominal flow (as given by <var>Nominal volume flow</var> at \n                <var>Nominal pressure difference</var>) corresponding to an input value of 1 (relative adjustment).\n            </p>\n            </p>\n                It is parameterized by the parameters <var>Nominal volume flow</var> at <var>Nominal pressure difference</var>, \n                measured with a fluid with <var>Reference density</var>.\n            </p>\n            <p>\n                <b>Orifice</b>\n            </p>\n            <p>\n                <center><img align=\"middle\" src=\"modelica://HydraulicsByFluidon/Resources/Images/Components/Resistors/TurbulentFlowIQp.png\"></center>\n            </p>\n            <p>\n                <center><img align=\"middle\" src=\"modelica://HydraulicsByFluidon/Resources/Images/Components/Resistors/TurbulentIGraph.png\"></center>\n            </p>\n        </html>"));
end IdealReliefResistor;