Jump to content

Help with density/volume calculations?


Recommended Posts

Ok, so I'm making some parts that hold fuel, but the resources' "density" values are confusing me. I've tried using the standard D=M/V formula, but the numbers I get from that don't seem right. How would I go about figuring out how many units of a given resource fit in a cubic meter of space?

Link to comment
Share on other sites

Density in KSP isn't really density in the physics sense, because KSP does not deal with volume in any way, shape or form.

The density value in the RESOURCE_DEFINITION node is a mass, given in metric tons. It is the mass of one of this resource. "One what?" Just one. KSP doesn't deal with volume units.

So if a tank has 400 Oxidizer in it, then that is a mass of propellant equal to 400 times the density value from the definition node.

 

Edited by Streetwind
Link to comment
Share on other sites

Streetwind is correct in that the in-game units for resources in KSP are completely arbitrary. This is partly a legacy design from when the game was much simpler, although it's worth noting that resources themselves don't necessarily have a set volume - they can be compressible gases, incompressible liquids or solids, or something that doesn't have a volume at all (electric charge). 

However, there is a volume key in the resource definitions. This is the number of liters per unit, and it's provided so to facilitate modding - resource-switchable tanks, etc. The stock resources are mostly 5 liters/unit, while most mod resources are 1 liter/unit. You can take a look at the stock tanks' heights and radii to calculate their apparent external volume, then compare that to how much LFO (or whatever) they hold, to get a sense of how much of that external volume typically represents usable internal volume. For the 2.5m tanks, it's about 80%.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...