model DiffPressureSensor
extends HydraulicsByFluidon.Components.Sensors.Base.SensorTwoPort(forwardFluidProperties = false);
equation
value = fluidPortA.p - fluidPortB.p;
fluidPortA.mFlow = 0;
fluidPortB.mFlow = 0;
annotation (
Icon(
coordinateSystem(initialScale = 0.1),
graphics = {
Line(
rotation = 45,
points = {
{0, 25},
{0, -25}}),
Polygon(
origin = {40, -40},
rotation = 90,
fillPattern = FillPattern.Solid,
points = {
{59, 59},
{45, 51},
{51, 45},
{59, 59}}),
Text(
origin = {0, 22},
extent = {
{-30, -25},
{30, -55}},
textString = "dp")}),
Documentation(info = "<html>\n <p>\n DiffPressureSensor measures the pressures at both fluid ports and outputs the difference.\n </p>\n <p>\n Measured value = Pressure at fluidPortA minus pressure at fluidPortB\n </p></html>"));
end DiffPressureSensor;