BGMod Documentation / v3
BGMod handbook

Electrics

Component reference · matches the Elements library.

Electrical → Primitives / AdvancedVoltage [V]Current [A]

The selector calls this domain Electrical. The common return conductor is the zero-voltage reference; one bond carries a voltage/current pair, not an individual wire.

Primitives

Expand a component for its equation, parameters and initial state. Defaults match insertion from the library.

0Common voltageCommon voltage node; currents obey Kirchhoff’s current law.

Common voltage node; currents obey Kirchhoff’s current law.

Ports: p1, p2, …

v₁ = v₂ = …; Σ i_local = 0
Parameters
No coefficient or stored state. At least two connected bonds. Junction endpoint signs follow the connection order; reversing a power arrow does not rewire it.
Defaults
—
Classic element 0Classic junction; three bonds are shown, but the number of ports can vary.0p1p2p3
Classic junction; three bonds are shown, but the number of ports can vary. Causal strokes are omitted; see notation and signs.
1Common currentSeries current; signed voltages obey Kirchhoff’s voltage law.

Series current; signed voltages obey Kirchhoff’s voltage law.

Ports: p1, p2, …

directionᵢ · iᵢ = i_ref; Σ sᵢ vᵢ = 0
Parameters
No coefficient or stored state. At least two connected bonds. Junction endpoint signs follow the connection order; reversing a power arrow does not rewire it.
Defaults
—
Classic element 1Classic junction; three bonds are shown, but the number of ports can vary.1p1p2p3
Classic junction; three bonds are shown, but the number of ports can vary. Causal strokes are omitted; see notation and signs.
RResistorOhmic resistor with constant resistance.Ω

Ohmic resistor with constant resistance.

Ports: E

v = R i_local; P_loss = R i_local²
Parameters
value > 0; constant linear coefficient.
Defaults
value = 100 · Ω
Classic element RClassic one-port element with no further internal graph. One bond carries effort and flow relative to the domain reference.ERe, f
Classic one-port element with no further internal graph. One bond carries effort and flow relative to the domain reference. Causal strokes are omitted; see notation and signs.
CCapacitorIdeal capacitor; stores electric charge.F

Ideal capacitor; stores electric charge.

Ports: E

dq/dt = i_local; v = q/C; E = q²/(2C)
Parameters
value > 0; constant linear coefficient.
Defaults
value = 0.001, initial = 0 · F
Initial state
Charge q₀ [C]; q₀ = C·v₀. Farads (F) measure capacitance; coulombs (C) measure charge. initial = 0.
Classic element CClassic one-port element with no further internal graph. One bond carries effort and flow relative to the domain reference.ECe, f
Classic one-port element with no further internal graph. One bond carries effort and flow relative to the domain reference. Causal strokes are omitted; see notation and signs.
IInductorIdeal inductor: I is the bond-graph type, L the inductance.H

Ideal inductor: I is the bond-graph type, L the inductance.

Ports: E

dλ/dt = v; i_local = λ/L; E = λ²/(2L)
Parameters
value > 0; constant linear coefficient. value is inductance L [H].
Defaults
value = 0.1, initial = 0 · H
Initial state
Flux linkage λ₀ [Wb]; λ₀ = L·i₀. Enter inductance in H, not mH. initial = 0.
Classic element IClassic one-port element with no further internal graph. One bond carries effort and flow relative to the domain reference.EIe, f
Classic one-port element with no further internal graph. One bond carries effort and flow relative to the domain reference. Causal strokes are omitted; see notation and signs.
SeVoltage sourceIdeal voltage source; current is determined by the circuit.V

Ideal voltage source; current is determined by the circuit.

Ports: E

v = u(t)
Parameters
Constant: value. Step: value before time, after at and after time; time ≥ 0 s. Values may have either sign. No stored state.
Defaults
value = 10, waveform = constant · V
Classic element SeClassic one-port element with no further internal graph. One bond carries effort and flow relative to the domain reference.ESee, f
Classic one-port element with no further internal graph. One bond carries effort and flow relative to the domain reference. Causal strokes are omitted; see notation and signs.
SfCurrent sourceIdeal current source; voltage is determined by the circuit.A

Ideal current source; voltage is determined by the circuit.

Ports: E

i_local = −u(t)
Parameters
Constant: value. Step: value before time, after at and after time; time ≥ 0 s. Values may have either sign. No stored state. Positive input supplies flow out of the source, so inward local flow is negative.
Defaults
value = 0.01, waveform = constant · A
Classic element SfClassic one-port element with no further internal graph. One bond carries effort and flow relative to the domain reference.ESfe, f
Classic one-port element with no further internal graph. One bond carries effort and flow relative to the domain reference. Causal strokes are omitted; see notation and signs.
TFIdeal transformern = N₁/N₂1

In the electrical domain, P is the primary winding; S is the secondary. Dimensionless turns ratio n = N₁/N₂ > 0; default n = 1. Local currents enter both ports. Exactly one port supplies effort and the other receives effort. No losses or stored state. The secondary/primary voltage ratio is 1/n.

P, S: V / A

eP = n eS; fS_local = −n fP_local; eP fP_local + eS fS_local = 0
PTFSn = N₁/N₂; eS = eP/n

Example: ideal transformer

Advanced

No advanced electrical components are implemented yet. Use the primitives above. Motors and GY are not currently palette elements.

Advanced membership follows exposed port domains. The cylinder appears in Hydraulics and Translational mechanics. The pump curve has no electrical port; the gas accumulator has no thermal port.