NOTE - The following calculations are based on a number of unproven assumptions concerning the operating principles of the Genesis device. In formulating these figures I tried to make the simplest possible interpretation of what we actually see the the Genesis device do during 'Star Trek II : The Wrath of Khan'. I tried to be as fair-minded as I possibly could, and I tried to make all assumptions err on the low side while still sticking to the basic idea. Even so, these calculations should be approached somewhat cautiously - especially as the conclusion is somewhat overwhelming!
While the Enterprise is on its way to Regula, Kirk, Spock and McCoy view a taped briefing by Dr. Carol Marcus, creator of the Genesis device. Dr. Marcus explains briefly the operation of the device - Genesis effect reorganizes matter on a subatomic level in order to convert dead matter such as lifeless planets into more useful forms. When the Genesis device is activated within the Mutara Nebula, Dr. David Marcus refers to the energy pattern as the 'Genesis wave'.
When the device detonates in the Mutara Nebula, we see the following sequence of events.
- The Enterprise goes to warp speed.
- The device detonates. A very rapid 'shock wave' races out from the centre, rapidly overtaking the Enterprise.
- Over the next few seconds all colour fades from the area immediately adjacent to the detonation.
- As the Enterprise races outward, a series of 'shells' of material begin to form, each larger than the last. Within this shell structure there is no nebula material visible, while beyond it the nebula remains intact. As the Enterprise exits the scene we see the first five shells form behind it.
- The Genesis planet and its star form. Views of the formation of the planet reveal material falling in towards it. A gaseous cloud surrounds the planet, exhibiting the same shell structure as before - albeit in a much compressed form. Both cloud and planet are glowing red hot at this point. The time between event three and four is small enough that the McCoy has only just informed Kirk that Spock has suffered fatal injuries.
The Genesis Device, on a build-up to detonation.  This image shows the initial energy wavefront spreading rapidly out through the nebula.  Here we see the Enterprise heading out at warp speed as the shells form. You can see that the nebula material has vanished near to the centre, but is still visible on the right as the fifth shell begins to form.  The Genesis planet, a few minutes after the initial detonation. The shell structure is still visible, although now compressed as it collapses inward. 
These observations lead me to conclude the following :
- The Genesis device does not actually create matter, but 'only' modifies pre-existing matter - originally intended to rebuild a planet, in actual fact the device used the material of a nebula to make a whole new solar system.
- The mass to build the planet, and by extension the sun, collapsed into place over some ten minutes.
- The material of the nebula appears to have collapsed into the shells of matter we see almost instantly. I assume that any given shell contains all the material which had formerly occupied the volume between it and the next shell out.
- The nebula was made of Hydrogen, at a density of 100 million atoms per cubic metre - some one hundred times the density of interstellar space.
I am going to attempt to calculate the energy required to make the mass of a sun and planet collapse into a single point over the time frame we see.
The Enterprise most likely would go to its highest possible speed to escape the detonation, but in order to err on the low side I will assume that she did only warp one while heading out. The time between the detonation and the formation of the first five shells was 5 seconds; hence the fifth shell had a radius approximately equal to five light seconds.
Looking at scanned images of the first five shells reveals that the ratio of their radii is as follows :
|Shell 1 ||=||6|
|Shell 2 ||=||20|
|Shell 3 ||=||40|
|Shell 4 ||=||82|
|Shell 5 ||=||160|
follows an exponential increase. Given that shell five has a radius of 5 light seconds, we can calculate each shells radius :
|Shell 1 ||=||0.32 light seconds|
|Shell 2 ||=||0.63 light seconds|
|Shell 3 ||=||1.25 light seconds|
|Shell 4 ||=||2.50 light seconds|
|Shell 5 ||=||5.00 light seconds and so on, the radius doubling each time.|
Following assumption 4, the nebula would have an average density of 1.7 x 10-19
. In order to collect enough matter for a star and planet, the Genesis device would need to clear a volume of some 1049
cubic metres, a radius of equal to 1.5 light years. This is sufficient to hold 28 shells in all. By calculating the volume which must be compressed into each shell, we can work out the mass of each shell. In order for the shells to collapse to the centre within the ten minute time frame, they must move at differing velocities. The following table shows the mass and velocity of each shell :
|Speed of collapse|
|Mass of Shell|
|1||0.32||0.0005||6 x 105|
|2||0.63||0.0010||4.8 x 106|
|3||1.25||0.0021||3.85 x 107|
|4||2.50||0.0042||2.93 x 108|
|5||5.00||0.0083||2.4 x 109|
|6||10.00||0.0016||1.92 x 1010|
|7||20.00||0.033||1.54 x 1011|
|8||40.00||0.066||1.23 x 1012|
|9||80.00||0.133||9.84 x 1012|
|10||160.00||0.266||7.88 x 1013|
|11||320.00||0.533||6.3 x 1014|
|12||640.00||1.06||5.04 x 1015|
|13||1280.00||2.13||4.03 x 1016|
|14||2560.00||4.26||3.23 x 1017|
|15||5 x 103||8.53||2.58 x 1018|
|16||10 x 103||17||2.06 x 1019|
|17||20 x 103||34||1.65 x 1020|
|18||41 x 103||68||1.32 x 1021|
|19||82 x 103||136||1.06 x 1022|
|20||164 x 103||273||8.46 x 1022|
|21||327 x 103||546||6.76 x 1023|
|22||655 x 103||1092||5.41 x 1024|
|23||1.31 x 106||2184||4.33 x 1025|
|24||2.62 x 106||4369||3.46 x 1026|
|25||5.25 x 106||8738||2.77 x 1027|
|26||10.5 x 106||17476||2.22 x 1028|
|27||21 x 106||34952||1.77 x 1029|
|28||42 x 106||69905||1.42 x 1030|
This makes it clear that the majority of the mass of the system - some 87% - was in fact contained within the outermost shell. For the sake of brevity I will confine myself to this shell only for the remainder of the calculations.
Shell 28 would have a collapse speed of some 70,000 times the speed of light. This equates to Warp 9.999648. We don't have an equation to tell us how much power is required to move a specific mass at a specific speed, but the 5 million ton Galaxy class starship requires a total of some 4.77 x 1018
Watts to move at Warp 9.6, or 1,909 x c. The power curve 'approaches infinity' as it reaches warp ten, and we have no clear idea of the figures beyond warp 9.6. But projecting the graph on page 55 of the Technical Manual to make an estimate - again erring on the low side - a figure of some 1025
Watts seems to be a reasonable value to maintain Warp 9.999+ in a Galaxy class ship.
Since shell 28 has a mass of some 2.82 x 1020
times greater than a Galaxy class vessel, it would need 2.84 x 1045
Watts to maintain this high a warp factor. Over ten minutes then, the total energy required can be calculated as :
|E ||=||2.84 x 1045 x 600|
| ||=||1.7 x 1048 Joules|
So the total energy for all shells would (at a guess) approach 2 x 1048
This energy is some 47 times greater than the energy released by the destruction of the Amargosa star. It is also more energy than is released by every sun in our galaxy put together over some 1,700 years.
It should be remembered that this represents the absolute minimum energy required by the Genesis device, simply to pull the shells into the right place. The energy required to assemble the shells in the first place, within mere moments of the detonation, would quite possibly be considerably greater. Once at the centre, the matter had to be reformed into the proper structure - essentially the Genesis device had to replicate an entire sun and planet. Since the Federation, with matter-antimatter reactors at its disposal, is not capable of replicating even an entire starship at once, the energy required to accomplish this feat must be little short of mind boggling. The true energy required for the Genesis device is most likely above 1050 Joules - possibly well above.
This raises the question of where this energy comes from; one would need to convert some 1 x 1031 kg of matter, equal to some five solar masses, totally to energy in order to generate just enough to collapse the outermost shell! Obviously the matter-antimatter reactor is not sufficient for this. Genesis may use some form of Zero Point energy, although this seems a little unlikely given that this technology appears to have been invented during the TNG era. I guess you would have to invoke some form of technobabble process (probably involving subspace) to explain it.