The circuit below will generate a 24v DC supply with just a bit of ripple
voltage. It is rated at 2 Amps.
The circuit works by opening and closing a switch routing DC pulses into
the energy storage capacitor C2. The transistor Q2 is turned on when the voltage
from the bridge rectifier is below 26v. This allows C2 to charge up to about 25
volts. As the bridge voltage increases, the transistor Q1 then starts turning on,
which in turn turns off Q2. The result is a voltage across C2 which is pumped up to
about 25 volts and is discharged to about 23 volts before the next cycle. The
average voltage is pretty close to 24 volts.