-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathComplexLib.mo
8648 lines (8468 loc) · 381 KB
/
ComplexLib.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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
within ;
package ComplexLib
"Library for steady-state analysis of AC circuits within phasor domain, version 1.0"
annotation (
Documentation(info="<HTML>
<P>
This library contains electrical components suitable for steady-state
analysis of AC circuits with fixed frequency (analysis within phasor
domain using so-called time phasors).
Under special assumptions, the library can also be used to investigate AC
circuits in the quasi-stationary mode.<br><br>
An introduction is given e.g. in O. Enge, C. Clauß, P. Schneider,
P. Schwarz, M. Vetter, S. Schwunk:
Quasi-stationary AC analysis using phasor description with Modelica.
<em>5th Int. Modelica Conf.</em>, Vienna, Austria, September 4-5, 2006,
Proc. pp. 579-588.
</P>
<p>
<dt><b>Main Authors:</b></dt>
<dd>Olaf Enge-Rosenblatt (and partially Christoph Clauß)<br>
Fraunhofer Institut Integrierte Schaltungen<br>
Institutsteil Entwurfsautomatisierung IIS/EAS<br>
Zeunerstraße 38<br>
01069 Dresden<br>
Germany<br>
email: <a href=\"mailto:olaf.enge@eas.iis.fraunhofer.de\">olaf.enge@eas.iis.fraunhofer.de</a>
</dd><br>
<dd>Matthias Vetter, Simon Schwunk<br>
Fraunhofer Institut Solare Energiesysteme ISE<br>
Heidenhofstraße 2<br>
79110 Freiburg<br>
Germany<br>
email: <a href=\"mailto:matthias.vetter@ise.fraunhofer.de\">matthias.vetter@ise.fraunhofer.de</a>
</dd>
</p>
</HTML>
"), uses(Modelica(version="3.0")));
import SI = Modelica.SIunits;
package UsersGuide "User's Guide of ComplexLib"
annotation (__Dymola_DocumentationClass=true, Documentation(info="<html>
<p>
The package <b>ComplexLib</b> is a <b>free</b> Modelica library for
steady-state analysis of linear AC circuits with fixed frequency.
In this context, an AC circuit is understood as a set of components which
are coupled galvanically among each other.
The package provides model components with certain interface definitions.
The behavior of the electrical components is described using phasor domain
(so-called time phasors).
Under special assumptions, the library can also be used to investigate AC
circuits in the quasi-stationary mode (see package <tt>Quasi-stationary mode</tt>
for more information).<br>
Some components are electromechanical ones.
In these cases, the electrical subsystem is modelled within the phasor domain
while the mechanical subsystem is described using time domain.<br>
The package ComplexLib is fully compatible with the Modelica Standard Library.
An introduction is given e.g. in O. Enge, C. Clauß, P. Schneider,
P. Schwarz, M. Vetter, S. Schwunk:
Quasi-stationary AC analysis using phasor description with Modelica.
<em>5th Int. Modelica Conf.</em>, Vienna, Austria, September 4-5, 2006,
Proc. pp. 579-588.<br>
<br>
This is a short <b>User's Guide</b> for the ComplexLib.
</p>
</html>"));
class Overview "Overview of Complexlib"
annotation (Documentation(info="<html>
<p>
The ComplexLib consists of the following main sub-libraries:
</p>
<ul>
<li>SinglePhase: basic and special components for single-phase AC circuits</li>
<li>MultiPhase: basic and special components for multi-phase AC circuits
(well-known is the three-phase system, other numbers of phases are possible)</li>
<li>Machines: some basic electric AC induction machines (asynchronous and
synchronous type)</li>
</ul>
The packages Constants, Interfaces, SIunits and Math provide additional
sub-models and functions.
</html>"));
end Overview;
class Connectors "Connectors"
annotation (__Dymola_DocumentationClass=true, Documentation(info="<html>
<p>
The ComplexLib uses three kinds of connectors: one for phasor description of
single-phase AC circuits (<tt>ComplexPin</tt>), one for phasor description of
multi-phase AC circuits (<tt>ComplexPlug</tt>), and one for coupling with
components from rotational mechanics (<tt>Flange_a</tt> or <tt>Flange_b</tt>).<br><br>
The phasor-based connectors are defined within the corresponding packages, see
</p>
<ul>
<li><tt>ComplexLib.SinglePhase.Interfaces.ComplexPin</tt> and</li>
<li><tt>ComplexLib.MultiPhase.Interfaces.ComplexPlug</tt></li>
</ul>
<p>
The mechanical connector of the Modelica Standard Library is used for mechanical
subsystem in the package <tt>ComplexLib.Machines</tt>.
</html>"));
end Connectors;
class QuasiStationaryMode "Quasi-stationary mode"
annotation (__Dymola_DocumentationClass=true, Documentation(info="<html>
<p>
A quasi-stationary mode is usually not included within phasor domain method.
However under some special assumptions, such an approach is allowed which yields
enormous savings of simulation time.<br><br>
The <b>quasi-stationary mode</b> shall be understood as a <b>sequence of steady
states</b> on the following condition: parameters (which would be constant at
steady-state analysis) may vary extraordinary slowly compared to the system's
dominant time constant <tt>T</tt>.
It is signalized by <b>slow alterations</b> of <b>amplitudes and phases</b> of the
sinusoidal quantities.
Usually, it is a good choise if the dynamic processes have time constants
higher than <tt>10*T</tt>.<br><br>
<b>Attention!!!</b><br>
Please note for the present release that there is no algorithm implemented to test
if variations of parameters are slow enough. Hence, this is still a task to be
done by user.
</html>"));
end QuasiStationaryMode;
class Compatibility "Compatibility to Modelica Standard Library"
annotation (__Dymola_DocumentationClass=true, Documentation(info="<html>
<p>
Phasor-domain description can be used for linear AC circuits, i.e. for electrical
systems the components of which are coupled galvanically among each other.
In case of an electromechanical system like an induction machine, the complete
electrical subsystem has to be described using phasor domain while the mechanical
subsystem is represented using time domain.<br><br>
Hence, there is no need for compatibility to time-domain represented electrical
circuits.
However, mechanical subsystems are fully compatible to <tt>Modelica.Mechanics.Rotational</tt>.
</html>"));
end Compatibility;
class Releases "Release notes"
class Version_1_0 "Version 1.0 (Mai 18, 2009)"
annotation (__Dymola_DocumentationClass=true, Documentation(info=
"<html>
<p>
First official release of ComplexLib.<br><br>
This release is fully equivalent to the former library Complex Version 3.3
which was developed within the internal Fraunhofer project GENSIM.<br>
The main authors of the library are shown in the main information
on the very top as well as in the package <tt>Contact</tt> of the
User's Guide.
</p>
</html>"));
end Version_1_0;
end Releases;
class License "The Modelica License 2"
annotation (Documentation(info="<html>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">
This page contains the “Modelica License 2” which was
released by the Modelica Association on Nov. 19, 2008. It is used for
all material from the Modelica Association provided to the public
after this date. It is recommended that other providers of free
Modelica packages license their library also under “Modelica
License 2”. Additionally, this document contains a description
how to apply the license and has a “Frequently Asked Questions”
section.</P>
<P STYLE=\"text-indent: 0pt; line-height: 150%\">
<A HREF=\"#1. The Modelica License 2|outline\"> The Modelica License 2</A>
(in other formats:
<A HREF=\"http://www.modelica.org/licenses/ModelicaLicense2.html\">standalone html</A>,
<A HREF=\"http://www.modelica.org/licenses/ModelicaLicense2.pdf\">pdf</A>,
<A HREF=\"http://www.modelica.org/licenses/ModelicaLicense2.odt\">odt</A>,
<A HREF=\"http://www.modelica.org/licenses/ModelicaLicense2.doc\">doc</A>)<br>
<A HREF=\"#2. How to Apply the Modelica License 2|outline\">How to Apply the Modelica License 2</A><br>
<A HREF=\"#3. Frequently Asked Questions|outline\"> Frequently Asked Questions</A><br> </P>
<hr>
<H4><A NAME=\"_Ref208223390\"></A><A NAME=\"1. The Modelica License 2|outline\"></A>
The Modelica License 2</H4>
<P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
<B>Preamble. </B>The goal of this license is that Modelica related
model libraries, software, images, documents, data files etc. can be
used freely in the original or a modified form, in open source and in
commercial environments (as long as the license conditions below are
fulfilled, in particular sections 2c) and 2d). The Original Work is
provided free of charge and the use is completely at your own risk.
Developers of free Modelica packages are encouraged to utilize this
license for their work.</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
The Modelica License applies to any Original Work that contains the
following licensing notice adjacent to the copyright notice(s) for
this Original Work:</P>
<P ALIGN=CENTER STYLE=\"text-indent: 0pt\"><B>Licensed
by <name of Licensor> under the Modelica License 2</B></P>
<P STYLE=\"text-indent: 0pt; widows: 2; orphans: 2\"><B>1.
Definitions.</B></P>
<OL style=\"list-style-type:lower-latin\">
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
“License” is this Modelica License.</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
“Original Work” is any work of authorship, including
software, images, documents, data files, that contains the above
licensing notice or that is packed together with a licensing notice
referencing it.</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
“Licensor” is the provider of the Original Work who has
placed this licensing notice adjacent to the copyright notice(s) for
the Original Work. The Original Work is either directly provided by
the owner of the Original Work, or by a licensee of the owner.</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
“Derivative Work” is any modification of the Original
Work which represents, as a whole, an original work of authorship.
For the matter of clarity and as examples:
</P>
<OL style=\"list-style-type:upper-latin\">
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
Derivative Work shall not include work that remains separable from
the Original Work, as well as merely extracting a part of the
Original Work without modifying it.</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
Derivative Work shall not include (a) fixing of errors and/or (b)
adding vendor specific Modelica annotations and/or (c) using a
subset of the classes of a Modelica package, and/or (d) using a
different representation, e.g., a binary representation.</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
Derivative Work shall include classes that are copied from the
Original Work where declarations, equations or the documentation
are modified.
</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
Derivative Work shall include executables to simulate the models
that are generated by a Modelica translator based on the Original
Work (of a Modelica package).</P>
</OL>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
“Modified Work” is any modification of the Original Work
with the following exceptions: (a) fixing of errors and/or (b)
adding vendor specific Modelica annotations and/or (c) using a
subset of the classes of a Modelica package, and/or (d) using a
different representation, e.g., a binary representation.</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
"Source Code" means the preferred form of the Original
Work for making modifications to it and all available documentation
describing how to modify the Original Work.</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
“You” means an individual or a legal entity exercising
rights under, and complying with all of the terms of, this License.
</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
“Modelica package” means any Modelica library that is
defined with the<BR>“<FONT FACE=\"Courier New, monospace\"><FONT SIZE=2 STYLE=\"font-size: 9pt\"><B>package</B></FONT></FONT><FONT FACE=\"Courier New, monospace\"><FONT SIZE=2 STYLE=\"font-size: 9pt\">
<Name> ... </FONT></FONT><FONT FACE=\"Courier New, monospace\"><FONT SIZE=2 STYLE=\"font-size: 9pt\"><B>end</B></FONT></FONT><FONT FACE=\"Courier New, monospace\"><FONT SIZE=2 STYLE=\"font-size: 9pt\">
<Name>;</FONT></FONT>“ Modelica language element.</P>
</OL>
<P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
<B>2. </B><B>Grant of Copyright License. </B>Licensor grants You a
worldwide, royalty-free, non-exclusive, sublicensable license, for
the duration of the copyright, to do the following:</P>
<OL style=\"list-style-type:lower-latin\">
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
To reproduce the Original Work in copies, either alone or as part of
a collection.</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
To create Derivative Works according to Section 1d) of this License.</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
To distribute or communicate to the public copies of the <U>Original
Work</U> or a <U>Derivative Work</U> under <U>this License</U>. No
fee, neither as a copyright-license fee, nor as a selling fee for
the copy as such may be charged under this License. Furthermore, a
verbatim copy of this License must be included in any copy of the
Original Work or a Derivative Work under this License.<BR> For
the matter of clarity, it is permitted A) to distribute or
communicate such copies as part of a (possible commercial)
collection where other parts are provided under different licenses
and a license fee is charged for the other parts only and B) to
charge for mere printing and shipping costs.</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
To distribute or communicate to the public copies of a <U>Derivative
Work</U>, alternatively to Section 2c), under <U>any other license</U>
of your choice, especially also under a license for
commercial/proprietary software, as long as You comply with Sections
3, 4 and 8 below. <BR> For the matter of clarity, no
restrictions regarding fees, either as to a copyright-license fee or
as to a selling fee for the copy as such apply.</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
To perform the Original Work publicly.</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
To display the Original Work publicly.</P>
</OL>
<P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
<B>3. </B><B>Acceptance. </B>Any use of the Original Work or a
Derivative Work, or any action according to either Section 2a) to 2f)
above constitutes Your acceptance of this License.</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
<B>4. </B><B>Designation of Derivative Works and of Modified Works.
</B>The identifying designation of Derivative Work and of Modified
Work must be different to the corresponding identifying designation
of the Original Work. This means especially that the (root-level)
name of a Modelica package under this license must be changed if the
package is modified (besides fixing of errors, adding vendor specific
Modelica annotations, using a subset of the classes of a Modelica
package, or using another representation, e.g. a binary
representation).</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
<B>5. </B><B>Grant of Patent License.</B>
Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license,
under patent claims owned by the Licensor or licensed to the Licensor by
the owners of the Original Work that are embodied in the Original Work
as furnished by the Licensor, for the duration of the patents,
to make, use, sell, offer for sale, have made, and import the Original Work
and Derivative Works under the conditions as given in Section 2.
For the matter of clarity, the license regarding Derivative Works covers
patent claims to the extent as they are embodied in the Original Work only.</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
<B>6. Provision of </B><B>Source Code. </B>Licensor agrees to provide
You with a copy of the Source Code of the Original Work but reserves
the right to decide freely on the manner of how the Original Work is
provided.<br>
For the matter of clarity, Licensor might provide only a binary
representation of the Original Work. In that case, You may (a) either
reproduce the Source Code from the binary representation if this is
possible (e.g., by performing a copy of an encrypted Modelica
package, if encryption allows the copy operation) or (b) request the
Source Code from the Licensor who will provide it to You.</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
<B>7. </B><B>Exclusions from License Grant. </B>Neither the names of
Licensor, nor the names of any contributors to the Original Work, nor
any of their trademarks or service marks, may be used to endorse or
promote products derived from this Original Work without express
prior permission of the Licensor. Except as otherwise expressly
stated in this License and in particular in Sections 2 and 5, nothing
in this License grants any license to Licensor’s trademarks,
copyrights, patents, trade secrets or any other intellectual
property, and no patent license is granted to make, use, sell, offer
for sale, have made, or import embodiments of any patent claims.<br>
No license is granted to the trademarks of
Licensor even if such trademarks are included in the Original Work,
except as expressly stated in this License. Nothing in this License
shall be interpreted to prohibit Licensor from licensing under terms
different from this License any Original Work that Licensor otherwise
would have a right to license.</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
<B>8. </B><B>Attribution Rights. </B>You must retain in the Source
Code of the Original Work and of any Derivative Works that You
create, all author, copyright, patent, or trademark notices, as well
as any descriptive text identified therein as an "Attribution
Notice". The same applies to the licensing notice of this
License in the Original Work. For the matter of clarity, “author
notice” means the notice that identifies the original
author(s). <br>
You must cause the Source Code for any Derivative
Works that You create to carry a prominent Attribution Notice
reasonably calculated to inform recipients that You have modified the
Original Work. <br>
In case the Original Work or Derivative Work is not provided in
Source Code, the Attribution Notices shall be appropriately
displayed, e.g., in the documentation of the Derivative Work.</P>
<P STYLE=\"text-indent: 0pt\"><B>9. </B><B>Disclaimer
of Warranty. <BR></B><U><B>The Original Work is provided under this
License on an "as is" basis and without warranty, either
express or implied, including, without limitation, the warranties of
non-infringement, merchantability or fitness for a particular
purpose. The entire risk as to the quality of the Original Work is
with You.</B></U><B> </B>This disclaimer of warranty constitutes an
essential part of this License. No license to the Original Work is
granted by this License except under this disclaimer.</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
<B>10. </B><B>Limitation of Liability. </B>Under no circumstances and
under no legal theory, whether in tort (including negligence),
contract, or otherwise, shall the Licensor, the owner or a licensee
of the Original Work be liable to anyone for any direct, indirect,
general, special, incidental, or consequential damages of any
character arising as a result of this License or the use of the
Original Work including, without limitation, damages for loss of
goodwill, work stoppage, computer failure or malfunction, or any and
all other commercial damages or losses. This limitation of liability
shall not apply to the extent applicable law prohibits such
limitation.</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
<B>11. </B><B>Termination. </B>This License conditions your rights to
undertake the activities listed in Section 2 and 5, including your
right to create Derivative Works based upon the Original Work, and
doing so without observing these terms and conditions is prohibited
by copyright law and international treaty. Nothing in this License is
intended to affect copyright exceptions and limitations. This License
shall terminate immediately and You may no longer exercise any of the
rights granted to You by this License upon your failure to observe
the conditions of this license.</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
<B>12. </B><B>Termination for Patent Action. </B>This License shall
terminate automatically and You may no longer exercise any of the
rights granted to You by this License as of the date You commence an
action, including a cross-claim or counterclaim, against Licensor,
any owners of the Original Work or any licensee alleging that the
Original Work infringes a patent. This termination provision shall
not apply for an action alleging patent infringement through
combinations of the Original Work under combination with other
software or hardware.</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
<B>13. </B><B>Jurisdiction. </B>Any action or suit relating to this
License may be brought only in the courts of a jurisdiction wherein
the Licensor resides and under the laws of that jurisdiction
excluding its conflict-of-law provisions. The application of the
United Nations Convention on Contracts for the International Sale of
Goods is expressly excluded. Any use of the Original Work outside the
scope of this License or after its termination shall be subject to
the requirements and penalties of copyright or patent law in the
appropriate jurisdiction. This section shall survive the termination
of this License.</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
<B>14. </B><B>Attorneys’ Fees. </B>In any action to enforce the
terms of this License or seeking damages relating thereto, the
prevailing party shall be entitled to recover its costs and expenses,
including, without limitation, reasonable attorneys' fees and costs
incurred in connection with such action, including any appeal of such
action. This section shall survive the termination of this License.</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium; widows: 2; orphans: 2\">
<B>15. </B><B>Miscellaneous. </B>
</P>
<OL style=\"list-style-type:lower-latin\">
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium\">If any
provision of this License is held to be unenforceable, such
provision shall be reformed only to the extent necessary to make it
enforceable.</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium\">No verbal
ancillary agreements have been made. Changes and additions to this
License must appear in writing to be valid. This also applies to
changing the clause pertaining to written form.</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium\">You may use the
Original Work in all ways not otherwise restricted or conditioned by
this License or by law, and Licensor promises not to interfere with
or be responsible for such uses by You.</P>
</OL>
<hr>
<H4><A NAME=\"2. How to Apply the Modelica License 2|outline\"></A>
How to Apply the Modelica License 2</H4>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">
At the top level of your Modelica package and at every important
subpackage, add the following notices in the info layer of the
package:</P>
<table border=\"0\"><tr><td> </td><td>
Licensed by <Licensor> under the Modelica License 2<br>
Copyright © <year1>-<year2>, <name of copyright
holder(s)>.
</td></tr></table>
<table border=\"0\"><tr><td> </td><td>
<I>This Modelica package is <U>free</U> software and
the use is completely at <U>your own risk</U>;
it can be redistributed and/or modified under the terms of the
Modelica license 2, see the license conditions (including the
disclaimer of warranty)
<A HREF=\"modelica://Library.UsersGuide.ModelicaLicense2\">here</A></U>
or at
<A HREF=\"http://www.modelica.org/licenses/ModelicaLicense2\">
http://www.modelica.org/licenses/ModelicaLicense2</A>.
</td></tr></table>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">Include
a copy of the Modelica License 2 under
<B><library>.UsersGuide.ModelicaLicense2</B>
(use <A HREF=\"http://www.modelica.org/licenses/ModelicaLicense2.mo\">
http://www.modelica.org/licenses/ModelicaLicense2.mo</A>). Furthermore, add
the list of authors and contributors under
<B><library>.UsersGuide.Contributors</B> or
<B><library>.UsersGuide.Contact</B>.</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">For
example, sublibrary Modelica.Blocks of the Modelica Standard Library
may have the following notices:</P>
<table border=\"0\"><tr><td> </td><td>
Licensed by Modelica Association under the Modelica License 2<br>
Copyright © 1998-2008, Modelica Association.
</td></tr></table>
<table border=\"0\"><tr><td> </td><td>
<I>This Modelica package is <U>free</U> software and
the use is completely at <U>your own risk</U>;
it can be redistributed and/or modified under the terms of the
Modelica license 2, see the license conditions (including the
disclaimer of warranty)
<A HREF=\"modelica://Modelica.UsersGuide.ModelicaLicense2\">here</A></U>
or at
<A HREF=\"http://www.modelica.org/licenses/ModelicaLicense2\">
http://www.modelica.org/licenses/ModelicaLicense2</A>.</I>
</td></tr></table>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">For
C-source code and documents, add similar notices in the corresponding
file.</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">For
images, add a “readme.txt” file to the directories where
the images are stored and include a similar notice in this file.</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">In
these cases, save a copy of the Modelica License 2 in one directory
of the distribution, e.g.,
<A HREF=\"http://www.modelica.org/licenses/ModelicaLicense2.html\">
http://www.modelica.org/licenses/ModelicaLicense2.html</A>
in directory <B><library>/help/documentation/ModelicaLicense2.html</B>.</P>
<hr>
<H4><A NAME=\"_Ref202857474\"></A><A NAME=\"3. Frequently Asked Questions|outline\"></A>
Frequently Asked Questions</H4>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">
This section contains questions/answer to users and/or distributors of
Modelica packages and/or documents under Modelica License 2. Note,
the answers to the questions below are not a legal interpretation of
the Modelica License 2. In case of a conflict, the language of the
license shall prevail.</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\"><BR>
</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium; color: green; font-size:140%\">
<b>Using or Distributing a Modelica <U>Package</U> under the Modelica License 2</b></P>
<P STYLE=\"text-indent: 0pt\"><B>What are the main
differences to the previous version of the Modelica License?</B></P>
<OL>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium\">
Modelica License 1 is unclear whether the licensed Modelica package
can be distributed under a different license. Version 2 explicitly
allows that “Derivative Work” can be distributed under
any license of Your choice, see examples in Section 1d) as to what
qualifies as Derivative Work (so, version 2 is clearer).</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium\">
If You modify a Modelica package under Modelica License 2 (besides
fixing of errors, adding vendor specific Modelica annotations, using
a subset of the classes of a Modelica package, or using another
representation, e.g., a binary representation), you must rename the
root-level name of the package for your distribution. In version 1
you could keep the name (so, version 2 is more restrictive). The
reason of this restriction is to reduce the risk that Modelica
packages are available that have identical names, but different
functionality.</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium\">
Modelica License 1 states that “It is not allowed to charge a
fee for the original version or a modified version of the software,
besides a reasonable fee for distribution and support<SPAN LANG=\"en-GB\">“.
Version 2 has a </SPAN>similar intention for all Original Work under
<U>Modelica License 2</U> (to remain free of charge and open source)
but states this more clearly as “No fee, neither as a
copyright-license fee, nor as a selling fee for the copy as such may
be charged”. Contrary to version 1, Modelica License 2 has no
restrictions on fees for Derivative Work that is provided under a
different license (so, version 2 is clearer and has fewer
restrictions).</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium\">
Modelica License 2 introduces several useful provisions for the
licensee (articles 5, 6, 12), and for the licensor (articles 7, 12,
13, 14) that have no counter part in version 1.</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium\">
Modelica License 2 can be applied to all type of work, including
documents, images and data files, contrary to version 1 that was
dedicated for software only (so, version 2 is more general).</P>
</OL>
<P STYLE=\"text-indent: 0pt\"><B>Can I distribute a
Modelica package (under Modelica License 2) as part of my commercial
Modelica modeling and simulation environment?</B></P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">Yes,
according to Section 2c). However, you are not allowed to charge a
fee for this part of your environment. Of course, you can charge for
your part of the environment.
</P>
<P STYLE=\"text-indent: 0pt\"><B>Can I distribute a
Modelica package (under Modelica License 2) under a different
license?</B></P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">No.
The license of an unmodified Modelica package cannot be changed
according to Sections 2c) and 2d). This means that you cannot <U>sell</U>
copies of it, any distribution has to be free of charge.</P>
<P STYLE=\"text-indent: 0pt\"><B>Can I distribute a
Modelica package (under Modelica License 2) under a different license
when I first encrypt the package?</B></P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">No.
Merely encrypting a package does not qualify for Derivative Work and
therefore the encrypted package has to stay under Modelica License 2.</P>
<P STYLE=\"text-indent: 0pt\"><B>Can I distribute a
Modelica package (under Modelica License 2) under a different license
when I first add classes to the package?</B></P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">No.
The package itself remains unmodified, i.e., it is Original Work, and
therefore the license for this part must remain under Modelica
License 2. The newly added classes can be, however, under a different
license.
</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\"><B>Can
I copy a class out of a Modelica package (under Modelica License 2)
and include it </B><U><B>unmodified</B></U><B> in a Modelica package
under a </B><U><B>commercial/proprietary license</B></U><B>?</B></P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">No,
according to article 2c). However, you can include model, block,
function, package, record and connector classes in your Modelica
package under <U>Modelica License 2</U>. This means that your
Modelica package could be under a commercial/proprietary license, but
one or more classes of it are under Modelica License 2.<BR>Note, a
“type” class (e.g., type Angle = Real(unit=”rad”))
can be copied and included unmodified under a commercial/proprietary
license (for details, see the next question).</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\"><B>Can
I copy a type class or </B><U><B>part</B></U><B> of a model, block,
function, record, connector class, out of a Modelica package (under
Modelica License 2) and include it modified or unmodified in a
Modelica package under a </B><U><B>commercial/proprietary</B></U><B>
license</B></P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">Yes,
according to article 2d), since this will in the end usually qualify
as Derivative Work. The reasoning is the following: A type class or
part of another class (e.g., an equation, a declaration, part of a
class description) cannot be utilized “by its own”. In
order to make this “usable”, you have to add additional
code in order that the class can be utilized. This is therefore
usually Derivative Work and Derivative Work can be provided under a
different license. Note, this only holds, if the additional code
introduced is sufficient to qualify for Derivative Work. Merely, just
copying a class and changing, say, one character in the documentation
of this class would be no Derivative Work and therefore the copied
code would have to stay under Modelica License 2.</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\"><B>Can
I copy a class out of a Modelica package (under Modelica License 2)
and include it in </B><U><B>modified </B></U><B>form in a
</B><U><B>commercial/proprietary</B></U><B> Modelica package?</B></P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">Yes.
If the modification can be seen as a “Derivative Work”,
you can place it under your commercial/proprietary license. If the
modification does not qualify as “Derivative Work” (e.g.,
bug fixes, vendor specific annotations), it must remain under
Modelica License 2. This means that your Modelica package could be
under a commercial/proprietary license, but one or more parts of it
are under Modelica License 2.</P>
<P STYLE=\"text-indent: 0pt\"><B>Can I distribute a
“save total model” under my commercial/proprietary
license, even if classes under Modelica License 2 are included?</B></P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">Your
classes of the “save total model” can be distributed
under your commercial/proprietary license, but the classes under
Modelica License 2 must remain under Modelica License 2. This means
you can distribute a “save total model”, but some parts
might be under Modelica License 2.</P>
<P STYLE=\"text-indent: 0pt\"><B>Can I distribute a
Modelica package (under Modelica License 2) in encrypted form?</B></P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">Yes.
Note, if the encryption does not allow “copying” of
classes (in to unencrypted Modelica source code), you have to send
the Modelica source code of this package to your customer, if he/she
wishes it, according to article 6.</P>
<P STYLE=\"text-indent: 0pt\"><B>Can I distribute an
executable under my commercial/proprietary license, if the model from
which the executable is generated uses models from a Modelica package
under Modelica License 2?</B></P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">Yes,
according to article 2d), since this is seen as Derivative Work. The
reasoning is the following: An executable allows the simulation of a
concrete model, whereas models from a Modelica package (without
pre-processing, translation, tool run-time library) are not able to
be simulated without tool support. By the processing of the tool and
by its run-time libraries, significant new functionality is added (a
model can be simulated whereas previously it could not be simulated)
and functionality available in the package is removed (e.g., to build
up a new model by dragging components of the package is no longer
poss" + "ible with the executable).</P>
<P STYLE=\"text-indent: 0pt\"><B>Is my modification to
a Modelica package (under Modelica License 2) a Derivative Work?</B></P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">It
is not possible to give a general answer to it. To be regarded as "an
original work of authorship", a derivative work must be
different enough from the original or must contain a substantial
amount of new material. Making minor changes or additions of little
substance to a preexisting work will not qualify the work as a new
version for such purposes.
</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\"><BR>
</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium; color: green; font-size:140%\">
<b>Using or Distributing a Modelica <U>Document</U> under the Modelica License 2</b></P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">This
section is devoted especially for the following applications:</P>
<OL>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium\">
A Modelica tool extracts information out of a Modelica package and
presents the result in form of a “manual” for this
package in, e.g., html, doc, or pdf format.</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium\">
The Modelica language specification is a document defining the
Modelica language. It will be licensed under Modelica License 2.</P>
<LI><P STYLE=\"text-indent: 0pt; font-weight: medium\">
Someone writes a book about the Modelica language and/or Modelica
packages and uses information which is available in the Modelica
language specification and/or the corresponding Modelica package.</P>
</OL>
<P STYLE=\"text-indent: 0pt\"><B>Can I sell a manual
that was basically derived by extracting information automatically
from a Modelica package under Modelica License 2 (e.g., a “reference
guide” of the Modelica Standard Library):</B></P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">Yes.
Extracting information from a Modelica package, and providing it in a
human readable, suitable format, like html, doc or pdf format, where
the content is significantly modified (e.g. tables with interface
information are constructed from the declarations of the public
variables) qualifies as Derivative Work and there are no restrictions
to charge a fee for Derivative Work under alternative 2d).</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\"><B>Can
I copy a text passage out of a Modelica document (under Modelica
License 2) and use it </B><U><B>unmodified</B></U><B> in my document
(e.g. the Modelica syntax description in the Modelica Specification)?</B></P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">Yes.
In case you distribute your document, the copied parts are still
under Modelica License 2 and you are not allowed to charge a license
fee for this part. You can, of course, charge a fee for the rest of
your document.</P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\"><B>Can
I copy a text passage out of a Modelica document (under Modelica
License 2) and use it in </B><U><B>modified</B></U><B> form in my
document?</B></P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">Yes,
the creation of Derivative Works is allowed. In case the content is
significantly modified this qualifies as Derivative Work and there
are no restrictions to charge a fee for Derivative Work under
alternative 2d).</P>
<P STYLE=\"text-indent: 0pt\"><B>Can I sell a printed
version of a Modelica document (under Modelica License 2), e.g., the
Modelica Language Specification?</B></P>
<P STYLE=\"text-indent: 0pt; font-weight: medium\">No,
if you are not the copyright-holder, since article 2c) does not allow
a selling fee for a (in this case physical) copy. However, mere
printing and shipping costs may be recovered.</P>
</html>
"));
end License;
class Contact "Contact"
annotation (Documentation(info="<html>
<p>
<dl>
<dt>The Library ComplexLib was developed by
</p>
<p>
<dd>Olaf Enge-Rosenblatt<br>
Fraunhofer Institut Integrierte Schaltungen<br>
Institutsteil Entwurfsautomatisierung IIS/EAS<br>
Zeunerstraße 38<br>
01069 Dresden<br>
Germany<br>
email: <a href=\"mailto:olaf.enge@eas.iis.fraunhofer.de\">olaf.enge@eas.iis.fraunhofer.de</a>
</dd>
and <br>
<dd>Matthias Vetter, Simon Schwunk<br>
Fraunhofer Institut Solare Energiesysteme ISE<br>
Heidenhofstraße 2<br>
79110 Freiburg<br>
Germany<br>
email: <a href=\"mailto:matthias.vetter@ise.fraunhofer.de\">matthias.vetter@ise.fraunhofer.de</a>
</dd>
</p>
</html>"));
end Contact;
end UsersGuide;
package Examples "Examples to demonstrate the usage of ComplexLib"
model RlcCircuit "Simple RLC circuit"
extends Modelica.Icons.Example;
ComplexLib.SinglePhase.Basic.Ground ground
annotation (Placement(transformation(extent={{-70,-40},{-50,-20}})));
ComplexLib.SinglePhase.Sources.SineVoltage V(V=10) annotation (Placement(
transformation(
extent={{-10,-10},{10,10}},
rotation=-90,
origin={-60,10})));
ComplexLib.SinglePhase.Basic.Resistor R(R=30)
annotation (Placement(transformation(extent={{-40,30},{-20,50}})));
ComplexLib.SinglePhase.Basic.Inductor L(L=0.2) annotation (Placement(
transformation(
extent={{-10,-10},{10,10}},
rotation=0,
origin={10,40})));
annotation (uses(Modelica(version="3.0")), Diagram(coordinateSystem(
preserveAspectRatio=true, extent={{-100,-100},{100,100}}), graphics),
Documentation(info="<html>
<p>
This example shows a simple series of a voltage source with resistor,
inductor, and capacitor.
Because of phasor description, all results have constant values.
</p>
<p>
Simulate for an arbitrary time interval (e.g. 1 s).
</p>
Plot in seperate windows<br>
<ul>
<li><tt>V.v</tt>, <tt> R.v</tt>, <tt> L.v</tt>,<tt> </tt>
and <tt> C.v </tt> versus "Time"</li>
<li><tt>V.phi_v</tt>, <tt> R.phi_v</tt>, <tt> L.phi_v</tt>,<tt> </tt>
and <tt> C.phi_v </tt> versus "Time"</li>
</ul>
to see the corresponding steady-state values.
</p>
<p>
<br><dt><b>Main Author:</b></dt>
<dd>Olaf Enge-Rosenblatt<br>
Fraunhofer IIS/EAS, Dresden<br>
email: <a href=\"mailto:olaf.enge@eas.iis.fraunhofer.de\">olaf.enge@eas.iis.fraunhofer.de</a>
</dd>
</p>
</html>"));
ComplexLib.SinglePhase.Basic.Capacitor C(C=1e-5)
annotation (Placement(
transformation(
extent={{-10,-10},{10,10}},
rotation=270,
origin={40,10})));
equation
connect(V.p, R.p) annotation (Line(
points={{-60,20},{-60,40},{-40,40}},
color={0,0,255},
smooth=Smooth.None));
connect(R.n, L.p) annotation (Line(
points={{-20,40},{0,40}},
color={0,0,255},
smooth=Smooth.None));
connect(V.n, ground.p) annotation (Line(
points={{-60,0},{-60,-20}},
color={0,0,255},
smooth=Smooth.None));
connect(L.n, C.p) annotation (Line(
points={{20,40},{40,40},{40,20}},
color={0,0,255},
smooth=Smooth.None));
connect(C.n, ground.p) annotation (Line(
points={{40,0},{40,-20},{-60,-20}},
color={0,0,255},
smooth=Smooth.None));
end RlcCircuit;
model VaryingResistance "Electric circuit with varying resistance"
extends Modelica.Icons.Example;
ComplexLib.SinglePhase.Basic.Ground ground
annotation (Placement(transformation(extent={{-70,-40},{-50,-20}})));
ComplexLib.SinglePhase.Sources.SineVoltage V(V=10) annotation (Placement(
transformation(
extent={{-10,-10},{10,10}},
rotation=-90,
origin={-60,10})));
ComplexLib.SinglePhase.Basic.Resistor R2(R=2)
annotation (Placement(transformation(extent={{-40,30},{-20,50}})));
ComplexLib.SinglePhase.Basic.Inductor L(L=0.005)
annotation (Placement(
transformation(
extent={{-10,-10},{10,10}},
rotation=-90,
origin={0,10})));
ComplexLib.SinglePhase.Basic.VariableResistor R3 annotation (Placement(
transformation(
extent={{-10,-10},{10,10}},
rotation=-90,
origin={40,10})));
Modelica.Blocks.Sources.Ramp Ramp(
height=5,
offset=0.01,
duration=10)
annotation (Placement(transformation(extent={{60,-40},{80,-20}})));
annotation (uses(Modelica(version="3.0")), Diagram(coordinateSystem(
preserveAspectRatio=true, extent={{-100,-100},{100,100}}), graphics),
Documentation(info="<html>
<p>
This example shows a purely electric circuit containing a VariableResistor component (R3).
The resistance of R3 is determined depending on time function of component Ramp.
It starts at a very small value (0.01 Ohm) and reaches 5 Ohm after 10 s.<br><br>
Using this example, we would like to give an idea how one can decide if the system
is in a quasi-stationary mode or not.<br><br>
The main (and only) time constant of the system reads <tt>T = L*(R2+R3)/(R2*R3)</tt>.
It is well-known for first-order components that, after a step-like change of an
input signal, the output signal reaches 95 % of íts final value after a time period
of <tt>3*T</tt>.
This time period is called <tt>decayTime</tt>.
Checking the difference between <tt>decayTime</tt> and the time interval of the
simulation experiment yields the information if the system is in a quasi-stationary
mode.<br><br>
Because of variable resistor R3, it is necessary to calculate <tt>decayTime</tt>
during the simulation experiment according to <tt>decayTime = 3*L*(R2+R3)/(R2*R3)</tt>.
The Boolean <tt>quasiStationaryOk</tt> tests if <tt>decayTime</tt> is smaller than
the simulation interval <tt>tInterval</tt> (which is necessary for quasi-stationary
mode).
Hence in the <b>first part</b> of the simulation (Time < 2.4 s), the system is
<b>not</b> in a <b>quasi-stationary</b> mode and the appropriate points in time of the
result curves represent only a series of steady states without any correlation with time.
In the <b>second part</b> of the simulation (Time > 2.4 s), the system <b>is
quasi-stationary</b> and the result curves reflect a correct relationship with time.
</p>
<p>
Simulate until 10 s.
</p>
Plot in seperate windows<br>
<ul>
<li><tt>V.v</tt>, <tt> R2.v</tt>,<tt> </tt>
and <tt> L.v </tt> versus "Time"</li>
<li><tt>L.vRe </tt> and <tt> L.vIm </tt> versus "Time"</li>
<li><tt>quasiStationaryOk</tt> versus "Time"</li>
</ul>
to see steady-state sequences or the quasi-stationary plots of the corresponding values.
</p>
<p>
<br><dt><b>Main Authors:</b></dt>
<dd>Olaf Enge-Rosenblatt, Christoph Clauß<br>
Fraunhofer IIS/EAS, Dresden<br>
email: <a href=\"mailto:olaf.enge@eas.iis.fraunhofer.de\">olaf.enge@eas.iis.fraunhofer.de</a>
</dd>
</p>
</html>"),
experiment(StopTime=10));
constant Real tInterval=10/500 "10 seconds devided into 500 intervals";
Real decayTime;
Boolean quasiStationaryOk;
equation
connect(V.p, R2.p) annotation (Line(
points={{-60,20},{-60,40},{-40,40}},
color={0,0,255},
smooth=Smooth.None));
connect(R2.n, L.p) annotation (Line(
points={{-20,40},{1.83697e-015,40},{1.83697e-015,20}},
color={0,0,255},
smooth=Smooth.None));
connect(R2.n, R3.p) annotation (Line(
points={{-20,40},{40,40},{40,20}},
color={0,0,255},
smooth=Smooth.None));
connect(V.n, ground.p) annotation (Line(
points={{-60,0},{-60,-20}},
color={0,0,255},
smooth=Smooth.None));
connect(L.n, ground.p) annotation (Line(
points={{-1.83697e-015,0},{0,0},{0,-20},{-60,-20}},
color={0,0,255},
smooth=Smooth.None));
connect(R3.n, ground.p) annotation (Line(
points={{40,0},{40,-20},{-60,-20}},
color={0,0,255},
smooth=Smooth.None));
connect(Ramp.y, R3.R) annotation (Line(
points={{81,-30},{90,-30},{90,10},{52,10}},
color={0,0,127},
smooth=Smooth.None));
decayTime = 3*L.L*(R2.R+R3.R)/(R2.R*R3.R);
quasiStationaryOk = decayTime < tInterval;
end VaryingResistance;
model QuasiStationaryAIM