Anton Haumer
Technical Consulting & Electrical Engineering
A-3423 St.Andrae-Woerdern, Austria
email: a.haumer@haumer.at
Dr. Christian Kral
Austrian Institute of Technology, AIT
Giefinggasse 2
A-1210 Vienna, Austria
Copyright © 1998-2010, Modelica Association, Anton Haumer and Austrian Institute of Technology, AIT.
This Modelica package is free software and the use is completely at your own risk; it can be redistributed and/or modified under the terms of the Modelica License 2. For license conditions (including the disclaimer of warranty) see Modelica.UsersGuide.ModelicaLicense2 or visit http://www.modelica.org/licenses/ModelicaLicense2.
Extends from Modelica.Icons.SourcesPackage (Icon for packages containing sources).
| Name | Description |
|---|---|
| Ambient with constant properties | |
| Defines absolute pressure level | |
| Enforces constant volume flow | |
| Enforces constant pressure increase | |
| Model of an ideal pump |
Modelica.Thermal.FluidHeatFlow.Sources.Ambient
Extends from Interfaces.Partials.Ambient (Partial model of ambient).
| Type | Name | Default | Description |
|---|---|---|---|
| Medium | medium | FluidHeatFlow.Media.Medium() | Ambient medium |
| Boolean | usePressureInput | false | Enable / disable pressure input |
| Pressure | constantAmbientPressure | Ambient pressure [Pa] | |
| Boolean | useTemperatureInput | false | Enable / disable temperature input |
| Temperature | constantAmbientTemperature | Ambient temperature [K] |
| Type | Name | Description |
|---|---|---|
| FlowPort_a | flowPort | |
| input RealInput | ambientPressure | |
| input RealInput | ambientTemperature |
model Ambient "Ambient with constant properties"
extends Interfaces.Partials.Ambient;
parameter Boolean usePressureInput=false "Enable / disable pressure input";
parameter Modelica.SIunits.Pressure constantAmbientPressure(start=0)
"Ambient pressure";
parameter Boolean useTemperatureInput=false
"Enable / disable temperature input";
parameter Modelica.SIunits.Temperature constantAmbientTemperature(start=293.15, displayUnit="degC")
"Ambient temperature";
Modelica.Blocks.Interfaces.RealInput ambientPressure=pAmbient if usePressureInput;
Modelica.Blocks.Interfaces.RealInput ambientTemperature=TAmbient if useTemperatureInput;
protected
Modelica.SIunits.Pressure pAmbient;
Modelica.SIunits.Temperature TAmbient;
equation
if not usePressureInput then
pAmbient = constantAmbientPressure;
end if;
if not useTemperatureInput then
TAmbient = constantAmbientTemperature;
end if;
flowPort.p = pAmbient;
T = TAmbient;
end Ambient;
Modelica.Thermal.FluidHeatFlow.Sources.AbsolutePressure
| Type | Name | Default | Description |
|---|---|---|---|
| Medium | medium | FluidHeatFlow.Media.Medium() | medium |
| Pressure | p | Pressure ground [Pa] |
| Type | Name | Description |
|---|---|---|
| FlowPort_a | flowPort |
model AbsolutePressure "Defines absolute pressure level"
parameter FluidHeatFlow.Media.Medium medium=FluidHeatFlow.Media.Medium()
"medium";
parameter Modelica.SIunits.Pressure p(start=0) "Pressure ground";
Interfaces.FlowPort_a flowPort(final medium=medium);
equation
// defining pressure
flowPort.p = p;
// no energy exchange; no mass flow by default
flowPort.H_flow = 0;
end AbsolutePressure;
Modelica.Thermal.FluidHeatFlow.Sources.VolumeFlow
Extends from Interfaces.Partials.TwoPort (Partial model of two port).
| Type | Name | Default | Description |
|---|---|---|---|
| Medium | medium | FluidHeatFlow.Media.Medium() | Medium in the component |
| Mass | m | Mass of medium [kg] | |
| Temperature | T0 | Initial temperature of medium [K] | |
| Real | tapT | 1 | Defines temperature of heatPort between inlet and outlet temperature |
| Boolean | useVolumeFlowInput | false | Enable / disable volume flow input |
| VolumeFlowRate | constantVolumeFlow | Volume flow rate [m3/s] |
| Type | Name | Description |
|---|---|---|
| FlowPort_a | flowPort_a | |
| FlowPort_b | flowPort_b | |
| input RealInput | volumeFlow |
model VolumeFlow "Enforces constant volume flow"
extends Interfaces.Partials.TwoPort(final tapT=1);
parameter Boolean useVolumeFlowInput=false
"Enable / disable volume flow input";
parameter Modelica.SIunits.VolumeFlowRate constantVolumeFlow(start=1)
"Volume flow rate";
Modelica.Blocks.Interfaces.RealInput volumeFlow=internalVolumeFlow if useVolumeFlowInput;
protected
Modelica.SIunits.VolumeFlowRate internalVolumeFlow;
equation
if not useVolumeFlowInput then
internalVolumeFlow = constantVolumeFlow;
end if;
Q_flow = 0;
V_flow = internalVolumeFlow;
end VolumeFlow;
Modelica.Thermal.FluidHeatFlow.Sources.PressureIncrease
Extends from Interfaces.Partials.TwoPort (Partial model of two port).
| Type | Name | Default | Description |
|---|---|---|---|
| Medium | medium | FluidHeatFlow.Media.Medium() | Medium in the component |
| Mass | m | Mass of medium [kg] | |
| Temperature | T0 | Initial temperature of medium [K] | |
| Real | tapT | 1 | Defines temperature of heatPort between inlet and outlet temperature |
| Boolean | usePressureIncreaseInput | false | Enable / disable pressure increase input |
| Pressure | constantPressureIncrease | Pressure increase [Pa] |
| Type | Name | Description |
|---|---|---|
| FlowPort_a | flowPort_a | |
| FlowPort_b | flowPort_b | |
| input RealInput | pressureIncrease |
model PressureIncrease "Enforces constant pressure increase"
extends Interfaces.Partials.TwoPort(final tapT=1);
parameter Boolean usePressureIncreaseInput=false
"Enable / disable pressure increase input";
parameter Modelica.SIunits.Pressure constantPressureIncrease(start=1)
"Pressure increase";
Modelica.Blocks.Interfaces.RealInput pressureIncrease=internalPressureIncrease if usePressureIncreaseInput;
protected
Modelica.SIunits.Pressure internalPressureIncrease;
equation
if not usePressureIncreaseInput then
internalPressureIncrease = constantPressureIncrease;
end if;
Q_flow = 0;
dp = -internalPressureIncrease;
end PressureIncrease;
Modelica.Thermal.FluidHeatFlow.Sources.IdealPump
Extends from Interfaces.Partials.TwoPort (Partial model of two port).
| Type | Name | Default | Description |
|---|---|---|---|
| Medium | medium | FluidHeatFlow.Media.Medium() | Medium in the component |
| Mass | m | Mass of medium [kg] | |
| Temperature | T0 | Initial temperature of medium [K] | |
| Real | tapT | 1 | Defines temperature of heatPort between inlet and outlet temperature |
| Pump characteristic | |||
| AngularVelocity | wNominal | Nominal speed [rad/s] | |
| Pressure | dp0 | Max. pressure increase @ V_flow=0 [Pa] | |
| VolumeFlowRate | V_flow0 | Max. volume flow rate @ dp=0 [m3/s] | |
| Type | Name | Description |
|---|---|---|
| FlowPort_a | flowPort_a | |
| FlowPort_b | flowPort_b | |
| Flange_a | flange_a |
model IdealPump "Model of an ideal pump"
extends Interfaces.Partials.TwoPort(final tapT=1);
parameter Modelica.SIunits.AngularVelocity wNominal(start=1, displayUnit="1/min")
"Nominal speed";
parameter Modelica.SIunits.Pressure dp0(start=2)
"Max. pressure increase @ V_flow=0";
parameter Modelica.SIunits.VolumeFlowRate V_flow0(start=2)
"Max. volume flow rate @ dp=0";
Modelica.SIunits.AngularVelocity w=der(flange_a.phi) "Speed";
protected
Modelica.SIunits.Pressure dp1;
Modelica.SIunits.VolumeFlowRate V_flow1;
public
Modelica.Mechanics.Rotational.Interfaces.Flange_a flange_a;
equation
// pump characteristic
dp1 = dp0*sign(w/wNominal)*(w/wNominal)^2;
V_flow1 = V_flow0*(w/wNominal);
if noEvent(abs(w)<Modelica.Constants.small) then
dp = 0;
flange_a.tau = 0;
else
dp = -dp1*(1-noEvent(abs(V_flow/V_flow1)));
flange_a.tau*w = -dp*V_flow;
end if;
// no energy exchange with medium
Q_flow = 0;
end IdealPump;