VariablePressureSource

model VariablePressureSource
    HydraulicsByFluidon.Interfaces.FluidPort fluidPort(p(start = 101325, nominal = 100000)) "Hydraulic port"
        annotation (Placement(transformation(extent = {
            {-10, 90}, 
            {10, 110}})));
    Modelica.Blocks.Interfaces.RealInput setPressure "Absolute pressure"
        annotation (Placement(transformation(extent = {
            {-110, -10}, 
            {-90, 10}})));
equation
    fluidPort.p = setPressure;

    annotation (
        Icon(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Line(points = {
                    {0, 0}, 
                    {0, 100}}), 
                Line(points = {
                    {0, 0}, 
                    {-100, 0}}), 
                Ellipse(
                    fillColor = {255, 255, 255},
                    fillPattern = FillPattern.Solid,
                    extent = {
                        {-50, 50}, 
                        {50, -50}},
                    endAngle = 360), 
                Ellipse(
                    fillColor = {0, 0, 0},
                    fillPattern = FillPattern.Solid,
                    extent = {
                        {-20, 20}, 
                        {20, -20}},
                    endAngle = 360), 
                Polygon(
                    points = {
                        {59, 59}, 
                        {45, 51}, 
                        {51, 45}, 
                        {59, 59}},
                    lineColor = {0, 0, 0},
                    fillColor = {0, 0, 0},
                    fillPattern = FillPattern.Solid), 
                Line(
                    points = {
                        {-50, -50}, 
                        {50, 50}},
                    color = {0, 0, 0})}),
        Documentation(info = "<html>                           \n            <p>\n                The component VariablePressureSource provides a pressure according to the input signal\n                at Port setPressure.                             \n            </p></html>"));
end VariablePressureSource;