I can see converting gallons to grams knowing the density, and I can see converting gallons to kilowatt·hours knowing the energy density. But either way that leaves a few extra dimensions just sitting around.
Can you provide more information as to exactly what you are doing?
As far as the desity, I am dealing with low-sulfer marine diesel fuel from Southern California. As far as the energy density, I am a bit lost. I am given the maximun g/KWh from the engine specification sheet and need to convert that into GPH. The reason is for calculating actual true engine load. The way I do it now is taking (non-metric data) the total fuel used in gallons and dividing by the total engine hours. This result is then divided by the maximum GPH, which is given in the engine specifications, also.
Now I am dealing with metric g/KWh and most of the end users don't grasp the metric version and need it converted into what they understand. This is what I have come up with so far:
Let's presume I have an engine that produces 725kW. I also know the max g/KWh is 210. Both are given from the engine specification sheet from the engine designer. I know the HP is 972 (725*1.34102). I then convert g/KWh to gal/HPh, which is 0.049 (210*0.000233). I then find GPH as 47.57168(972*0.049). I am not sure if this is correct.