Hello: I own a 2 kw Whirlwind 12v unit, and there are two 4 kw machines in the family too.
It's very simple: Use a bride rectifier on each phase. There are 3 phases so you will need three of them. Make sure they are over rated in voltage and amperage.
4000 watts divided by 120v = 33.3 amps / by 3 phases = 11 amps per phase.
So I would purchase at least 240v 20 amp bridge rectifiers. If they were 300v 25, 30 or 35 amp units would be even better. Each of the bridge rectifiers 4 connects will be clearly marked with two leads showing ac input connections and two leads having the dc output connections.
You wire all of your dc output connections in parallel. Make sure the three bridge rectifiers are isolated from each other ( no electrical connections of their cases touching each other .) and mount them on big aluminum heat sinks. Be sure to use special silicone heat transfer grease between the rectifiers and the heat sinks available at RadioShack and other electronic stores.)
On making your Whirlwind produce 24 volts is easy to. You use a large DPDT knife switch to switch from the input of your above high voltage bridge rectifiers to the input of 3 120vac to 24vac transformers. The output of each transformer will need to have at least a 60 amp continuous duty rating. Your bridge rectifiers should have at least a 50v 100amp rating. I don't know if you can obtain bridge rectifiers with that high of amperage (current) ratings. If not you can purchase large diodes and make up your own bridge rectifiers. It will take 4 diodes with the same ratings to make up each bridge rectifier. Do a Google search on bridge rectifiers, and you will find diagrams on how to wire them.
Ebay is an excellent place to find bargains on bridge rectifiers and diodes, but there are many electronic catalogs on the Internet as well.
You can leave out the knife switch and charge both battery systems at the same time, but your charging into each system will be reduced, because you are giving it nearly twice as much to do.
You can also leave out the knife switch and just switch off and on each dc output source.
Feel free to Email me at jjones(at)inter-linc.net if you have further questions.
Hope this helps some.
John II