Hey Gyula
Try this code in the sim prog from Falstad.com I know you have the sim but in case anyone else does not know of it.
It is the circuit I descibed above with the addition of another diode across the source to continue the loop after the source is disconnected. The diode does nothing until the source is cut off. Then it allows the coil to pump the caps charge from one side to the other as it winds down from the flywheel spin.
Run the sim. The scope on the left is the source voltage and the one on the right is the cap voltage.
Hold the switch until the cap reaches 20v or so, then release and watch. When the switch is closed, the diode next to the source is inactive till the source is cut.
I am going to put together a comparator circuit to compare the source and cap voltage to operate the switch when they are equal. Even if we cut the switch when the cap is around or below the source voltage, the cap will still contain more energy than what came from the source. I challenge anyone to test this theory. TK ?
$ 1 5.0E-6 0.551975421667673 57 5.0 43
s 640 192 704 192 0 1 true
c 432 464 640 464 0 1.4999999999999999E-5 9.999999999999332E-4
v 704 464 704 192 0 0 40.0 20.0 0.0 0.0 0.5
r 640 464 704 464 0 1.0
l 432 192 640 192 0 1.0 6.39679282863122E-23
d 432 192 432 464 1 0.805904783
d 640 464 640 192 1 0.805904783
o 2 8 0 35 20.0 9.765625E-5 0 -1
o 1 8 0 35 0.009765625 9.765625E-5 1 -1
Mags