Diodes are switching elements that are primarily being used in electrical circuits, although nothing prevents them from being used also in other energy domains.
The causality of the ideal diode element must be free, i.e., the ideal diode element must be placed inside an algebraic loop.
Potential variables: e: Bondgraphic effort variable f: Bondgraphic flow variable, normalized positive for flows into the model mode: Sextary variable denoting the switch position (internal modulation signal) s1: Curve parameter s2: Curve parameter s3: Curve parameter s4: Curve parameter s5: Curve parameter Parameters: em: Intermediate forward voltage (default value = 1 Volt) e0: Maximum forward voltage (default value = 2 Volt) fm: Bottom intermediate current (default value = 1 Amp) f0: Top intermediate current (default value = 2 Amp)
Equations:
s2 = s1 - f0
s3 = s2 - em
s4 = s3 - (f0-fm)
s5 = s4 - (e0-em)
mode = if s1 < 0 then blockinging else if s2 < 0 then c1
else if s3 < 0 then b1 else if s4 < 0 then c2 else if s5 <
0 then b2 else conducting
e = if mode == blocking then s1 else if mode == c1 then 0 else
if mode == b1 then s2 else if mode == c2 then em else if mode == b2
then (em + s4) else e0
f = if mode == blocking then 0 else if mode == c1 then s1 else
if mode == b1 then f0 else if mode == c2 then (f0 - s3) else if
mode == b2 then fm else (fm + s5)
References: