VariableFlowPumpCC

model VariableFlowPumpCC
    import SI = Modelica.SIunits;

    extends HydraulicsByFluidon.Components.Pumps.Base.PartialCCPumpWithLeakage;

    Modelica.Blocks.Interfaces.RealInput setpoint 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, uMin = -1, uMax = 1);
protected
    Real flowFactor;
equation
    actVolumeFlow = nominalVolumeFlow * flowFactor;
    flowFactor = limiter.y;
    limiter.u = setpoint;

    annotation (
        Icon(
            coordinateSystem(initialScale = 0.1),
            graphics = {
                Line(points = {
                    {-80, -80}, 
                    {80, 80}}), 
                Polygon(
                    origin = {-33, 80},
                    rotation = -45,
                    fillPattern = FillPattern.Solid,
                    points = {
                        {80, 80}, 
                        {85, 60}, 
                        {75, 60}, 
                        {80, 80}})}),
        Documentation(info = "<html>                           \n            <p>\n                The component VariableFlowPump constitutes a model of a flow source for closed circuit applications, in which the\n                delivery is calculated from the given nominal flow, the input signal and the leakage.\n            </p>\n            <p>\n                <center><img src=\"modelica://HydraulicsByFluidon/Resources/Images/Components/Pumps/VariableFlowPumpCCIcon.png\"></center>\n            </p>\n            <p>\n                Both internal and external leakage depend on the adjacent pressure difference.\n            </p>\n            <p>\n                <center><img align=\"middle\" src=\"modelica://HydraulicsByFluidon/Resources/Images/Components/Pumps/VariableFlowPumpCC.png\"></center>\n            </p>\n            <p>\n                The parameter nominalVolumeFlow refers to the flow at Port A. \n            </p>\n            <p>\n                The valid range of the input signal at port <i>setpoint</i> is -1 < signal < 1.\n                Therefore 1 corresponds to 100 % of the nominal volume flow.\n            </p>\n            <p>\n                VariableFlowPump does not provide a model of the physical design of a pump but\n                only copies its characteristic features. Thus, physical parameters (e. g. inertia\n                moment or hydraulic-mechanical efficiency) are not parameterized.\n            </p>\n            </html>"));
end VariableFlowPumpCC;