forked from modelica/ModelicaStandardLibrary
-
Notifications
You must be signed in to change notification settings - Fork 1
/
HeatingNPN_NORGate.mo
198 lines (195 loc) · 7.53 KB
/
HeatingNPN_NORGate.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
within Modelica.Electrical.Analog.Examples;
model HeatingNPN_NORGate "Heating NPN NOR Gate"
extends Modelica.Icons.Example;
parameter SI.Capacitance CapVal=0 "Value for capacitances" annotation(Evaluate=true);
parameter SI.Time tauVal=0 "Value for ideal forward and reverse transit time of semiconductors" annotation(Evaluate=true);
Modelica.Thermal.HeatTransfer.Components.HeatCapacitor HeatCapacitor1(C=0.1)
annotation (Placement(transformation(
origin={76,-84},
extent={{-10,-10},{10,10}},
rotation=180)));
Modelica.Thermal.HeatTransfer.Components.ThermalConductor TC1(G=0.01)
annotation (Placement(transformation(
origin={90,-50},
extent={{-10,-10},{10,10}},
rotation=270)));
Modelica.Thermal.HeatTransfer.Components.ThermalConductor TC2(G=0.01)
annotation (Placement(transformation(
origin={60,-50},
extent={{-10,-10},{10,10}},
rotation=270)));
Modelica.Electrical.Analog.Sources.RampVoltage V(V=6, duration=5)
annotation (Placement(transformation(
origin={90,38},
extent={{-10,-10},{10,10}},
rotation=270)));
Modelica.Electrical.Analog.Sources.TrapezoidVoltage V1(
V=6,
startTime=55,
rising=5,
width=15,
falling=5,
period=50,
nperiod=10)
annotation (Placement(transformation(
origin={-90,18},
extent={{-10,-10},{10,10}},
rotation=270)));
Modelica.Electrical.Analog.Sources.TrapezoidVoltage V2(
V=6,
startTime=65,
rising=5,
width=15,
falling=5,
period=50,
nperiod=10)
annotation (Placement(transformation(
origin={-50,-42},
extent={{-10,-10},{10,10}},
rotation=270)));
Modelica.Electrical.Analog.Basic.Resistor R1(R=1800)
annotation (Placement(transformation(extent={{-90,48},{-70,68}})));
Modelica.Electrical.Analog.Basic.Resistor R2(R=1800)
annotation (Placement(transformation(extent={{-36,-22},{-16,-2}})));
Modelica.Electrical.Analog.Basic.Resistor RI(R=40)
annotation (Placement(transformation(extent={{60,58},{80,78}})));
Modelica.Electrical.Analog.Basic.Ground Gnd
annotation (Placement(transformation(extent={{80,0},{100,20}})));
Modelica.Electrical.Analog.Basic.Ground Gnd1
annotation (Placement(transformation(extent={{-100,-22},{-80,-2}})));
Modelica.Electrical.Analog.Basic.Ground Gnd2
annotation (Placement(transformation(extent={{-60,-82},{-40,-62}})));
Modelica.Electrical.Analog.Basic.Ground Gnd3
annotation (Placement(transformation(extent={{-10,16},{10,36}})));
Modelica.Electrical.Analog.Basic.Ground Gnd4
annotation (Placement(transformation(extent={{30,-52},{50,-32}})));
Modelica.Electrical.Analog.Basic.Capacitor C1(final C=CapVal)
annotation (Placement(transformation(
origin={-70,38},
extent={{-10,-10},{10,10}},
rotation=270)));
Modelica.Electrical.Analog.Basic.Capacitor C2(final C=CapVal)
annotation (Placement(transformation(
origin={60,42},
extent={{-10,-10},{10,10}},
rotation=270)));
Modelica.Electrical.Analog.Basic.Capacitor C3(final C=CapVal)
annotation (Placement(transformation(
origin={-16,-40},
extent={{-10,-10},{10,10}},
rotation=270)));
Modelica.Electrical.Analog.Basic.Ground Gnd5
annotation (Placement(transformation(extent={{-26,-76},{-6,-56}})));
Modelica.Electrical.Analog.Basic.Ground Gnd6
annotation (Placement(transformation(extent={{50,6},{70,26}})));
Modelica.Electrical.Analog.Basic.Ground Gnd7
annotation (Placement(transformation(extent={{-80,2},{-60,22}})));
Semiconductors.NPN T1(
Bf=100,
Br=1,
Is=1e-14,
Vak=0,
final Tauf=tauVal,
final Taur=tauVal,
final Ccs=CapVal,
final Cje=CapVal,
final Cjc=CapVal,
Phie=1,
Me=0.5,
Phic=1,
Mc=0.5,
Gbc=1e-12,
Gbe=1e-12,
EMax=40,
vt_t(start=0.01, fixed=false),
useTemperatureDependency=true, ibe(start=0), vbc(start=0))
annotation (Placement(transformation(extent={{-20,48},{0,68}})));
Semiconductors.NPN T2(
Bf=100,
Br=1,
Is=1e-14,
Vak=0,
final Tauf=tauVal,
final Taur=tauVal,
final Ccs=CapVal,
final Cje=CapVal,
final Cjc=CapVal,
Phie=1,
Me=0.5,
Phic=1,
Mc=0.5,
Gbc=1e-12,
Gbe=1e-12,
EMax=40,
vt_t(start=0.01, fixed=false),
useTemperatureDependency=true, ibe(start=0), vbc(start=0))
annotation (Placement(transformation(extent={{20,-22},{40,-2}})));
initial equation
HeatCapacitor1.T= 293.15;
equation
connect(Gnd1.p, V1.n)
annotation (Line(points={{-90,-2},{-90,8}}, color={0,0,255}));
connect(V1.p, R1.p)
annotation (Line(points={{-90,28},{-90,58}}, color={0,0,255}));
connect(RI.n, V.p)
annotation (Line(points={{80,68},{90,68},{90,48}}, color={0,0,
255}));
connect(Gnd.p, V.n)
annotation (Line(points={{90,20},{90,28}}, color={0,0,255}));
connect(V2.p, R2.p)
annotation (Line(points={{-50,-32},{-50,-12},{-36,-12}}, color={0,0,255}));
connect(Gnd2.p, V2.n)
annotation (Line(points={{-50,-62},{-50,-52}}, color={0,0,
255}));
connect(Gnd7.p, C1.n)
annotation (Line(points={{-70,22},{-70,28}}, color={0,0,255}));
connect(C2.p, RI.p)
annotation (Line(points={{60,52},{60,68}}, color={0,0,255}));
connect(Gnd6.p, C2.n)
annotation (Line(points={{60,26},{60,32}}, color={0,0,255}));
connect(C3.p, R2.n)
annotation (Line(points={{-16,-30},{-16,-21},{-16,-12}}, color={0,0,255}));
connect(C1.p, R1.n)
annotation (Line(points={{-70,48},{-70,58}}, color={0,0,255}));
connect(Gnd5.p, C3.n)
annotation (Line(points={{-16,-56},{-16,-50}}, color={0,0,255}));
connect(T1.B, R1.n)
annotation (Line(points={{-20,58},{-70,58}}, color={0,0,255}));
connect(T1.E, Gnd3.p)
annotation (Line(points={{0,52},{0,52},{0,44.5},{0,36}}, color={0,0,255}));
connect(RI.p, T1.C)
annotation (Line(points={{60,68},{30,68},{30,64},{0,64}}, color={0,0,255}));
connect(T2.B, R2.n)
annotation (Line(points={{20,-12},{-16,-12}}, color={0,0,255}));
connect(T2.E, Gnd4.p)
annotation (Line(points={{40,-18},{40,-32}}, color={0,0,255}));
connect(T2.C, RI.p)
annotation (Line(points={{40,-6},{40,68},{60,68}}, color={0,0,255}));
connect(TC1.port_b, HeatCapacitor1.port)
annotation (Line(points={{90,-60},{84,
-60},{84,-74},{76,-74}}, color={191,0,0}));
connect(TC2.port_b, HeatCapacitor1.port)
annotation (Line(points={{60,-60},{68,
-60},{68,-74},{76,-74}}, color={191,0,0}));
connect(TC2.port_a, T2.heatPort)
annotation (Line(points={{60,-40},{60,-22},{30,-22}}, color={191,0,0}));
connect(TC1.port_a, T1.heatPort)
annotation (Line(points={{90,-40},{90,2},{-10,
2},{-10,48}}, color={191,0,0}));
annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-100,
-100},{100,100}})), Documentation(info="<html>
<p>The heating "NPN NOR" gate shows a heat flow always if a transistor is leading.</p>
<p>Simulate until T=200 s. Plot in separate windows:
<br>V1.v and V2.v and C2.v
<br>HeatCapacitor1.port.T and T1.heatPort.T and T2.heatPort.T
<br>T1.heatPort.Q_flow and T2.heatPort.Q_flow</p>
</html>",
revisions="<html>
<p><strong>Release Notes:</strong></p>
<ul>
<li><em>Mai 6, 2004 </em>
by Christoph Clauss<br> realized<br>
</li>
</ul>
</html>"), experiment(StopTime=200));
end HeatingNPN_NORGate;