Voltage stabilizers
Real diodes
I have used an "ideal" diode with 10 V forward-voltage from the CircuitLab library to imitate a Zener diode with 10 V backward voltage.
![schematic](https://cdn.statically.io/img/i.sstatic.net/8XyVA.png)
simulate this circuit – Schematic created using CircuitLab
Represented as non-linear resistors
Both forward-biased diodes and backward-biased Zener diodes can be presented as constant-voltage non-linear resistors having almost vertical IV curve. In short, they are 2-terminal voltage stabilizers. They keep the voltage across themselves constant by changing their static resistance (R = V/I) depending on the current flowing - when the current increases, they decrease their resistance, and conversely, when the current decreases, they increase their resistance. Thus the product of the two quantities remains constant (V = I.R = const). That is why they can be called (constant-voltage) "dynamic resistors".
![schematic](https://cdn.statically.io/img/i.sstatic.net/JcHy7.png)
simulate this circuit
Since there are no such elements in the CircuitLab library, I was not able to bring the simulation to life... but we can do it manually in the form of a fun game:-) You can start increasing the current and at the same time I will decrease the resistance so the voltmeter reading will not change.
Represented as constant voltage sources
However, for some reason, this idea of diodes has not gained popularity and they have decided to present them through something similar - a voltage source that has a similar vertical characteristic. But this resemblance is formal and somewhat misleading because these elements are not sources in the literal sense of the word (they do not produce power).
![schematic](https://cdn.statically.io/img/i.sstatic.net/59QMn.png)
simulate this circuit
Current stabilizers
Real transistors
I have precisely adjusted the input (base-emitter) voltage of an NPN transistor to set the same 10 mA collector current.
![schematic](https://cdn.statically.io/img/i.sstatic.net/ULyDr.png)
simulate this circuit
Represented as non-linear resistors
Similarly, transistors can be presented as constant-current non-linear resistors having almost horizontal output IV curve. In short, they are 2-terminal current stabilizers. They keep the current through themselves constant by changing their static resistance (R = V/I) depending on the voltage across them - when the voltage increases, they also increase their resistance, and conversely, when the voltage decreases, they decrease their resistance. Thus the ratio of the two quantities remains constant (I = V/R = const). Like diodes, they can be called (constant-current) "dynamic resistors".
![schematic](https://cdn.statically.io/img/i.sstatic.net/5e1nt.png)
simulate this circuit
Again, since there are no such elements in the CircuitLab library, we can do it manually in the form of another fun game:-) Now you have to start increasing the voltage and at the same time I will increase the resistance so the ammeter reading will not change.
Represented as constant current sources
However, for some reason, this idea of transistors has not gained popularity and they have decided to present them through something similar - a current source that has a similar horizontal characteristic. As in the case of diodes, this resemblance is formal and misleading because like diodes, these elements are not sources in the literal sense of the word (they do not produce power).
![schematic](https://cdn.statically.io/img/i.sstatic.net/T5IYo.png)
simulate this circuit
What "is" and what is not a voltage source?
Obviously, I will have to extend my answer to justify why it is not appropriate to represent diodes by voltage sources. Actually, I have nothing against the use of a voltage source as an equivalent device for the purpose of explaining electronic circuits (and frequently do it) but of devices that have the properties of sources - the capacitors. Let's examine through experiments a typical example - the so-called "bypass" or "decoupling" capacitor.
A capacitor...
In this arrangement, a 1 mA current source "creates" a 10 V voltage drop across a 1 kΩ "resistor" (a real voltmeter with 1 kΩ internal resistance). A (big enough) capacitor is connected in parallel to the resistor and is charged to its 10 V drop.
![schematic](https://cdn.statically.io/img/i.sstatic.net/0GoET.png)
simulate this circuit
... "is" a voltage source
So, like a true voltage source, the charged capacitor does not draw current because there is not a voltage difference.
![schematic](https://cdn.statically.io/img/i.sstatic.net/WpGQh.png)
simulate this circuit
If we decrease twice the resistance (500 Ω), the voltage will not change because the capacitor behaves as a 10 V voltage source that provides 10 mA current through the resistor.
![schematic](https://cdn.statically.io/img/i.sstatic.net/0tXwH.png)
simulate this circuit
After a while, it will halve its voltage and "be" (behave as) a 5 V voltage source.
![schematic](https://cdn.statically.io/img/i.sstatic.net/MBWOo.png)
simulate this circuit
A diode...
Now let's replace the charged capacitor with a (Zener) diode of the same 10 V voltage.
![schematic](https://cdn.statically.io/img/i.sstatic.net/mprgs.png)
simulate this circuit
... "is" not a voltage source
At first, it will behave the same way as the capacitor above (as a 10 V voltage source). But if we decrease twice the resistance (500 Ω), the diode will not react as a voltage source. It will not pass a current through the resistor to keep its voltage constant (10 V); it will only decrease the current drawn to zero.
![schematic](https://cdn.statically.io/img/i.sstatic.net/4HvJp.png)
simulate this circuit
To do this, it will increase its "resistance" to infinity. So the diode behaves like a self-variable ("dynamic") resistor, not as a source.
![schematic](https://cdn.statically.io/img/i.sstatic.net/wQzmG.png)
simulate this circuit