petroleum has many different compounds all with different chain lengths so if it is heated the smaller chain length molecules rise and the heavier stay at the bottom due to density differences
Is petroleum crude oil?
Your proposed answer is not adequate. The proposed answer by DAS won't get it although petroleum does contain many different hydrocarbons. As their chain length increases, the boiling point also increases; therefore, each of the components boil at a different temperature. In fractional distillation, the mixture is heated at a low temperature until all of the lowest boiling material is carried out of the pot, up the distilling flask to the side arm, and into the condenser where it is returned to the liquid state and drips into a container. Then the temperature of the pot is increased until the next fraction is reached, a separate container is placed at the end of the condenser to catch that fraction, and the process continues until all of the components have been separated. There are a number of variations on the apparatus but density of the materials don't enter into it. The boiling points are the key ingredient. Not every single component can be separated if their boiling points are too close together.Here is a good discussion as well as a picture of the apparatus.
Ohhh, before I didn't know that petroleum is crude oil, I have a diagram in my textbook, thanks!