-
Notifications
You must be signed in to change notification settings - Fork 12
GunnsElectDistributedIf
This link implements a 2-way voltage supply and power demand interface between separate electrical networks. The intended use is between models in separate simulations, using HLA to transfer the data between them, but they can also be used between networks in the same simulation, using sim bus, etc.
This embeds the generic non-GUNNS and non-Trick specific Distributed Bi-Directional Flow Electrical Interface within a GUNNS link, for use in GUNNS networks. Because the interface is generic, a GUNNS network using this link could interface with an instance of the Distributed Bi-Directional Flow Electrical Interface in a non-GUNNS model.
In addition to the generic interface logic, this link embeds GunnsElectConverterInput and GunnselectConverterOutput links to model the power demand from and voltage supply to this network, respectively. This allows the electrical current between separate networks to change direction, based on which side of the interface has the higher voltage supply. This link is equivalent to two sets of GunnsElectConverterInput and GunnsElectConverterOutput, one in each flow direction, when only one direction’s set is enabled at a time. Enabling both directions at the same time is unstable. The generic interface logic in this link automates the negotiation between the models as to which flow direction is enabled at any time.
There are a few important limitations: see Distributed Bi-Directional Flow Electrical Interface for a description of them.
This is a 1-port link. You can connect this link’s Port 0 to any non-Ground node in an electrical network.
- Port 0 cannot connect to the network Ground node.
- This link cannot be completely configured in the GunnsDraw drawing. You must use the Trick Input File, or similar, to register the local network’s voltage supplies with the interface logic. This is described in mSupplies below.
- isPairPrimary (default = 0 false): This denotes whether this instance is the primary or secondary side of the interface. The primary side defaults to the Supply role at initialization, and the secondary side defaults to the Demand role. The Supply role, and primary side, is normally going to be the side of the interface that supplies power to the other side. After initialization, these roles will swap as needed, so you don’t have to get this right. This term is only important for minimizing the run start transient.
- conductance: same as outputConductance in GunnsElectConverterOutput. This defines the internal conductance of the voltage source to the local network when receiving voltage supply from the other side (Demand mode). Note that extremely high values (10 8 or higher) can cause the interface to become unstable; we suggest using values on the order of 10 2 through 10 4.
- netCapDvThreshold (default = 0, must >= DBL_EPSILON): This allows you to control how much conductance must be between each voltage supply and this interface for each supply to be considered available to this interface. This is defined as change in voltage relative to 1 amp of current. In other words, if the load on the supply at this interface node were to increase by 1 amp, how much would the voltage at this node change. If the voltage change is higher than this specified value, then there isn’t sufficient conductance between the supply and this interface location, and the supply is considered to be not available. Higher values for this term require more conductance between the supplies and this interface.
-
mSupplies (set from Input File): This is a vector of pointers to all of the GunnsElectConverterOutput links in the local network that can feed this interface. You add GunnsElectConverterOutput links to this by calling this link’s configuration data object’s addSupply(const GunnsElectConverterOutput*) method, from the input file. You should add all GunnsElectConverterOutput links that could ever conceivably have a flow path to this interface location through the network, including between separate busses that can only connect through cross-ties or short-circuits. This can also include the GunnsElectConverterOutput within any other instance of this GunnsElectDistributedIf link in the network, so that these interfaces can chain together. There is no limit to how many ConverterOutputs you can register with this link. This link will also work if you register no ConverterOutputs, but in such cases it will never be able to enter Supply mode; this would be an example of the Demand side of a 1-way interface.
As an example, say the name of this GunnsElectDistributedIf is Interface_A, and there are two GunnsElectConverterOutput in the network called Reg_1 and Reg_2, and two other GunnsElectDistributedIf called Interface_B and Interface_C, all of which could have a conductive flow path to Interface_A’s node. To add all four ConverterOutputs to Interface_A, the input file would contain (note that the name of the GunnsElectConverterOutput within a GunnsElectDistributedIf is always called .mVoltageSource):
sim_object.network.netConfig.Interface_A.addSupply(sim_object.network.Reg_A)
sim_object.network.netConfig.Interface_A.addSupply(sim_object.network.Reg_B)
sim_object.network.netConfig.Interface_A.addSupply(sim_object.network.Interface_B.mVoltageSource)
sim_object.network.netConfig.Interface_A.addSupply(sim_object.network.Interface_C.mVoltageSource)
- mForceDemandMode (default = false): This forces this link to always be in Demand mode. This would be useful when using these links to model a 1-way interface, where this side always demands power from the other side.
- mForceSupplyMode (default = false): This forces this link to always be in Supply mode. This would be useful when using these links to model a 1-way interface, where this side always supplies power to the other side.
In order for this link to function in Supply mode, you must register other GunnsElectConverterOutput links in the network with this link — see mSupplies above.
- N/A
- N/A
- Refer to the limitations of the generic interface in Distributed Bi-Directional Flow Electrical Interface.