package PneuBib package Interfaces model Bauteil "Grundgerüst aller Bausteine der PneuBib" constant Real pi = Modelica.Constants.pi; outer Modelica.Fluid.System system; // ermöglicht die Nutzung eines zentralen Systembausteins im Modell package Medium = Modelica.Media.Air.SimpleAir; // Definition des Mediums für alle Bausteine der PneuBib annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1}), graphics={ Text(origin = {0,130}, lineColor = {0,0,255}, extent = {{-150,20},{150,-20}}, textString = "%name")})); end Bauteil; connector PneumatikPort "identisch mit FluidPort der MFL" extends Modelica.Fluid.Interfaces.FluidPort; end PneumatikPort; connector PneuPort_a "Port mit Icon (Zufluss)" extends PneuBib.Interfaces.PneumatikPort; annotation(Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2}), graphics={ Ellipse(fillColor = {15,15,115}, fillPattern = FillPattern.Solid, extent = {{-40,40},{40,-40}}, endAngle = 360)}), Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2}), graphics={ Ellipse(fillColor = {15,15,115}, fillPattern = FillPattern.Solid, extent = {{-100,100},{100,-100}}, endAngle = 360)})); end PneuPort_a; connector PneuPort_b "Port mit Icon (Abfluss)" extends PneuBib.Interfaces.PneumatikPort; annotation(Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2}), graphics={ Ellipse(fillColor = {115,115,115}, fillPattern = FillPattern.Solid, extent = {{-40,40},{40,-40}}, endAngle = 360)}), Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2}), graphics={ Ellipse(fillColor = {115,115,115}, fillPattern = FillPattern.Solid, extent = {{-100,100},{100,-100}}, endAngle = 360)})); end PneuPort_b; model EinPort "erweitert Bauteil um einen Pneumatikanschluss" extends PneuBib.Interfaces.Bauteil; PneuBib.Interfaces.PneuPort_a port(redeclare package Medium = Medium) annotation(Placement(visible = true, transformation(origin = {100,0}, extent = {{-10,-10},{10,10}}, rotation = 0), iconTransformation(origin = {100,0}, extent = {{-10,-10},{10,10}}, rotation = 0))); annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2}))); end EinPort; model ZweiPorts "erweitert Bauteil um zwei Pneumatikanschlüsse" extends PneuBib.Interfaces.Bauteil; PneuBib.Interfaces.PneuPort_a port_a(redeclare package Medium = Medium) annotation(Placement(visible = true, transformation(origin = {-100,0}, extent = {{-10,-10},{10,10}}, rotation = 0), iconTransformation(origin = {-100,0}, extent = {{-10,-10},{10,10}}, rotation = 0))); PneuBib.Interfaces.PneuPort_b port_b(redeclare package Medium = Medium) annotation(Placement(visible = true, transformation(origin = {100,0}, extent = {{-10,-10},{10,10}}, rotation = 0), iconTransformation(origin = {100,-0}, extent = {{-10,-10},{10,10}}, rotation = 0))); end ZweiPorts; model RohrVolumenfrei "richtungsabhängiger Widerstand für gleichwertige Rohrlängen" // implementiert die Widerstandseigenschaften eines Rohres dessen Länge je // nach Flussrichtung veranderlich ist mit Hilfe des FlowModels der MFL extends PneuBib.Interfaces.ZweiPorts; extends PneuBib.Icons.Rohr; import Modelica.SIunits.*; outer Modelica.Fluid.System system; // Parameter parameter Length rauheit = 0.0001 "Rauheit des Rohres"; parameter Length durchmesser = 0.13 "Durchmesser des Rohres"; parameter Length l1 = 10 "Länge, wenn Fluss von a nach b"; parameter Length l2 = 5 "Länge, wenn Fluss von b nach a"; // Parameter für das FlowModel parameter Boolean allowFlowReversal = true; parameter Pressure p_a_start = system.p_start; parameter Pressure p_b_start = system.p_start; parameter Real nParallel = 1 "Anzahl paralleler Rohre"; parameter MassFlowRate m_flow_start = system.m_flow_start; // Innere Variablen Length umfang = pi * durchmesser; Area flaeche = durchmesser ^ 2 * pi / 4; Length L; replaceable model FlowModel = Modelica.Fluid.Pipes.BaseClasses.FlowModels.DetailedPipeFlow constrainedby Modelica.Fluid.Pipes.BaseClasses.FlowModels.PartialStaggeredFlowModel "Wall friction, gravity, momentum flow" annotation(Dialog(group = "Pressure loss"), choicesAllMatching = true); FlowModel flowModel( redeclare final package Medium = Medium, final n = 2, states = { Medium.setState_phX(port_a.p, inStream(port_a.h_outflow), inStream(port_a.Xi_outflow)), Medium.setState_phX(port_b.p, inStream(port_b.h_outflow), inStream(port_b.Xi_outflow))}, vs = { port_a.m_flow / Medium.density(flowModel.states[1]) / flowModel.crossAreas[1], -port_b.m_flow / Medium.density(flowModel.states[2]) / flowModel.crossAreas[2]} / nParallel, final momentumDynamics = Modelica.Fluid.Types.Dynamics.SteadyState, final allowFlowReversal = allowFlowReversal, final p_a_start = p_a_start, final p_b_start = p_b_start, final m_flow_start = m_flow_start, final nParallel = nParallel, final pathLengths = {L}, final crossAreas = {flaeche,flaeche}, final dimensions = {4*flaeche/umfang, 4*flaeche/umfang}, final roughnesses = {rauheit,rauheit}, final dheights = {0}, final g = system.g) "Flow model" annotation(Placement(transformation(extent = {{-38,-18},{38,18}}, rotation = 0))); equation L = if port_a.m_flow <= 0 then l1 else l2; port_a.m_flow = flowModel.m_flows[1]; 0 = port_a.m_flow + port_b.m_flow; port_a.Xi_outflow = inStream(port_b.Xi_outflow); port_b.Xi_outflow = inStream(port_a.Xi_outflow); port_a.C_outflow = inStream(port_b.C_outflow); port_b.C_outflow = inStream(port_a.C_outflow); port_b.h_outflow = inStream(port_a.h_outflow); port_a.h_outflow = inStream(port_b.h_outflow); end RohrVolumenfrei; package FunktionenTstueck extends Modelica.Icons.VariantsPackage; function Zetacs "computes the resistance coefficient for the straight flow of a tee junction assumes that the flow at both ends of the straight pipe have different signs" extends Modelica.Icons.Function; input Real q "branch volume flow / |combined volume flow|"; output Real zetacs "resistance coefficient of straight flow"; protected Real a; algorithm a := abs(q); if q > 0 then // converging, formula after Aigner (2008) zetacs := 0.05 + 1.34*a - 0.86*a^ 2; else // diverging, fits of diagram in Kinzelbach, lecture notes zetacs := -0.4167*a .^ 3 + 1.4286*a .^ 2 - 0.7619*a + 0.0371; end if; end Zetacs; function Zetacb "computes the resistance coefficions for the branch flow of a tee junction assumes that the flow at both ends of the straight pipe have different signs" extends Modelica.Icons.Function; input Real q "branch volume flow / |combined volume flow|"; output Real zetacb "resistance coefficient of branch flow"; protected Real a; algorithm a := abs(q); if q > 0 then // converging, formula after Aigner (2008) zetacb := -0.96 + 3.34*a - 1.39*a^ 2; else // diverging, fits of diagram in Kinzelbach, lecture notes zetacb := 0.8080*a .^ 2 - 0.4695*a + 0.9468; end if; end Zetacb; annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1}))); end FunktionenTstueck; extends Modelica.Icons.InterfacesPackage; end Interfaces; package Bauteile model Rohr "implementiert ein Modell für ein isothermes Rohr mit Volumen" extends PneuBib.Interfaces.ZweiPorts; extends PneuBib.Icons.Rohr; import Modelica.SIunits.*; parameter Length durchmesser = 0.13 "Durchmesser des Rohres"; parameter Length laenge = 10 "Länge des Rohres"; parameter Length rauheit = 0.0001 "Rauheit des Rohres"; // Initialization parameter Medium.MassFlowRate m_flow_start = system.m_flow_start "Start value for mass flow rate" annotation(Evaluate=true, Dialog(tab = "Initialization")); parameter AbsolutePressure p_a_start = system.p_start "Start value of pressure at port a [Pa]" annotation(Evaluate=true, Dialog(tab = "Initialization")); parameter AbsolutePressure p_b_start = p_a_start "Start value of pressure at port b [Pa]" annotation(Evaluate=true, Dialog(tab = "Initialization")); // bindet das Rohrmodell ein Modelica.Fluid.Pipes.DynamicPipe dynamicpipe1(redeclare package Medium = Medium, length = laenge, diameter = durchmesser, use_HeatTransfer = true, nNodes = 2, roughness = rauheit, m_flow_start = m_flow_start, p_a_start = p_a_start, p_b_start = p_b_start) annotation(Placement(visible = true, transformation(origin = {0,0}, extent = {{-10,-10},{10,10}}, rotation = 0))); // bindet eine feste Temperatur ein, welche von einem äußeren Systembaustein festgelegt wird Modelica.Thermal.HeatTransfer.Sources.FixedTemperature fixedtemperature1(T = system.T_ambient) annotation(Placement(visible = true, transformation(origin = {0,50}, extent = {{-10,-10},{10,10}}, rotation = -90))); equation connect(fixedtemperature1.port,dynamicpipe1.heatPorts[2]) annotation(Line(points={{0,40},{ 0,22},{0,4.4},{1.65,4.4}})); connect(fixedtemperature1.port,dynamicpipe1.heatPorts[1]) annotation(Line(points={{0,40},{ 0,22},{0,4.4},{-1.45,4.4}})); connect(dynamicpipe1.port_b,port_b) annotation(Line(points = {{10,0},{100,0}})); connect(port_a,dynamicpipe1.port_a) annotation(Line(points = {{-100,0},{-10,0}})); annotation ( Icon(coordinateSystem(extent={{-100,-100},{100,100}}, preserveAspectRatio=false, initialScale = 0.1, grid = {1,1}), graphics)); end Rohr; model Rohr1 "implementiert ein Modell für ein isothermes Rohr mit Volumen" extends PneuBib.Interfaces.ZweiPorts; extends PneuBib.Icons.Rohr; import Modelica.SIunits.*; parameter Length durchmesser = 0.13 "Durchmesser des Rohres"; parameter Length laenge = 10 "Länge des Rohres"; parameter Length rauheit = 0.0001 "Rauheit des Rohres"; // Initialization parameter Medium.MassFlowRate m_flow_start = system.m_flow_start "Start value for mass flow rate" annotation(Evaluate=true, Dialog(tab = "Initialization")); parameter AbsolutePressure p_a_start = system.p_start "Start value of pressure at port a [Pa]" annotation(Evaluate=true, Dialog(tab = "Initialization")); parameter AbsolutePressure p_b_start = p_a_start "Start value of pressure at port b [Pa]" annotation(Evaluate=true, Dialog(tab = "Initialization")); // bindet das Rohrmodell ein Modelica.Fluid.Pipes.DynamicPipe dynamicpipe1(redeclare package Medium = Medium, length = laenge, diameter = durchmesser, use_HeatTransfer = true, nNodes = 2, roughness = rauheit, m_flow_start = m_flow_start, p_a_start = p_a_start, p_b_start = p_b_start, redeclare model FlowModel = Modelica.Fluid.Pipes.BaseClasses.FlowModels.NominalLaminarFlow ( m_flow_nominal=0.1, Re_turbulent=1e10, dp_nominal=100)) annotation(Placement(visible = true, transformation(origin = {0,0}, extent = {{-10,-10},{10,10}}, rotation = 0))); // bindet eine feste Temperatur ein, welche von einem äußeren Systembaustein festgelegt wird Modelica.Thermal.HeatTransfer.Sources.FixedTemperature fixedtemperature1(T = system.T_ambient) annotation(Placement(visible = true, transformation(origin = {0,50}, extent = {{-10,-10},{10,10}}, rotation = -90))); equation connect(fixedtemperature1.port,dynamicpipe1.heatPorts[2]) annotation(Line(points={{0,40},{ 0,22},{0,4.4},{1.65,4.4}})); connect(fixedtemperature1.port,dynamicpipe1.heatPorts[1]) annotation(Line(points={{0,40},{ 0,22},{0,4.4},{-1.45,4.4}})); connect(dynamicpipe1.port_b,port_b) annotation(Line(points = {{10,0},{100,0}})); connect(port_a,dynamicpipe1.port_a) annotation(Line(points = {{-100,0},{-10,0}})); annotation ( Icon(coordinateSystem(extent={{-100,-100},{100,100}}, preserveAspectRatio=false, initialScale = 0.1, grid = {1,1}), graphics)); end Rohr1; model Tank "implementiert das Modell eines isothermen Tanks mit bis zu zwei Anschlüssen" import Modelica.SIunits.*; extends PneuBib.Interfaces.ZweiPorts; extends PneuBib.Icons.Tank; parameter Volume Volumen = 3 "Volumen des Tanks"; parameter Pressure p0 = system.p_start "Anfangsdruck"; // bindet das Volumenmodell ein Modelica.Fluid.Vessels.ClosedVolume volume(redeclare package Medium = Medium, V = Volumen, nPorts = 2, use_HeatTransfer = true, use_T_start = true, use_portsData = false, p_start = p0) annotation(Placement(visible = true, transformation(origin = {0,20}, extent = {{-10,-10},{10,10}}, rotation = 0))); // bindet eine feste Temperatur ein, welche von einem äußeren Systembaustein festgelegt wird Modelica.Thermal.HeatTransfer.Sources.FixedTemperature fixedtemperature1(T = system.T_ambient) annotation(Placement(visible = true, transformation(origin = {-60,20}, extent = {{-10,-10},{10,10}}, rotation = 0))); equation connect(fixedtemperature1.port,volume.heatPort) annotation(Line(points={{-50,20}, {-9.95025,20},{-10,20}})); connect(port_b,volume.ports[2]) annotation(Line(points={{100,0},{-1.99005, 0},{-1.99005,10},{2,10}})); connect(port_a,volume.ports[1]) annotation(Line(points={{-100,0},{ -2.98507,0},{-2.98507,10},{-2,10}})); annotation(Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Documentation(info = "
Zu beachten:
Zu beachten:
Zu beachten:
DN | dinnen [mm] | Lg[m] | Ls[m] | Ls,2[m] |
25 | 27.2 | 0.5 | 1.5 | 2 |
40 | 41.8 | 0.8 | 2.4 | 3 |
50 | 53.0 | 1.0 | 3.0 | 4 |
80 | 80.8 | 1.6 | 4.8 | 7 |
100 | 105.3 | 2 | 6 | 10 |
125 | 130 | 2.5 | 7.5 | 15 |
150 | 155.4 | 3 | 9 | 20 |
200 | 4 | 12 | ||
250 | 5 | 15 | ||
300 | 6 | 18 | ||
400 | 8 | 24 |
Zu beachten:
Zu beachten:
Zu beachten:
Zu beachten:
Zu beachten:
Zu beachten:
Zu beachten:
Zu beachten:
Zu beachten:
Zu beachten:
Zu beachten:
Zu beachten:
Fasst den Input des Drucks und den Output des Volumenstroms als ein Signal zusammen
")); end transKompressor; model transRegler "Signaladapter Kompressorseitig" PneuBib.KompressorRegler.SignalRegelung Signal annotation(Placement(visible = true, transformation(origin = {-100,0}, extent = {{-10,-10},{10,10}}, rotation = 0), iconTransformation(origin = {-100,0}, extent = {{-10,-10},{10,10}}, rotation = 0))); Modelica.Blocks.Interfaces.RealOutput Druck annotation(Placement(visible = true, transformation(origin = {100,-20}, extent = {{-10,-10},{10,10}}, rotation = 0), iconTransformation(origin = {100,-20}, extent = {{-10,-10},{10,10}}, rotation = 0))); Modelica.Blocks.Interfaces.RealInput Volumenstrom annotation(Placement(visible = true, transformation(origin = {90,20}, extent = {{-10,-10},{10,10}}, rotation = 0), iconTransformation(origin = {100,20}, extent = {{-10,-10},{10,10}}, rotation = 0))); equation Druck = Signal.Druck; Volumenstrom = Signal.Volumenstrom; annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1}), graphics={ Rectangle(fillColor = {0,0,150}, fillPattern = FillPattern.Solid, extent = {{-100,50},{100,-50}})}), Documentation(info = "Fasst den Output des Drucks und den Input des Volumenstroms als ein Signal zusammen
")); end transRegler; model flop "Regelelement für Kompressoren mit konstantem Förderstrom" Modelica.Blocks.Logical.RSFlipFlop rsflipflop1 annotation(Placement(visible = true, transformation(origin = {0,-60}, extent = {{-10,-10},{10,10}}, rotation = -90))); Modelica.Blocks.Interfaces.BooleanOutput y annotation(Placement(visible = true, transformation(origin = {0,-100}, extent = {{-10,-10},{10,10}}, rotation = -90), iconTransformation(origin = {0,-100}, extent = {{-10,-10},{10,10}}, rotation = -90))); Modelica.Blocks.Interfaces.RealInput max annotation(Placement(visible = true, transformation(origin = {-80,100}, extent = {{-10,-10},{10,10}}, rotation = -90), iconTransformation(origin = {-60,100}, extent = {{-10,-10},{10,10}}, rotation = -90))); Modelica.Blocks.Math.Add add1 annotation(Placement(visible = true, transformation(origin = {-70,40}, extent = {{-10,-10},{10,10}}, rotation = -90))); Modelica.Blocks.Logical.GreaterEqual greaterequal1 annotation(Placement(visible = true, transformation(origin = {-60,-30}, extent = {{-10,-10},{10,10}}, rotation = -90))); Modelica.Blocks.Logical.LessEqual lessequal1 annotation(Placement(visible = true, transformation(origin = {20,-30}, extent = {{-10,-10},{10,10}}, rotation = -90))); Modelica.Blocks.Math.Add add2 annotation(Placement(visible = true, transformation(origin = {10,40}, extent = {{-10,-10},{10,10}}, rotation = -90))); Modelica.Blocks.Interfaces.RealInput p annotation(Placement(visible = true, transformation(origin = {70,100}, extent = {{-10,-10},{10,10}}, rotation = -90), iconTransformation(origin = {-20,100}, extent = {{-10,-10},{10,10}}, rotation = -90))); Modelica.Blocks.Interfaces.RealInput soll annotation(Placement(visible = true, transformation(origin = {-30,100}, extent = {{-10,-10},{10,10}}, rotation = -90), iconTransformation(origin = {20,100}, extent = {{-10,-10},{10,10}}, rotation = -90))); Modelica.Blocks.Interfaces.RealInput min annotation(Placement(visible = true, transformation(origin = {10,100}, extent = {{-10,-10},{10,10}}, rotation = -90), iconTransformation(origin = {60,100}, extent = {{-10,-10},{10,10}}, rotation = -90))); equation connect(p,lessequal1.u1) annotation(Line(points={{70,100},{70,-5.57214},{ 20.6169,-5.57214},{20.6169,-18},{20,-18}})); connect(p,greaterequal1.u1) annotation(Line(points={{70,100},{70,-5.57214}, {-58.5075,-5.57214},{-58.5075,-18},{-60,-18}})); connect(min,add2.u1) annotation(Line(points={{10,100},{10,52.9353},{16, 52.9353},{16,52}})); connect(soll,add2.u2) annotation(Line(points={{-30,100},{-30,71.8806},{ 3.9005,71.8806},{3.9005,52},{4,52}})); connect(soll,add1.u1) annotation(Line(points={{-30,100},{-30,71.8806},{ -62.408,71.8806},{-62.408,52},{-64,52}})); connect(max,add1.u2) annotation(Line(points={{-80,100},{-80,34.3284},{-76, 34.3284},{-76,52}})); connect(add2.y,lessequal1.u2) annotation(Line(points={{10,29},{10, -16.4179},{12,-16.4179},{12,-18}})); connect(add1.y,greaterequal1.u2) annotation(Line(points={{-70,29},{-70, -34.3284},{-68,-34.3284},{-68,-18}})); connect(greaterequal1.y,rsflipflop1.R) annotation(Line(points={{-60,-41}, {-60,-46.2687},{-6,-46.2687},{-6,-48}})); connect(rsflipflop1.Q,y) annotation(Line(points={{6,-71},{6,-91.0448},{ -0.497512,-91.0448},{-0.497512,-100},{0,-100}})); connect(lessequal1.y,rsflipflop1.S) annotation(Line(points = {{20,-41},{20,-48.2742},{6,-48.2742},{6,-48}})); annotation(Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1})), Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1}), graphics={ Rectangle(extent = {{-100,100},{100,-100}})}), Documentation(info = "wenn p unter (soll+min) fällt wird y auf true gesetzt, bis p über (soll+max) steigt
")); end flop; model einzelregelung "Regelung einer Kompressorstation" parameter Real vol1 = 15.84 "maximaler volumenstrom Kompressor1"; parameter Real vol1_min = 3.84 "minimaler volumenstrom Kompressor1"; parameter Real vol2 = 16.75 "volumenstrom Kompressor2"; parameter Real vol3 = 10.35 "volumenstrom Kompressor3"; parameter Real vol4 = 12 "volumenstrom Kompressor4"; Modelica.Blocks.Sources.Constant constant7(k = 20000.0) annotation(Placement(visible = true, transformation(origin = {-110,190}, extent = {{-10,-10},{10,10}}, rotation = -90))); Modelica.Blocks.Sources.Constant constant3(k = 15000.0) annotation(Placement(visible = true, transformation(origin = {-90,170}, extent = {{-10,-10},{10,10}}, rotation = -90))); Modelica.Blocks.Sources.Constant constant11(k = vol2) annotation(Placement(visible = true, transformation(origin = {-150,60}, extent = {{-10,-10},{10,10}}, rotation = 0))); Modelica.Blocks.Sources.Constant constant2(k = 0) annotation(Placement(visible = true, transformation(origin = {-150,90}, extent = {{-10,-10},{10,10}}, rotation = 0))); PneuBib.KompressorRegler.flop flop2 annotation(Placement(visible = true, transformation(origin = {-110,110}, extent = {{-10,-10},{10,10}}, rotation = 0))); Modelica.Blocks.Interfaces.RealOutput y annotation(Placement(visible = true, transformation(origin = {-30,-100}, extent = {{-10,-10},{10,10}}, rotation = -90), iconTransformation(origin = {-100,10}, extent = {{-10,-10},{10,10}}, rotation = 180))); Modelica.Blocks.Sources.Constant constant10(k = vol3) annotation(Placement(visible = true, transformation(origin = {-150,30}, extent = {{-10,-10},{10,10}}, rotation = 0))); Modelica.Blocks.Sources.Constant const(k = vol4) annotation(Placement(visible = true, transformation(origin = {-150,0}, extent = {{-10,-10},{10,10}}, rotation = 0))); Modelica.Blocks.Logical.Switch switch2 annotation(Placement(visible = true, transformation(origin = {-110,-20}, extent = {{-10,-10},{10,10}}, rotation = -90))); PneuBib.KompressorRegler.flop flop3 annotation(Placement(visible = true, transformation(origin = {-40,110}, extent = {{-10,-10},{10,10}}, rotation = 0))); Modelica.Blocks.Sources.Constant constant4(k = 5000.0) annotation(Placement(visible = true, transformation(origin = {-50,190}, extent = {{-10,-10},{10,10}}, rotation = -90))); Modelica.Blocks.Sources.Constant constant8(k = 10000.0) annotation(Placement(visible = true, transformation(origin = {-30,170}, extent = {{-10,-10},{10,10}}, rotation = -90))); PneuBib.KompressorRegler.flop flop4 annotation(Placement(visible = true, transformation(origin = {40,110}, extent = {{-10,-10},{10,10}}, rotation = 0))); Modelica.Blocks.Sources.Constant constant5(k = 0) annotation(Placement(visible = true, transformation(origin = {50,170}, extent = {{-10,-10},{10,10}}, rotation = -90))); Modelica.Blocks.Sources.Constant constant9(k = 5000.0) annotation(Placement(visible = true, transformation(origin = {30,190}, extent = {{-10,-10},{10,10}}, rotation = -90))); Modelica.Blocks.Logical.Switch switch4 annotation(Placement(visible = true, transformation(origin = {40,-20}, extent = {{-10,-10},{10,10}}, rotation = -90))); PneuBib.KompressorRegler.DrehzahlRegler drehzahlregler1(V_max = vol1, V_min = vol1_min) annotation(Placement(visible = true, transformation(origin = {80,-20}, extent = {{-10,-10},{10,10}}, rotation = 0))); Modelica.Blocks.Interfaces.RealInput Ist_druck annotation(Placement(visible = true, transformation(origin = {100,130}, extent = {{10,-10},{-10,10}}, rotation = 0), iconTransformation(origin = {100,-50}, extent = {{10,-10},{-10,10}}, rotation = 0))); Modelica.Blocks.Interfaces.RealInput Solldruck annotation(Placement(visible = true, transformation(origin = {100,150}, extent = {{10,-10},{-10,10}}, rotation = 0), iconTransformation(origin = {100,60}, extent = {{10,-10},{-10,10}}, rotation = 0))); Modelica.Blocks.Logical.Switch switch3 annotation(Placement(visible = true, transformation(origin = {-40,-20}, extent = {{-10,-10},{10,10}}, rotation = -90))); Modelica.Blocks.Continuous.FirstOrder firstorder1(T = 0.1) annotation(Placement(visible = true, transformation(origin = {-30,-80}, extent = {{10,-10},{-10,10}}, rotation = 90))); Modelica.Blocks.Math.MultiSum multisum1(nu = 4) annotation(Placement(visible = true, transformation(origin = {-30,-60}, extent = {{-10,-10},{10,10}}, rotation = -90))); equation connect(drehzahlregler1.y,multisum1.u[4]) annotation(Line(points={{80,-30}, {79.8507,-30},{79.8507,-39.5522},{-30.597,-39.5522},{-30.597,-50}, {-35.25,-50}})); connect(switch4.y,multisum1.u[3]) annotation(Line(points={{40,-31},{40, -39.5522},{-30.597,-39.5522},{-30.597,-50},{-31.75,-50}})); connect(switch3.y,multisum1.u[2]) annotation(Line(points={{-40,-31},{-40, -39.5522},{-30.597,-39.5522},{-30.597,-50},{-28.25,-50}})); connect(switch2.y,multisum1.u[1]) annotation(Line(points={{-110,-31},{ -110,-39.5522},{-30.597,-39.5522},{-30.597,-50},{-24.75,-50}})); connect(constant2.y,switch2.u3) annotation(Line(points={{-139,90},{ -117.91,90},{-117.91,-5.97015},{-118,-5.97015},{-118,-8}})); connect(constant2.y,switch3.u3) annotation(Line(points={{-139,90},{ -48.5075,90},{-48.5075,-6.71642},{-48,-6.71642},{-48,-8}})); connect(constant2.y,switch4.u3) annotation(Line(points={{-139,90},{ 31.3433,90},{31.3433,-8},{32,-8}})); connect(constant11.y,switch2.u1) annotation(Line(points={{-139,60},{ -102.985,60},{-102.985,-8},{-102,-8}})); connect(constant10.y,switch3.u1) annotation(Line(points={{-139,30},{ -32.8358,30},{-32.8358,-8},{-32,-8}})); connect(const.y,switch4.u1) annotation(Line(points={{-139,0},{47.0149,0}, {47.0149,-8},{48,-8}})); connect(flop2.y,switch2.u2) annotation(Line(points={{-110,100},{-110.448, 100},{-110.448,-8},{-110,-8}})); connect(flop3.y,switch3.u2) annotation(Line(points={{-40,100},{-40.2985, 100},{-40.2985,-8},{-40,-8}})); connect(multisum1.y,firstorder1.u) annotation(Line(points = {{-30,-71.7},{-30,-67.9104},{-30,-67.9104},{-30,-68}})); connect(firstorder1.y,y) annotation(Line(points = {{-30,-91},{-30,-92.5373},{-30,-92.5373},{-30,-100}})); connect(flop4.y,switch4.u2) annotation(Line(points={{40,100},{39.5522,100}, {39.5522,-8},{40,-8}})); connect(constant5.y,flop4.min) annotation(Line(points={{50,159},{50, 137.313},{46.2687,137.313},{46.2687,120},{46,120}})); connect(constant9.y,flop4.max) annotation(Line(points={{30,179},{30, 143.284},{33.5821,143.284},{33.5821,120},{34,120}})); connect(constant8.y,flop3.min) annotation(Line(points={{-30,159},{-30, 137.313},{-33.5821,137.313},{-33.5821,120},{-34,120}})); connect(constant4.y,flop3.max) annotation(Line(points={{-50,179},{-50, 170.896},{-47.0149,170.896},{-47.0149,120},{-46,120}})); connect(constant3.y,flop2.min) annotation(Line(points={{-90,159},{-90, 141.045},{-103.731,141.045},{-103.731,120},{-104,120}})); connect(constant7.y,flop2.max) annotation(Line(points={{-110,179},{-110, 171.642},{-117.164,171.642},{-117.164,120},{-116,120}})); connect(Solldruck,flop4.soll) annotation(Line(points={{100,150},{42.5373, 150},{42.5373,120},{42,120}})); connect(Solldruck,flop3.soll) annotation(Line(points={{100,150},{-38.0597, 150},{-38.0597,120},{-38,120}})); connect(Solldruck,flop2.soll) annotation(Line(points={{100,150},{-108.209, 150},{-108.209,120},{-108,120}})); connect(Ist_druck,drehzahlregler1.u) annotation(Line(points={{100,130},{ 79.1045,130},{79.1045,-10},{80,-10}})); connect(Ist_druck,flop4.p) annotation(Line(points={{100,130},{38.0597,130}, {38.0597,120},{38,120}})); connect(Ist_druck,flop3.p) annotation(Line(points={{100,130},{-42.5373, 130},{-42.5373,120},{-42,120}})); connect(Ist_druck,flop2.p) annotation(Line(points={{100,130},{-111.194, 130},{-111.194,120},{-112,120}})); annotation(Diagram(coordinateSystem(extent = {{-160,-100},{100,200}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1})), Icon(coordinateSystem(extent = {{-160,-100},{100,200}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1}), graphics={ Rectangle(origin = {-19.03,23.16}, fillPattern = FillPattern.Solid, extent = {{-81.15000000000001,52.6},{118.85,-89.95}})}), Ducumentation(info = "Regelt den Volumenstrom einer Kompressorstation in drei Schritten einer Kaskadensteuerung und einem drehzahlgeregelten Anteil. Der Volumenstrom wird in m^3/min ausgegeben
")); end einzelregelung; model VerbraucherPulse "geglättetes Rechtecksignal" parameter Integer anzahl = 6 "Anzahl der Verbraucher"; parameter Real leckage = 0.2871 "Gesamtleckage in kg/s"; parameter Real amplitude = leckage / (anzahl * 3) "Amplitude"; parameter Real width(final min = Modelica.Constants.small, final max = 100) = 50 "prozentualer Anteil der Amplitude"; parameter Modelica.SIunits.Time period(final min = Modelica.Constants.small, start = 1) "Periodendauer"; parameter Integer nperiod = -1 "Wiederholung der Schwingung (< 0 unendliche Schwingung)"; parameter Real offset = 0 "zusätzlicher Offset"; parameter Modelica.SIunits.Time startTime = 0 "Output = offset for time < startTime"; extends Modelica.Blocks.Interfaces.SO; Modelica.Blocks.Sources.Pulse pulse1(amplitude = amplitude, width = width, period = period, nperiod = nperiod, offset = offset + leckage / anzahl, startTime = startTime) annotation(Placement(visible = true, transformation(origin = {-80,0}, extent = {{-10,-10},{10,10}}, rotation = 0))); Modelica.Blocks.Continuous.FirstOrder firstorder1(T = 0.1) annotation(Placement(visible = true, transformation(origin = {0,0}, extent = {{-10,-10},{10,10}}, rotation = 0))); equation connect(firstorder1.y,y) annotation(Line(points={{11,0},{102.488,0},{110, 0}})); connect(pulse1.y,firstorder1.u) annotation(Line(points={{-69,0},{-14.4279, 0},{-12,0}})); annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1})), Documentation(info = "gibt ein mit dem Baustein 'FirstOrder' (k=0.1 s) geglättetes Signal mit dem Offset von offset+leckage/anzahl
")); end VerbraucherPulse; connector SignalRegelung "Signalanschluss an der Regelungsseite" input Real Druck; output Real Volumenstrom; annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1}), graphics={ Ellipse(fillColor = {0,0,150}, fillPattern = FillPattern.Solid, extent = {{0,50},{100,-50}}, endAngle = 360),Polygon(origin = {-50,0}, fillColor = {0,0,150}, fillPattern = FillPattern.Solid, points = {{50,50},{50,-50},{-50,0},{50,50}})}), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1}), graphics={ Ellipse(fillColor = {0,0,150}, fillPattern = FillPattern.Solid, extent = {{0,50},{100,-50}}, endAngle = 360),Polygon(origin = {-50,0}, fillColor = {0,0,150}, fillPattern = FillPattern.Solid, points = {{50,50},{50,-50},{-50,0},{50,50}})})); end SignalRegelung; model Kompressorregelung "Regelt drei Kompressorstationen unabhängig voneinander" PneuBib.KompressorRegler.transRegler transRegler1 annotation(Placement(visible = true, transformation(origin = {-70,-80}, extent = {{-10,-10},{10,10}}, rotation = 0))); PneuBib.KompressorRegler.transRegler transRegler3 annotation(Placement(visible = true, transformation(origin = {-70,80}, extent = {{-10,-10},{10,10}}, rotation = 0))); PneuBib.KompressorRegler.transRegler transRegler2 annotation(Placement(visible = true, transformation(origin = {-70,0}, extent = {{-10,-10},{10,10}}, rotation = 0))); PneuBib.KompressorRegler.SignalRegelung Haupt annotation(Placement(visible = true, transformation(origin = {-100,0}, extent = {{-10,-10},{10,10}}, rotation = 0), iconTransformation(origin = {-100,0}, extent = {{-10,-10},{10,10}}, rotation = 0))); PneuBib.KompressorRegler.SignalRegelung MSK annotation(Placement(visible = true, transformation(origin = {-100,80}, extent = {{-10,-10},{10,10}}, rotation = 0), iconTransformation(origin = {-100,-80}, extent = {{-10,-10},{10,10}}, rotation = 0))); PneuBib.KompressorRegler.SignalRegelung Versand annotation(Placement(visible = true, transformation(origin = {-100,-80}, extent = {{-10,-10},{10,10}}, rotation = 0), iconTransformation(origin = {-100,80}, extent = {{-10,-10},{10,10}}, rotation = 0))); PneuBib.KompressorRegler.einzelregelung einzelregelung1(vol1 = 0, vol1_min = 0, vol2 = 8.15, vol3 = 0, vol4 = 8.15) annotation(Placement(visible = true, transformation(origin = {-30,80}, extent = {{-10,-10},{10,10}}, rotation = 0))); Modelica.Blocks.Sources.Constant Solldruck(k = 800000.0) annotation(Placement(visible = true, transformation(origin = {20,90}, extent = {{10,-10},{-10,10}}, rotation = 90))); Modelica.Blocks.Math.MultiSum multisum1(nu = 3) annotation(Placement(visible = true, transformation(origin = {50,10}, extent = {{-10,-10},{10,10}}, rotation = 0))); Modelica.Blocks.Interfaces.RealOutput Liefermenge annotation(Placement(visible = true, transformation(origin = {110,10}, extent = {{-10,-10},{10,10}}, rotation = 0), iconTransformation(origin = {0,0}, extent = {{0,0},{0,0}}, rotation = 0))); Modelica.Blocks.Math.MultiSum multisum2(nu = 3) annotation(Placement(visible = true, transformation(origin = {50,-30}, extent = {{-10,-10},{10,10}}, rotation = 0))); Modelica.Blocks.Math.Gain Netzdruck(k = 1 / 3) annotation(Placement(visible = true, transformation(origin = {80,-30}, extent = {{-10,-10},{10,10}}, rotation = 0))); PneuBib.KompressorRegler.einzelregelung einzelregelung3(vol1 = 15.84 + 16.75 + 10.35 + 12, vol2 = 0, vol3 = 0, vol4 = 0) annotation(Placement(visible = true, transformation(origin = {-30,0}, extent = {{-12.3077,-6.66665},{7.69231,13.3333}}, rotation = 0))); PneuBib.KompressorRegler.einzelregelung einzelregelung2(vol1 = 20.3, vol1_min = 4.25, vol2 = 0, vol3 = 0, vol4 = 0) annotation(Placement(visible = true, transformation(origin = {-30,-80}, extent = {{-12.3077,-6.66665},{7.69231,13.3333}}, rotation = 0))); equation connect(einzelregelung2.Ist_druck,multisum2.u[3]) annotation(Line(points={{ -22.3077,-83.3333},{-3.48259,-83.3333},{-3.48259,-30.3483},{40, -30.3483},{40,-34.6667}})); connect(transRegler1.Volumenstrom,einzelregelung2.y) annotation(Line(points={{-60,-78}, {-44.2786,-78},{-44.2786,-79.1045},{-37.6923,-79.1045},{-37.6923, -79.3333}})); connect(transRegler1.Druck,einzelregelung2.Ist_druck) annotation(Line(points={{-60,-82}, {-48.2587,-82},{-48.2587,-87.0647},{-15.4229,-87.0647},{-15.4229, -83.3333},{-22.3077,-83.3333},{-22.3077,-83.3333}})); connect(Solldruck.y,einzelregelung2.Solldruck) annotation(Line(points={{20,79}, {20,-76},{-22.3077,-76},{-22.3077,-76}})); connect(einzelregelung3.Ist_druck,multisum2.u[2]) annotation(Line(points={{ -22.3077,-3.33333},{-3.48259,-3.33333},{-3.48259,-30.3483},{40, -30.3483},{40,-30}})); connect(transRegler2.Volumenstrom,einzelregelung3.y) annotation(Line(points={{-60,2}, {-44.7761,2},{-44.7761,0.666665},{-37.6923,0.666665}})); connect(transRegler2.Druck,einzelregelung3.Ist_druck) annotation(Line(points={{-60,-2}, {-45.7711,-2},{-45.7711,-9.95025},{-17.9104,-9.95025},{-17.9104, -2.98507},{-22.3077,-2.98507},{-22.3077,-3.33333}})); connect(Solldruck.y,einzelregelung3.Solldruck) annotation(Line(points={{20,79}, {20,3.48259},{-22.3077,3.48259},{-22.3077,3.99999}})); connect(multisum1.y,Liefermenge) annotation(Line(points={{61.7,10},{ 104.975,10},{104.975,10},{110,10}})); connect(einzelregelung1.Ist_druck,multisum2.u[1]) annotation(Line(points={{-20, 73.3333},{-3.48259,73.3333},{-3.48259,-30.3483},{40,-30.3483},{40, -25.3333}})); connect(multisum2.y,Netzdruck.u) annotation(Line(points={{61.7,-30},{ 68.1592,-30},{68.1592,-30},{68,-30}})); connect(transRegler1.Volumenstrom,multisum1.u[3]) annotation(Line(points={{-60,-78}, {-51.2438,-78},{-51.2438,11.9403},{40,11.9403},{40,5.33333}})); connect(transRegler2.Volumenstrom,multisum1.u[2]) annotation(Line(points={{-60,2}, {-51.2438,2},{-51.2438,11.9403},{40,11.9403},{40,10}})); connect(transRegler3.Volumenstrom,multisum1.u[1]) annotation(Line(points={{-60,82}, {-51.2438,82},{-51.2438,11.9403},{40,11.9403},{40,14.6667}})); connect(transRegler3.Volumenstrom,einzelregelung1.y) annotation(Line(points={{-60,82}, {-38.3085,82},{-38.3085,77.3333},{-35.3846,77.3333}})); connect(transRegler3.Druck,einzelregelung1.Ist_druck) annotation(Line(points={{-60,78}, {-53.2338,78},{-53.2338,68.6567},{-14.9254,68.6567},{-14.9254, 76.6169},{-20,76.6169},{-20,73.3333}})); connect(Solldruck.y,einzelregelung1.Solldruck) annotation(Line(points={{20,79}, {20,83.5821},{-20,83.5821},{-20,80.6667}})); connect(MSK,transRegler3.Signal) annotation(Line(points={{-100,80},{ -80.0995,80},{-80,80}})); connect(Haupt,transRegler2.Signal) annotation(Line(points={{-100,0},{ -80.597,0},{-80,0}})); connect(Versand,transRegler1.Signal) annotation(Line(points={{-100,-80},{ -81.0945,-80},{-81.0945,-80},{-80,-80}})); annotation(Diagram(coordinateSystem(extent={{-100,-100},{100,100}}, preserveAspectRatio=false, initialScale = 0.1, grid = {1,1}), graphics), Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1}), graphics={ Rectangle( fillPattern = FillPattern.Solid, extent = {{-100,100},{100,-100}})}), Documentation(info = "Die drei Kompressorstationen werden unabhängig von einander über jeweils eine entsprechende Einzelsteuerung geregelt. Zusätzlich wird für Vergleichszwecke über das arithmetische Mittel ein Netzdruck bestimmt und die Summe der Ausgehenden Volumenströme Berechnet
")); end Kompressorregelung; model Kompressor "Zusammenfassung von Kompressor, Sensoren und Tank" extends PneuBib.Interfaces.EinPort; extends PneuBib.Icons.Tank; import Modelica.SIunits.*; parameter Volume Volumen = 5 "Tankvolumen"; parameter Pressure p0 = system.p_start "Anfangsdruck"; PneuBib.Bauteile.Tank tank1(Volumen = Volumen, p0=p0) annotation(Placement(visible = true, transformation(origin={72,0}, extent = {{-10,-10},{10,10}}, rotation = 0))); PneuBib.Sensoren.Druck druck1 annotation(Placement(visible = true, transformation(origin = {70,30}, extent = {{-10,-10},{10,10}}, rotation = 0))); PneuBib.KompressorRegler.SignalKompressor Signal annotation(Placement(visible = true, transformation(origin = {-20,100}, extent = {{10,-10},{-10,10}}, rotation = 90), iconTransformation(origin={1,150}, extent = {{-10,-10},{10,10}}, rotation = -90))); PneuBib.QuellenVerbraucher.VolumenstromAussendruck volumenstromaussendruck1 annotation(Placement(visible = true, transformation(origin = {-20,0}, extent = {{-10,-10},{10,10}}, rotation = 0))); Modelica.Blocks.Math.Gain gain1(k = 1 / 60) annotation(Placement(visible = true, transformation(origin = {-20,30}, extent = {{-5,-5},{5,5}}, rotation = -90))); PneuBib.KompressorRegler.transKompressor Uebersetzer annotation(Placement(visible = true, transformation(origin = {-20,60}, extent = {{-10,-10},{10,10}}, rotation = -90))); equation connect(volumenstromaussendruck1.port,tank1.port_a) annotation(Line(points={{-10,0}, {62,0}})); connect(Signal,Uebersetzer.Signal) annotation(Line(points={{-20,100},{-20, 70.5077},{-20,70}})); connect(Uebersetzer.Druck,druck1.y) annotation(Line(points={{-18,50},{-18, 39.801},{68.6239,39.801},{68.6239,39.4954}})); connect(Uebersetzer.Volumenstrom,gain1.u) annotation(Line(points = {{-22,50},{-22,36.3184},{-20,36.3184},{-20,36}})); connect(gain1.y,volumenstromaussendruck1.u) annotation(Line(points={{-20, 24.5},{-20,10.9453},{-20,10}})); connect(druck1.port,tank1.port_b) annotation(Line(points={{80,30},{ 88.5572,30},{88.5572,0},{82,0}})); connect(tank1.port_b,port) annotation(Line(points={{82,0},{100,0}})); annotation ( Icon( coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1}), graphics={ Rectangle(fillColor = {0,0,200}, fillPattern = FillPattern.Solid, extent = {{-100,100},{100,-100}})}), Documentation(info = "Als Signal wird der Volumenstrom in m^3/min erwartet
")); end Kompressor; model DrehzahlRegler "Regelelement für drehzahlgeregelte Kompressoren" import Modelica.SIunits.*; parameter Pressure p_max = 820000.0 "Maximaldruck"; parameter Pressure p_min = 800000.0 "Minimaldruck"; parameter VolumeFlowRate V_max = 20.3 "Maximaler Volumenstrom"; parameter VolumeFlowRate V_min = 4.25 "Mainimaler Volumenstrom"; Real a = (V_min * p_min - V_max * p_max) / (p_min - p_max); Real b = -(V_min - V_max) / (p_min - p_max); Real e; Modelica.Blocks.Interfaces.RealInput u annotation(Placement(visible = true, transformation(origin = {-10,100}, extent = {{-10,-10},{10,10}}, rotation = -90), iconTransformation(origin = {0,100}, extent = {{-10,-10},{10,10}}, rotation = -90))); Modelica.Blocks.Interfaces.RealOutput y annotation(Placement(visible = true, transformation(origin = {0,-100}, extent = {{-10,-10},{10,10}}, rotation = -90), iconTransformation(origin = {0,-100}, extent = {{-10,-10},{10,10}}, rotation = -90))); equation e = a + b * u; y = if u < p_max then min(V_max, max(e, V_min)) else V_min; annotation(Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1})), Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1}), graphics={ Polygon(origin = {-0.15,0.02}, points = {{0,100},{-100,0},{0,-100},{100,0},{0,100}})}), Documentation(info = "Nimmt einen Linearen zusammenhang zwischen Druck und gelieferten Volumenstrom an. Der Maximale Volumenstrom wird bei minimalem Druck (und drunter) geliefert und der minimale Volumenstrom bai maximalen Druck (und drüber)
")); end DrehzahlRegler; connector SignalKompressor "Signalanschluss an der Kompressorseite" input Real Volumenstrom; output Real Druck; annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1}), graphics={ Ellipse(fillColor = {0,0,150}, fillPattern = FillPattern.Solid, extent = {{0,50},{100,-50}}, endAngle = 360),Polygon(origin = {-50,0}, fillColor = {0,0,150}, fillPattern = FillPattern.Solid, points = {{-50,50},{-50,-50},{50,0},{-50,50}})}), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1}), graphics={ Ellipse(fillColor = {0,0,150}, fillPattern = FillPattern.Solid, extent = {{0,50},{100,-50}}, endAngle = 360),Polygon(origin = {-50,0}, fillColor = {0,0,150}, fillPattern = FillPattern.Solid, points = {{-50,50},{-50,-50},{50,0},{-50,50}})})); end SignalKompressor; model KompressorRegelungPID "Einfache Kompressorregelung zur Erreichung des Betriebsdrucks" import Modelica.SIunits.*; parameter Pressure pC = 8e5 "setpoint of the the pressure"; SignalRegelung Signal annotation (Placement( visible=true, transformation( origin={-100,0}, extent={{-10,-10},{10,10}}, rotation=0), iconTransformation( origin={-100,0}, extent={{-10,-10},{10,10}}, rotation=0))); transRegler splitSignal annotation (Placement(visible=true, transformation( origin={-79,0}, extent={{-5,-10},{5,10}}, rotation=0))); Modelica.Blocks.Continuous.PID PID( initType=Modelica.Blocks.Types.InitPID.InitialState, Ti=5, k=1e-4, Td=1000) annotation (Placement(transformation(extent={{6,15},{-14,35}}))); Modelica.Blocks.Sources.Constant const(k=pC) annotation (Placement( transformation( extent={{10,-10},{-10,10}}, rotation=0, origin={58,25}))); Modelica.Blocks.Math.Feedback feedback annotation (Placement(transformation(extent={{33,15},{13,35}}))); Modelica.Blocks.Nonlinear.Limiter limiter(uMax=60*30) annotation (Placement(transformation(extent={{-24,15},{-44,35}}))); equation connect(Signal, splitSignal.Signal) annotation (Line( points={{-100,0},{-84,0}}, color={0,0,0}, smooth=Smooth.None)); connect(feedback.y, PID.u) annotation (Line( points={{14,25},{8,25}}, color={0,0,127}, smooth=Smooth.None)); connect(const.y, feedback.u1) annotation (Line( points={{47,25},{31,25}}, color={0,0,127}, smooth=Smooth.None)); connect(splitSignal.Druck, feedback.u2) annotation (Line( points={{-74,-2},{-61,-2},{-61,-18},{23,-18},{23,17}}, color={0,0,127}, smooth=Smooth.None)); connect(limiter.u, PID.y) annotation (Line( points={{-22,25},{-15,25}}, color={0,0,127}, smooth=Smooth.None)); connect(limiter.y, splitSignal.Volumenstrom) annotation (Line( points={{-45,25},{-60,25},{-60,2},{-74,2}}, color={0,0,127}, smooth=Smooth.None)); annotation ( Diagram(coordinateSystem(extent={{-100,-100},{100,100}}, preserveAspectRatio=false, initialScale = 0.1, grid = {1,1}), graphics), Icon(coordinateSystem(extent={{-100,-100},{100,100}}, preserveAspectRatio=false, initialScale = 0.1, grid = {1,1}), graphics={Polygon( points={{-94,0},{70,99},{70,-100},{-94,0}}, lineColor={0,0,255}, smooth=Smooth.None), Text( extent={{-33,31},{60,-26}}, lineColor={0,0,255}, textString="PID")}), Documentation(info = "Einfache Kompressorregelung zur Erreichung des Betriebsdrucks
")); end KompressorRegelungPID; model KompressorRegelungDrehzahl "Einfache Kompressorregelung zur Erreichung des Betriebsdrucks" import Modelica.SIunits.*; parameter Pressure p_max = 820000.0 "Maximaldruck"; parameter Pressure p_min = 800000.0 "Minimaldruck"; parameter VolumeFlowRate V_max = 20 "Maximaler Volumenstrom"; parameter VolumeFlowRate V_min = 4 "Mainimaler Volumenstrom"; SignalRegelung Signal annotation (Placement( visible=true, transformation( origin={-100,0}, extent={{-10,-10},{10,10}}, rotation=0), iconTransformation( origin={-100,0}, extent={{-10,-10},{10,10}}, rotation=0))); transRegler splitSignal annotation (Placement(visible=true, transformation( origin={-79,0}, extent={{-5,-10},{5,10}}, rotation=0))); DrehzahlRegler drehzahlRegler( p_max=p_max, p_min=p_min, V_max=V_max, V_min=V_min) annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=-90, origin={-44,2}))); equation connect(Signal, splitSignal.Signal) annotation (Line( points={{-100,0},{-84,0}}, color={0,0,0}, smooth=Smooth.None)); connect(drehzahlRegler.y, splitSignal.Volumenstrom) annotation (Line( points={{-54,2},{-74,2}}, color={0,0,127}, smooth=Smooth.None)); connect(splitSignal.Druck, drehzahlRegler.u) annotation (Line( points={{-74,-2},{-64,-2},{-64,-16},{-21,-16},{-21,2},{-34,2}}, color={0,0,127}, smooth=Smooth.None)); annotation ( Diagram(coordinateSystem(extent={{-100,-100},{100,100}}, preserveAspectRatio=false, initialScale = 0.1, grid = {1,1}), graphics), Icon(coordinateSystem(extent={{-100,-100},{100,100}}, preserveAspectRatio=false, initialScale = 0.1, grid = {1,1}), graphics={Polygon( points={{-94,0},{70,99},{70,-100},{-94,0}}, lineColor={0,0,255}, smooth=Smooth.None), Text( extent={{-41,30},{52,-27}}, lineColor={0,0,255}, textString="É")}), Documentation(info = "Einfache Kompressorregelung zur Erreichung des Betriebsdrucks
")); end KompressorRegelungDrehzahl; annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1}))); end KompressorRegler; package Icons model Tank annotation(Diagram(coordinateSystem(extent = {{-100,-150},{100,150}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1})), Icon(coordinateSystem(extent = {{-100,-150},{100,150}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1}), graphics={ Ellipse(origin = {0,-100}, fillColor = {0,0,150}, pattern = LinePattern.None, fillPattern=FillPattern.VerticalCylinder, extent = {{-100,50},{100,-50}}, startAngle = 180, endAngle = 360),Rectangle(fillColor = {0,0,150}, pattern = LinePattern.None, fillPattern=FillPattern.VerticalCylinder, extent = {{-100,100},{100,-100}}),Ellipse(origin = {0,100}, fillColor = {0,0,150}, pattern = LinePattern.None, fillPattern=FillPattern.VerticalCylinder, extent = {{-100,50},{100,-50}}, endAngle = 180)})); end Tank; model TStueck annotation(Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1})), Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1}), graphics={ Rectangle(fillColor = {0,0,150}, fillPattern=FillPattern.HorizontalCylinder, extent = {{-100,10},{100,-10}}),Rectangle(fillColor = {0,0,150}, fillPattern=FillPattern.VerticalCylinder, extent = {{-10,-10},{10,-100}})})); end TStueck; model Rohr annotation(Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1})), Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1}), graphics={ Rectangle(fillColor = {0,0,150}, fillPattern= FillPattern.HorizontalCylinder, extent = {{-100,10},{100,-10}})})); end Rohr; model Pumpe annotation(Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1})), Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1}), graphics={ Ellipse(origin= {0.497512,0}, fillColor= {255,255,255}, fillPattern= FillPattern.Solid, extent= {{-100,100},{100,-100}}, endAngle= 360),Polygon(origin= {100,0}, fillPattern= FillPattern.Solid, points= {{0,0},{-20,10},{-20,-10},{0,0}})})); end Pumpe; model Druckquelle annotation(Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1})), Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1}), graphics={ Ellipse(fillColor= {0,0,150}, fillPattern=FillPattern.HorizontalCylinder, extent= {{-70,70},{70,-70}}, endAngle= 360), Rectangle(fillColor= {0,0,150}, fillPattern= FillPattern.HorizontalCylinder, extent={{68,9},{ 100,-15}})})); end Druckquelle; model Biegung annotation ( Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1})), Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {1,1}), graphics={ Ellipse(origin={-100,-100}, fillColor={100,100,250}, pattern=LinePattern.None, fillPattern=FillPattern.Sphere, extent={{-110,110},{110,-110}}, endAngle=90), Ellipse(origin = {-100,-100}, fillColor = {255,255,255}, pattern = LinePattern.None, fillPattern=FillPattern.Solid, extent = {{-90,90},{90,-90}}, endAngle = 90)})); end Biegung; extends Modelica.Icons; end Icons; annotation (uses(Modelica(version="3.2.1"), FluidDissipation(version="1.1.6"), ThermoPower(version="3.1"))); end PneuBib;