Skip to content

Commit 8f9b7ac

Browse files
committed
no message
1 parent 5320269 commit 8f9b7ac

File tree

449 files changed

+6731
-1714
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

449 files changed

+6731
-1714
lines changed

Interfaces/Bus_FluidStaticStates.mo

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ expandable connector Bus_FluidStaticStates
99
units.Area Aeff;
1010
units.Pressure Ps;
1111
units.Temperature Ts;
12-
units.Velocity VelocityOfSound;
12+
units.Velocity Vsound;
13+
units.Velocity V;
1314
units.SpecificEnthalpy hs;
1415

1516
annotation(

Interfaces/FluidStaticPort.bak-mo

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
within FluidSystemComponents.Interfaces;
2+
3+
connector FluidStaticPort
4+
end FluidStaticPort;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
within FluidSystemComponents.Interfaces;
2+
3+
connector FluidStaticStateInput
4+
import units = Modelica.Units.SI;
5+
6+
input Real Mn;
7+
input units.Area Aeff;
8+
input units.Pressure Ps;
9+
input units.Temperature Ts;
10+
input units.Velocity Vsound;
11+
input units.Velocity V;
12+
input units.SpecificEnthalpy hs;
13+
14+
annotation(
15+
defaultComponentName = "portStatIn",
16+
Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}), graphics = {Ellipse(fillColor = {145, 65, 172}, fillPattern = FillPattern.Solid, extent = {{-40, 40}, {40, -40}}), Text(extent = {{-150, 110}, {150, 50}}, textString = "%name")}),
17+
Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}), graphics = {Ellipse(lineColor = {0, 127, 255}, fillColor = {0, 127, 255}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Ellipse(fillColor = {145, 65, 172}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Polygon(origin = {70, 2}, fillPattern = FillPattern.Solid, points = {{-8, 40}, {-10, -42}, {30, -2}, {-8, 40}}), Rectangle(origin = {-18, 1}, fillPattern = FillPattern.Solid, extent = {{-80, 9}, {80, -9}})}));
18+
19+
20+
end FluidStaticStateInput;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
within FluidSystemComponents.Interfaces;
2+
3+
connector FluidStaticStateOutput
4+
5+
import units = Modelica.Units.SI;
6+
7+
output Real Mn;
8+
output units.Area Aeff;
9+
output units.Pressure Ps;
10+
output units.Temperature Ts;
11+
output units.Velocity Vsound;
12+
output units.Velocity V;
13+
output units.SpecificEnthalpy hs;
14+
15+
16+
annotation(defaultComponentName = "PortStatOut",
17+
Diagram(graphics= {Ellipse(lineColor = {0, 0, 127}, fillColor = {0, 0, 127}, lineThickness = 10, extent = {{-40, 40}, {40, -40}}), Text(origin = {-2, -10}, extent = {{-150, 110}, {150, 50}}, textString = "%name")}),
18+
Icon(graphics = {Ellipse(lineColor = {0, 0, 127}, fillColor = {0, 0, 127}, lineThickness = 20, extent = {{-90, 90}, {90, -90}}), Polygon(origin = {54, 2}, fillPattern = FillPattern.Solid, points = {{-8, 40}, {-8, -42}, {30, -2}, {-8, 40}}), Rectangle(origin = {-18, 1}, fillPattern = FillPattern.Solid, extent = {{-80, 9}, {80, -9}})}));
19+
20+
21+
end FluidStaticStateOutput;
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
within FluidSystemComponents.Interfaces;
2+
3+
connector FluidStaticStatePort
4+
import units = Modelica.Units.SI;
5+
6+
Real Mn;
7+
units.Area Aeff;
8+
units.Pressure Ps;
9+
units.Temperature Ts;
10+
units.Velocity Vsound;
11+
units.Velocity V;
12+
units.SpecificEnthalpy hs;
13+
14+
15+
annotation(
16+
defaultComponentName = "portStat",
17+
Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}), graphics = {Ellipse(fillColor = {145, 65, 172}, fillPattern = FillPattern.Solid, extent = {{-40, 40}, {40, -40}}), Text(extent = {{-150, 110}, {150, 50}}, textString = "%name")}),
18+
Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}), graphics = {Ellipse(lineColor = {0, 127, 255}, fillColor = {0, 127, 255}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}}), Ellipse(fillColor = {145, 65, 172}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}})}));
19+
20+
21+
end FluidStaticStatePort;

Interfaces/package.mo

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
within FluidSystemComponents;
2-
3-
package Interfaces
4-
extends Modelica.Icons.InterfacesPackage;
5-
end Interfaces;
1+
within FluidSystemComponents;
2+
3+
package Interfaces
4+
extends Modelica.Icons.InterfacesPackage;
5+
end Interfaces;

Interfaces/package.order

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
FluidStaticStateOutput
12
Frame_2FluidPorts
23
Frame_2FluidPorts_1Shaft
34
Frame_4FluidPorts
@@ -9,3 +10,4 @@ StringOutput
910
Bus
1011
RealInput
1112
Bus_FluidStaticStates
13+
FluidStaticStateInput
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
within FluidSystemComponents.Sensor.Examples;
2+
3+
model StaticStatesTwoPort01_ex01
4+
extends Modelica.Icons.Example;
5+
//-----
6+
package fluid1 = Modelica.Media.Air.DryAirNasa;
7+
//package fluid1 = FluidSystemComponents.Media.Mixture_N2O2;
8+
//-----
9+
Modelica.Fluid.Sources.Boundary_pT boundary(redeclare package Medium = fluid1, T = 500, nPorts = 1, p = 5*101.325*1000, use_T_in = true, use_p_in = true) annotation(
10+
Placement(visible = true, transformation(origin = {-50, 20}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
11+
inner Modelica.Fluid.System system annotation(
12+
Placement(visible = true, transformation(origin = {-90, 90}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
13+
Modelica.Blocks.Sources.Ramp ramp_p1(duration = 10, height = 0, offset = 2*101.325*1000, startTime = 10) annotation(
14+
Placement(visible = true, transformation(origin = {-90, 50}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
15+
Modelica.Blocks.Sources.Ramp ramp_T1(duration = 10, height = 0, offset = 500, startTime = 30) annotation(
16+
Placement(visible = true, transformation(origin = {-90, 20}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
17+
CommonAnyFluid.Components.VariableZetaOrifice00 Orifice(redeclare package Medium = fluid1) annotation(
18+
Placement(visible = true, transformation(origin = {-10, 20}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
19+
Modelica.Blocks.Sources.Ramp ramp_zeta(duration = 10, height = 1, offset = 1, startTime = 10) annotation(
20+
Placement(visible = true, transformation(origin = {-30, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
21+
Modelica.Fluid.Sources.MassFlowSource_T boundary1(redeclare package Medium = fluid1, m_flow = -0.01, nPorts = 1, use_m_flow_in = true) annotation(
22+
Placement(transformation(origin = {60, 20}, extent = {{10, -10}, {-10, 10}})));
23+
Modelica.Blocks.Sources.Ramp ramp_m_flow(duration = 10, height = -0.01, offset = -0.01, startTime = 50) annotation(
24+
Placement(transformation(origin = {90, 28}, extent = {{10, -10}, {-10, 10}})));
25+
FluidSystemComponents.Sensor.StaticStatesTwoPort01 StaticStates(redeclare package Medium = fluid1) annotation(
26+
Placement(transformation(origin = {20, 20}, extent = {{-10, -10}, {10, 10}})));
27+
equation
28+
connect(ramp_zeta.y, Orifice.u_zeta) annotation(
29+
Line(points = {{-18, -10}, {-14, -10}, {-14, 11}}, color = {0, 0, 127}));
30+
connect(boundary.ports[1], Orifice.port_1) annotation(
31+
Line(points = {{-40, 20}, {-20, 20}}, color = {0, 127, 255}));
32+
connect(ramp_T1.y, boundary.T_in) annotation(
33+
Line(points = {{-78, 20}, {-70, 20}, {-70, 24}, {-62, 24}, {-62, 24}}, color = {0, 0, 127}));
34+
connect(ramp_p1.y, boundary.p_in) annotation(
35+
Line(points = {{-78, 50}, {-72, 50}, {-72, 28}, {-62, 28}, {-62, 28}}, color = {0, 0, 127}));
36+
connect(boundary1.m_flow_in, ramp_m_flow.y) annotation(
37+
Line(points = {{70, 28}, {79, 28}}, color = {0, 0, 127}));
38+
connect(StaticStates.port_2, boundary1.ports[1]) annotation(
39+
Line(points = {{30, 20}, {50, 20}}, color = {0, 127, 255}));
40+
connect(Orifice.port_2, StaticStates.port_1) annotation(
41+
Line(points = {{0, 20}, {10, 20}}, color = {0, 127, 255}));
42+
annotation(
43+
experiment(StartTime = 0, StopTime = 80, Tolerance = 1e-06, Interval = 0.1),
44+
__OpenModelica_simulationFlags(lv = "LOG_STATS", outputFormat = "mat", s = "dassl"));
45+
46+
47+
end StaticStatesTwoPort01_ex01;

Sensor/Examples/package.order

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ StaticStatesTwoPort_ex01
22
StaticPressureTwoPort_ex01
33
MassFractionsArray_ex01
44
SpecificHeatCapacity_ex01
5+
StaticStatesTwoPort01_ex01

Sensor/StaticStatesTwoPort01.mo

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
within FluidSystemComponents.Sensor;
2+
3+
model StaticStatesTwoPort01
4+
extends CommonAnyFluid.BaseClasses.flow1d2ports00;
5+
extends Sensor.icons.SensorFlow1d;
6+
/********************************************************
7+
imports
8+
********************************************************/
9+
import units = Modelica.Units.SI;
10+
import unitsNonSI = Modelica.Units.NonSI;
11+
import unitConversions = Modelica.Units.Conversions;
12+
/********************************************************
13+
Declaration
14+
********************************************************/
15+
/* ---------------------------------------------
16+
parameters
17+
--------------------------------------------- */
18+
parameter Types.Switches.switch_input_CalcStaticStates sw_input_calcStat = Types.Switches.switch_input_CalcStaticStates.input_Mn "";
19+
parameter Real Mn_par = 0.8 "Mach number" annotation(
20+
Dialog(group = "Static fluid state"));
21+
parameter units.Length diamEff_par = 0.01 "diameter of effective area, valid if isCircular==true" annotation(
22+
Dialog(group = "Geometory"));
23+
parameter units.Area AeffPath_par = Modelica.Constants.pi/4.0*diamEff_par^2 "mechanical area of 'throat', valid if isCircular==false" annotation(
24+
Dialog(group = "Geometory"));
25+
/* ---------------------------------------------
26+
Interface
27+
--------------------------------------------- */
28+
FluidSystemComponents.Interfaces.FluidStaticStateOutput PortStatOut annotation(
29+
Placement(transformation(origin = {0, 100}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {0, 100}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
30+
FluidSystemComponents.Interfaces.Bus_FluidStaticStates bus_Static annotation(
31+
Placement(transformation(origin = {60, 100}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {40, 40}, extent = {{-10, -10}, {10, 10}})));
32+
equation
33+
//--------------------
34+
PortStatOut.Aeff=AeffPath;
35+
PortStatOut.hs=fluidStat_path.h;
36+
PortStatOut.Mn=Mn;
37+
PortStatOut.Ps=fluidStat_path.p;
38+
PortStatOut.Ts=fluidStat_path.T;
39+
PortStatOut.V=Vpath;
40+
PortStatOut.Vsound=Vsound;
41+
//--------------------
42+
if (sw_input_calcStat == Types.Switches.switch_input_CalcStaticStates.input_Mn) then
43+
Mn = Mn_par;
44+
else
45+
if (isCircular == true) then
46+
diamEff = diamEff_par;
47+
else
48+
AeffPath = AeffPath_par;
49+
end if;
50+
end if;
51+
AeffPath = Modelica.Constants.pi/4.0*diamEff^2.0;
52+
//-----
53+
fluid_1.p = fluid_2.p;
54+
annotation(
55+
defaultComponentName = "StaticStates",
56+
Icon(coordinateSystem(preserveAspectRatio = false), graphics = {Text(origin = {0, -90}, extent = {{-100, 10}, {100, -10}}, textString = "%name"), Rectangle(origin = {1, 20}, fillPattern = FillPattern.Solid, extent = {{-7, 24}, {5, -22}}), Line(origin = {-75, 38.67}, points = {{-25, -39}, {35, -39}}, color = {26, 95, 180}, thickness = 14), Line(origin = {65.44, 38.72}, points = {{-25, -39}, {35, -39}}, color = {26, 95, 180}, thickness = 14)}),
57+
__OpenModelica_commandLineOptions = "");
58+
end StaticStatesTwoPort01;

0 commit comments

Comments
 (0)