There are three way in which your body gets it's energy to funtion, the first is from the calories you take in from food, once these have run out the body takes it from your Glycogen store in your liver. This is one part glycogen to 4 parts water. When the glycogen store has run out, the water that was with it runs out too, this is how you loose so much in the first few days of a VLCD diet, alot of it is water. When the glycogen has gone your body produces ketones to release the energy stored in your body fat. These ketones show up in your wee!!
Glycogen stores are produced by the intake of carbohydrate, so glycogen disappears when you don't have enough carbohydrates.
hope this helps, and please correct me if any of this is wrong but this is the way I have understood it.
good luck to you all xx