Moved all parameters into their own module because they are growing unwieldy.  Added equations for preliminary allocation of energy.  This bit of code has not been thoroughly tested.