model Pressure "Ideal pressure sensor"
extends Sensors.BaseClasses.PartialAbsoluteSensor;
extends Modelica.Icons.RotationalSensor;
Modelica.Blocks.Interfaces.RealOutput p(final quantity = "Pressure", final unit = "Pa", displayUnit = "bar", min = 0) "Pressure at port"
annotation (Placement(transformation(extent = {
{100, -10},
{120, 10}})));
equation
p = port.p;
annotation (
Icon(
coordinateSystem(
preserveAspectRatio = false,
extent = {
{-100, -100},
{100, 100}}),
graphics = {
Line(
points = {
{70, 0},
{100, 0}},
color = {0, 0, 127}),
Line(
points = {
{0, -70},
{0, -100}},
color = {0, 127, 255}),
Text(
extent = {
{-150, 80},
{150, 120}},
textString = "%name",
lineColor = {0, 0, 255}),
Text(
extent = {
{151, -20},
{57, -50}},
textString = "p")}),
Documentation(info = "<html>\n<p>\nThis component monitors the absolute pressure at its fluid port. The sensor is\nideal, i.e., it does not influence the fluid.\n</p>\n</html>"));
end Pressure;