modelEEBlock
Electrical - electrical block
Extends from Modelica.Electrical.Analog.Interfaces.OnePort (Component with two electrical pins p and n and current i from p to n).
Information
Electrical-Electrical BlockElectrical-electrical blocks are the analogon to CCBlocks - they are used to wrap electrical components built from ModelicaDEVS blocks.
From an electrical signal to a DEVS signal, two type conversions have to be made: the first one is from electrical to real-type, the second one from real-type to DEVS. Hence, between the electrical positive/negative pins and the first/last DEVS component, there is an additional RealSignal connector (see the following figure and the code snippet below).

Note that the first/last DEVS block still has to be a transformation block that transforms the real-type signal to a genuine DEVS signal or vice-versa.
The following code snippet gives the declarations of the EEBlock:
1 partial model EEBlock 2 extends Modelica.Electrical.Analog.Interfaces.OnePort; 3 parameter Integer qssMethod=3 "Use QSS1, QSS2 or QSS3"; 4 inner Miscellaneous.worldModel world(qss=qssMethod); 5 6 protected 7 Modelica.Blocks.Interfaces.RealSignal inDEVS ; 8 Modelica.Blocks.Interfaces.RealSignal outDEVS; 9 10 equation 11 12 inDEVS=p.i; 13 v=outDEVS; 14 15 end EEBlock;Due to the need of a electrical-to-real type conversion, virtual connections from the electrical pins to the real-type ports (inDEVS and outDEVS) have to be drawn. This is done by the two equations on line 12+13.
It is important to mention that this kind of electrical-electrical block assumes the current to be given and calculates the voltage. This has to be done because of Modelica's concept of equations instead of assignments that entails non-directed data flow, if not otherwise stated by declaring variables to be of type input or output. DEVS blocks, on the other hand, are always directed. Hence, assumptions about the flow of data have to be made when transforming from electical Modelica components to ModelicaDEVS blocks.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | qssMethod | 3 | Use QSS1, QSS2 or QSS3 |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| PositivePin | p (from TwoPin) | Positive electrical pin | |
| NegativePin | n (from TwoPin) | Negative electrical pin |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| SI.Voltage | v (from TwoPin) | Voltage drop of the two pins (= p.v - n.v) | |
| SI.Current | i (from OnePort) | Current flowing from pin p to pin n | |
| Miscellaneous.worldModel | world |