PilotOperatedCheckValve

model PilotOperatedCheckValve
    parameter Modelica.SIunits.DimensionlessRatio pilotRatio = 3 "Pilot ratio";

    extends HydraulicsByFluidon.Components.Valves.Base.PartialCheckValvePT1;

    HydraulicsByFluidon.Interfaces.FluidPort fluidPortPilot(start = environment.pAmbient, nominal = 100000) "Hydraulic port pilot"
        annotation (Placement(
            visible = true,
            transformation(
                extent = {
                    {90, -10}, 
                    {110, 10}},
                rotation = 0),
            iconTransformation(
                extent = {
                    {30, -110}, 
                    {50, -90}},
                rotation = 0)));
equation
    if forwardFluidProperties then 
        fluidPortPilot.fluidTemperature = fluidPortB.fluidTemperature;
        fluidPortPilot.fluidId = fluidPortB.fluidId;
        fluidPortPilot.proportionUndissolvedAir = fluidPortB.proportionUndissolvedAir;
        fluidPortPilot.polytropicExponent = fluidPortB.polytropicExponent;
    end if;
    pPilot = (fluidPortPilot.p - environment.pAmbient) * pilotRatio;
    fluidPortPilot.mFlow = 0;

    annotation (
        Icon(graphics = {
            Rectangle(
                origin = {10, 0},
                fillColor = {255, 255, 255},
                fillPattern = FillPattern.Solid,
                extent = {
                    {-40, -55}, 
                    {40, 55}}), 
            Line(points = {
                {0, -100}, 
                {0, -36}}), 
            Line(points = {
                {0, -12}, 
                {0, 100}}), 
            Ellipse(
                origin = {0, -22},
                fillColor = {255, 255, 255},
                fillPattern = FillPattern.Solid,
                extent = {
                    {-10, -10}, 
                    {10, 10}},
                endAngle = 360), 
            Line(
                origin = {0, -36},
                points = {
                    {-20, 20}, 
                    {0, 0}, 
                    {20, 20}}), 
            Line(
                origin = {0, -12},
                rotation = 90,
                points = {
                    {0, 0}, 
                    {4, -20}, 
                    {12, 20}, 
                    {20, -20}, 
                    {28, 20}, 
                    {36, -20}, 
                    {44, 20}, 
                    {48, 0}}), 
            Line(
                origin = {40, -100},
                points = {
                    {0, 0}, 
                    {0, 45}, 
                    {-30, 75}},
                pattern = LinePattern.Dash)}),
        Documentation(info = "<html>\n            <p>\n                The component PilotOperatedCheckValve allows free flow through the check valve from A to B and blocks the reverse flow until\n                the pilot pressure directly proportional to the load in the pilot line, so that the pilot piston can push the check poppet off its seat. \n                \n                The component PilotOperatedCheckValve is the model of a check valve which blocks the flow in the direction from \n                fluidPortB towards fluidPortA. In the opposite direction, from fluidPortA towards fluidPortB, the valve \n                can be set to represent either a throttle or orifice. In addition to pressure at fluidPortA the valve can be opened by pressure\n                at fluidPortPilot.\n            </p>\n            <p>\n                <center><img src=\"modelica://HydraulicsByFluidon/Resources/Images/Components/Valves/CheckValves/PilotOperatedCheckValve.png\"></center>\n            </p>\n            <p>\n                The locking function is thereby represented by a spring. The <var>Opening pressure difference</var> is the pressure difference\n                necessary to overcome the locking spring force. The opening condition is:\n            </p>\n            <p>\n                fluidPortA.p  + <var>Pilot ratio</var> * Pilot pressure &#62; fluidPortB.p + <var>Opening pressure difference</var>.\n            </p>\n            <p>\n                with <var>Pilot ratio</var> = Pilot piston area / Check valve seat area\n            </p>\n            <p>    \n                <var>Max. opening pressure difference</var> defines the point where the valve is completely open and the \n                values <var>Nominal volume flow</var> and <var>Nominal pressure difference</var> apply.\n                From <var>Opening pressure difference</var> to <var>Max. opening pressure difference</var> the flow is scaled proportionally.\n            </p>\n            <p>\n                <b>Throttle</b>\n            </p>\n            <p>\n                <center><img align=\"middle\" src=\"modelica://HydraulicsByFluidon/Resources/Images/Components/Valves/CheckValves/CVThrottle.png\"></center>\n            </p>\n            <p>\n                <b>Orifice</b>\n            </p>\n            <p>\n                <center><img align=\"middle\" src=\"modelica://HydraulicsByFluidon/Resources/Images/Components/Valves/CheckValves/CVOrifice.png\"></center>\n            </p>\n            <p>\n                The component PilotOperatedCheckValve is not a model of a check valve according to its physical structure. It merely \n                represents the characteristic behavior of a check valve. The dynamic effects which can occur in real valve \n                such as forces due to inertia will be represented by means of the parameter TimeConstant, which is the time \n                constant of an idealized first order mechanical system that can not oscillate.\n            </p></html>"));
end PilotOperatedCheckValve;