-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SimEnvironment.bak-mo
119 lines (98 loc) · 4.89 KB
/
SimEnvironment.bak-mo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
within AircraftDynamics;
model SimEnvironment
extends AircraftDynamics.Icons.Icon_SimEnvironment;
/* ---------------------------------------------
parameters
--------------------------------------------- */
parameter Modelica.SIunits.Time timeRemoveDesConstraint=0.1
"time to keep constraint by design point"
annotation(
Dialog(group = "Simulation setting"));
parameter Modelica.SIunits.Temperature Tstd(start=288.15)= PropulsionSystem.Constants.constants_earth.Tstd
""
annotation(
Dialog(group = "constants of standards"));
parameter Modelica.SIunits.Pressure pStd(start=101315)= PropulsionSystem.Constants.constants_earth.pStd
""
annotation(
Dialog(group = "constants of standards"));
parameter Modelica.SIunits.Acceleration gravity(start=9.81)= PropulsionSystem.Constants.constants_earth.gravity
""
annotation(
Dialog(group = "constants of standards"));
//----- gound -----
parameter Modelica.SIunits.Length alt_ground= PropulsionSystem.Constants.constants_earth.alt_ground
""
annotation(
Dialog(group = "constants for atmosphere model"));
parameter Modelica.SIunits.Temperature T_ground= PropulsionSystem.Constants.constants_earth.T_ground
""
annotation(
Dialog(group = "constants for atmosphere model"));
parameter Modelica.SIunits.AbsolutePressure p_ground= PropulsionSystem.Constants.constants_earth.p_ground
""
annotation(
Dialog(group = "constants for atmosphere model"));
//----- upper bound of troposhere -----
parameter Modelica.SIunits.Length alt_UpBdTropos= PropulsionSystem.Constants.constants_earth.alt_UpBdTropos
""
annotation(
Dialog(group = "constants for atmosphere model"));
parameter Modelica.SIunits.Temperature T_UpBdTropos= PropulsionSystem.Constants.constants_earth.T_UpBdTropos
""
annotation(
Dialog(group = "constants for atmosphere model"));
parameter Modelica.SIunits.AbsolutePressure p_UpBdTropos= PropulsionSystem.Constants.constants_earth.p_UpBdTropos
""
annotation(
Dialog(group = "constants for atmosphere model"));
parameter Real LapseR1= PropulsionSystem.Constants.constants_earth.LapseR1
""
annotation(
Dialog(group = "constants for atmosphere model"));
//----- upper bound of stratosphere -----
parameter Modelica.SIunits.Length alt_UpBdStratos= PropulsionSystem.Constants.constants_earth.alt_UpBdStratos
""
annotation(
Dialog(group = "constants for atmosphere model"));
parameter Modelica.SIunits.Temperature T_UpBdStratos= PropulsionSystem.Constants.constants_earth.T_UpBdStratos
""
annotation(
Dialog(group = "constants for atmosphere model"));
parameter Modelica.SIunits.AbsolutePressure p_UpBdStratos= PropulsionSystem.Constants.constants_earth.p_UpBdStratos
""
annotation(
Dialog(group = "constants for atmosphere model"));
parameter Real LapseR2= PropulsionSystem.Constants.constants_earth.LapseR2
""
annotation(
Dialog(group = "constants for atmosphere model"));
output Modelica.Blocks.Interfaces.RealOutput y_pStd(final quantity="Pressrue") annotation(
Placement(visible = true, transformation(origin = {110, 60}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {110, 60}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
output Modelica.Blocks.Interfaces.RealOutput y_Tstd(final quantity="Temperature") annotation(
Placement(visible = true, transformation(origin = {110, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {110, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
output Modelica.Blocks.Interfaces.RealOutput y_g(final quantity="Acceleration") annotation(
Placement(visible = true, transformation(origin = {110, -60}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {110, -60}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
//********************************************************************************
equation
/* ---------------------------------------------
Connections, interface <-> internal variables
--------------------------------------------- */
y_pStd= pStd;
y_Tstd= Tstd;
y_g= gravity;
/********************************************************
Graphics
********************************************************/
annotation (
defaultComponentName="environmentAircraftDynSim",
defaultComponentPrefixes="inner",
missingInnerMessage="
Your model is using an outer \"environment\" component but
an inner \"environment\" component is not defined.
For simulation drag Modelica.Fluid.System into your model
to specify system properties.",
Icon(coordinateSystem(preserveAspectRatio=false, initialScale = 0.1), graphics={Text(lineColor = {0, 0, 255}, extent = {{-150, 150}, {150, 110}}, textString = "%name")}),
Documentation(info="<html>
</html>"));
end SimEnvironment;