post-kerbin-mining-corporation / SystemHeat

Adds an improved thermal mechanics experience to Kerbal Space Program.
16 stars 17 forks source link

SystemHeatBoiloffPatch sets all tanks' loop volume to 0.5 #100

Open Wyzard256 opened 2 years ago

Wyzard256 commented 2 years ago

The SystemHeatBoiloff patch includes the lines:

volume = #$../mass$
volume *= 0.5

…which looks like it's intended to set the loop volume to half the mass, but the second line lacks a "@" prefix, so it's actually adding a new property, not editing the existing one. ModuleManager apparently ignores the asterisk when creating a new property, because what ends up in the MM config cache is just volume = 0.5, and ModuleSystemHeat seems to use the last volume property when more than one is present. The result is that the in-game "added loop volume" is 0.5 cubic meters for all tanks.

However, if I fix this, I get even smaller volumes: the H250-64 tank ends up with a loop volume of just 0.34 cubic meters (even less than 0.5), since mass is the tank's dry mass of 0.68 tons. (I don't know whether volume is meant to represent the actual tank volume, or just the volume of the cooling lines, so half the mass may or may not be a plausible approximation.)

Gordon-Dry commented 2 years ago

Good find. I guess this patch should look for RealFuels or what else is used and use those volume values then?

Wyzard256 commented 2 years ago

I found that the SystemHeatConverters patch sets volume equal to mass, with the comment: "1 ton equals 1 cubic meter of cooling. It very roughly approximates the balance of squads ISRU." That's for parts that are full of machinery, but half that is similarly "very roughly" proportionate for a fuel tank. So, the ratio doesn't really seem like a bug; it's just the typo of the missing "@" character.