shadowmage45 / SSTULabs

Dev repository for testing/unfinished KSP parts/plugins/etc.
Other
62 stars 41 forks source link

CRP Resource Density #331

Closed blowfishpro closed 8 years ago

blowfishpro commented 8 years ago

It looks like the CRP definitions for all of the real life fuels (LqdHydrogen, Aerozine50, etc), use their real-life densities in tonnes/liter, rather than tonnes/(ksp unit of volume, about 5L). This makes using these fuels require a lot more volume than normal, especially noticeable when using hydrogen.

blowfishpro commented 8 years ago

Actually, looks like you've already found a way to account for this in https://github.com/shadowmage45/SSTULabs/blob/master/GameData/SSTU/Data/ResourceVolumes.cfg

Just need to add an override for hydrogen

shadowmage45 commented 8 years ago

CRP already defines the volume for hydrogen at 1 liter, so no change is needed as far as I know / should be working as intended. For resources without an override specified in the config file, the PartResource.volume value is used; for some reason Aerozine and NTO didn't have a volume specified in CRP last I checked.

RESOURCE_DEFINITION
{
    name = LqdHydrogen // General propellant, used for high thrust electric engines
    density = 0.00007085000
    unitCost = 0.0367500
    hsp = 9690 // specific heat capacity (kJ/tonne-K as units) at Crygenic Storage temperature
    vsp = 448500 // heat of vapourization (KJ/tonne as units)  or 8.97 * 10^5 or 8.97E5?
    flowMode = STACK_PRIORITY_SEARCH
    transfer = PUMP
    isTweakable = true
    isVisible = true
    volume = 1
}

However, Near-Future doubles the density/amount of LH in a part, so in comparison the SSTU tanks seem like they hold very little.

blowfishpro commented 8 years ago

There's definitely something odd going on. I was briefly comparing to cryo tanks, but the volume difference is much more than a factor of 2. Will investigate more tonight.

shadowmage45 commented 8 years ago

I'll do some number crunching tonight as well. It certainly seems that the LH2 tanks hold a pitifully small amount of fuel (or so says the NERVA powered craft I was trying to design last night... 1.875m diam MFT @ body length 2 only held ~2 tons of fuel, and only gave my ~2.5t probe around 900dV... was quite disappointed).

Please let me know what you find out; if there is a problem with the LH2 stats I would love to get them sorted out and fixed.

shadowmage45 commented 8 years ago

Things appear to be working properly from some basic testing. Going to do a few more comparisons to see if I can spot any discrepancies.

Note the stock orange tank for size comparison; all are 2.5m diam and of very nearly the exact same length. The LFO tanks on the left hold very close to the same actual amount of fuel (2880 ox stock vs 2811 ox sstu), so the volume is working properly for LFO at least. screenshot11

NF/CryoTanks tank (note they stuff 64,000 liters of LH2 in a 32,000 tank; I've already talked to them and it was an intentional gameplay-focused decision) screenshot10

SSTU tank, with ~32kl volume, and ~32kl of LH2 (minus volume losses for dome/insulation/structural) screenshot9

So far the only discrepancy that I'm seeing is that between the known doubling up on LH2 in cryo-tanks. Going to compare a few other tank examples and see if anything notable pops up, but I would imagine the scaling code is working properly in all cases as the 2.5m tank is itself down-scaled from the 5m model and stats, so unlikely that anything will be too far off in other rescales.

Now I have the feeling that this is going to boil down to 'should I add a 0.5l volume override for LiquidHydrogen?'. (this would essentially mimic the CryoTanks setup)

I'm a bit torn on that, as I think that physics are well.. physics; double density-LH2 is a bit cheaty in my mind, and breaking fundamental laws of the universe (the real one anyway).
On the other hand, from a gameplay/enhancement/balance/fun perspective, I can absolutely see the point in it. Even at double density you still get the point that LH2/Hydrolox is a very light fuel (comparatively, to LFO), but you keep the size of the rockets needed to use the fuels at 'reasonable' sizes (unity physics really doesn't like 200m long ships).

The good and the bad as I see it regarding doubling up on LH2: Bad:

Good:

So, with KSP being a game and all, and with RO being around for much greater realism, I may just make the move to double-density LH2. I'll give it some thought, probably try it out on a few rocket designs and see how it feels. Perhaps get some opinions from others on the forum (though I'm sure most non-RO users would be all for it).

In my current career game I've hardly used the LH2/Hydrolox based engines mostly because of the size of rocket needed for them was prohibitive and made it difficult to incorporate with the LFO/Hypergolic stages... which generally points to a gameplay/balance problem that needs to be looked at (even if its not 100% realistic) .

blowfishpro commented 8 years ago

New theory: I'm a moron and my install of CRP is out of date. That's what happens when your installs are a hodgepodge of git symlinks and manually installed stuff. Sorry for the confusion and effort on your part.

shadowmage45 commented 8 years ago

LoL, no you're fine... or at least the outcome is. This caused me to re-evaluate some of the current setup, possibly with some good-for-gameplay changes to come because of it.

Opening #333 as a tracker/reminder of the issue of deliberation on changing of LH2 volume.