allista / ConfigurableContainers

This is a plugin for KSP mod development.
MIT License
8 stars 7 forks source link

Tank mass calculation #9

Closed RealKolago closed 7 years ago

RealKolago commented 7 years ago

I find the mass penalty for big Xenon tanks a bit to much. Mass is calculated by volume now. (AddMassPerVolume)

1045.26t = 124.4t + (1244.4 m³ * 0.74)

I think it should be calculated by surface area. (MassPerSurfaceArea (in t))

We don't know the shape of the volume, but we can use a sphere for an approximation.

Area = 4 PI (((3 Volume)/(4 PI))^(1/3))^2 559.49m² = 4 PI (((3 1244.4m³)/(4 PI))^(1/3))^2

Mass = Area MassPerSurfaceArea 167.85t = 559.49m³ 0,3

Original mass with LFO configuration is 124.4t, new mass with xenon gas configuration is 167.85t

If you like it easier you can implement a rough estimate:

original mass * (1 + MassPerSurfaceArea) = new mass

124.4t * (1 + 0.3) = 161.72t

Considering real world rockets even this very high! But we have to have game play in mind.

screenshot34 screenshot35

allista commented 7 years ago
  1. According to this, for instance, given the constant pressure, thickness of the walls of a pressure vessel should grow with the volume more or less linearly (depending on the material used) to provide the same stress-tolerance. Which means the mass of such vessel increases with the volume, not with the surface area.

  2. Current value of AddMassPerVolume was calculated from the dry-mass/volume of the stock Xe tanks. Yes, they are that heavy; that's why they're small.

So as much as I would like to have huge high-pressure (stock Xe tanks have ~210atm inside!) gas tanks, the only viable option is to use cryo-liquid form of a gas (if any mod provides it).

I'm not closing it, because, after making my point, I'm still open to discussion.

allista commented 7 years ago

Also, consider a spherical steel-walled tank:

M = 1045.26t V = 1244m3 R ~= 6.67m density-of-steel ~= 7.8t/m3

What is the thickness of the walls?

23cm, 3.5% of the radius. Is it really that thick?

BTW: the same calculation for aluminium and M = 123t gives 8cm.

RealKolago commented 7 years ago

Take a look at Barlow's formula: https://en.wikipedia.org/wiki/Barlow%27s_formula

You can calc this here: http://www.engineersedge.com/calculators/pipe_bust_calc.htm

Or your provided link: http://www.engineersedge.com/calculators/shell_internal_pres_pop.htm

Double the diameter and the wall thickness and the working pressure stays the same. As you can see, wall thickness scales linear to the diameter of the pressure vessels. Volume does not matter at all.

Imagine a gas pipeline, if your volume theory is true you would need really big walls for these!

Here are some examples for real world xenon pressure vessels for space use. These don't weigh much. http://www.psi-pci.com/Data_Sheet_Index_Pressurant-PN.htm

RealKolago commented 7 years ago

But I was wrong with my first assumption too! Its not a function of area, only of diameter.

RealKolago commented 7 years ago

The big question is now how to get the diameter of a tank in KSP!

The volume is the only number given. So we have to assume a fixed ration of length and diameter to calc the mass. Like the length is 2x the diameter every time in a idealized case.

RealKolago commented 7 years ago

In this idealized case: Diameter = (Volume / (PI 4)) ^ (1/3) 2

allista commented 7 years ago

Er... no, you're mistaken.

First, we're not talking pipes here. Barlow's equation assumes that length of the pipe is much greater than its diameter, so the endpoints could be neglected.

Second, even for pipes the mass is proportional to volume:

V(internal) = L*pi*R^2
   suppose wall thickness is w = h*R, where h << 1.
   then we can assume that:
V(walls) = L*2pi*R*w = 2h * L*pi*R^2 = 2h * V(internal)
   so if we double the radius R1 = 2*R, 
   and double the wall thickness w1 = 2*w = 2h*R = h*R1
   we get:
V1(internal) = L*pi*R1^2 = 4 * L*pi*R^2 = 4 * V(internal)
V1(walls) = L*2pi*R1*w1 = 8h * L*pi*R^2 = 8h * V(internal) = 4 * V(walls)

   Even more. Suppose you live radius and wall thickness alone, 
   but double the length: L1 = 2*L
V2(internal) = 2L*pi*R^2 = 2 * V(internal)
V2(walls) = 2*L*2pi*R*w = 4h * L*pi*R^2 = 4h * V(internal) = 2 * V(walls)

So if the thickness of the walls is proportional to the radius, the volume of the walls (and thus the mass of the pipe) is proportional to the volume of the pipe itself. And if you just increase the length of the pipe without changing its radius, its mass will still be proportional to its volume. So very long pipeline will not have very thick walls; but it will have very big mass.

The same goes for a closed volume, except that instead of constant L you'll have R and coefficients will become cubic. But the general equation: V1(walls)[R1] = k * V(walls)[R] will be correct anyway.

RealKolago commented 7 years ago

For pipes the mass is proportional to lenght! 1m = 250 kg, 2m = 500kg Don't count the filling. No volume involved.

allista commented 7 years ago

So is the volume; unless you change the diameter of the pipe. Read through equations once again, please.

RealKolago commented 7 years ago

Yes, but only the volume of the wall is linear to the mass of pipe. The enclosed volume of the pipe is not part of the calculation of mass. You are using the volume of the tank in KSP to calc the mass. Not the wall volume mass! Tank diameter can be different from tank to tank!

Take a given KSP Xenon tank from Squad. Calc the mass per 1m² of surface (wall) from the known diameter, volume and dry mass. Calc the new mass of 1m² of surface (wall) linear from the given Squad tank diameter to the "idealized case" new tank diameter. Calc the new (wall) mass of the new tank linear to the surface (wall) mass per 1m² of the "idealized case" tank. Do to the "idealized case" the calc of mass is a bit of, but far better than before for a pressure (xenon) tank.

allista commented 7 years ago

Volume of the walls is proportional to the volume of a pipe, or a tank, for that matter.

And I'm closing this, as you're failing to read what little math I wrote, but continue to argue. With words instead of equations.

RealKolago commented 7 years ago

The math is not so easy for pressure vessels... I am still reading this very good article: https://en.wikipedia.org/wiki/Pressure_vessel