Jump to content

[0.25] Dibnah Engineering - Water Splitting (and more to come)


Deadpan110

Recommended Posts

So now I have to go back over this thread and figure out where the 4450 number is coming from and why my 4562.72 number is probably wrong.

I used numbers from the CommunityResourcePack. Note that the "density" parameters is actually mass per unit of resource in tons, not mass per unit of volume, because KSP doesn't care about resource volumes. I think Universal Storage defines Hydrogen the same way.

Link to comment
Share on other sites

I used numbers from the CommunityResourcePack. Note that the "density" parameters is actually mass per unit of resource in tons, not mass per unit of volume, because KSP doesn't care about resource volumes. I think Universal Storage defines Hydrogen the same way.

Excellent -- but mysteriously, my running copy of KSP seems to be using a different value for tons/unit of hydrogen than what the CRP specifies. I verified that my CRP folder contains a CommonResources.cfg that matches what you linked, so that's not the problem... and the container definition for the compressing hydrogen tank doesn't specify any mass, just a number of units (presumably gets the mass from looking up the resource name in the CRP)... so why is my KSP reporting a mass of 10kg for 114,068 units when it should be 10.2547132kg? Oh... I'm an idiot... of course it's rounding off to the nearest kg.

Ok so Ramarren and Newnard are in complete agreement at this point, I think, that the conversion rate should be 4450:1 for hydrogen:liquidHydrogen. Plus or minus some tiny fraction that I can't be bothered with.

Link to comment
Share on other sites

Ok so Ramarren and Newnard are in complete agreement at this point, I think, that the conversion rate should be 4450:1 for hydrogen:liquidHydrogen. Plus or minus some tiny fraction that I can't be bothered with.

Changes are in GitHub:

DE_H2O_Electroliser.cfg

  • Device has 3 tanks so now has 3 converters to match.
  • electricCharge on the converters set to Universal Storage levels. (players can switch them on and off as needed)
  • conversionRate actually set to 8 this time (may change after play testing).

DE_TAC_Hydrogen_Container.cfg

  • Hydrogen to LiquidHydrogen conversion ratio changed according to the density values in the Community Resource Pack

Not yet play tested as its "stupid o'clock" and daylight outside :blush: but will possibly push it into a release regardless of being in a final state or not :D

The main thing I will next tinker with (play testing before i break out the calculator) is the use of 3 converters (one for each tank on the device) - an idea would be that the conversion rate for 1 converter section could possibly tie in with the size of one of the NF reactors (I assume if anyone uses this mod, it will be because they have NF or FTT installed - solars are going to be a waste of time).

I had better get some sleep first!

Link to comment
Share on other sites

Ok, I really don't understand how to use this. Or is really this useless?

I got a generator generating 3000EC/s. The splitter says EC depleted. In 41 earth days I managed to split only 80 liters of water, and produce 83 units of liquid hydrogen. Doesn't seem right to me...

Link to comment
Share on other sites

Ok, I really don't understand how to use this. Or is really this useless?

I got a generator generating 3000EC/s. The splitter says EC depleted. In 41 earth days I managed to split only 80 liters of water, and produce 83 units of liquid hydrogen. Doesn't seem right to me...

Not sure what version you have tried, but here is the state of play:

First version had a value based on Paul Kingtiger's (from Universal Storage) conversion rates as mentioned in a forum thread of 561 but it was reversed to make LiquidHydrogen easy to obtain.

The balance is just way wrong. 42,000 units of LiquidHydrogen from .04 units of water in less than an hour. Can this be fixed to better balance it?

Second version, the numbers were reversed so that they were actually based on what Paul Kingtiger originally proposed.

Game balance is now way off in the other direction.

It now seems that for realism, that both were totally producing too much LiquidHydrogen.

I calculated the mass ratios with CRP numbers and that is what I got. Where did the 851 number came from, because I am seeing about 4449?

This is currently being worked on and it means that if you are using the current latest release - you are still getting too much LiquidHydrogen.

BUT WAIT - BEFORE YOU GO!!

The initial idea behind this mod was to simply 'fill up and go' but as the numbers did not conserve mass or act in any kind of realistic manner - the more realistic values have been found.

This does not suit my own game play either - the next release will implement the realistic values (for hardcore players)... but will also contain a drop in ModuleManager file for those of us that really do just want to land - fill up in a day or so - and then take off.

This is my first mod ever and I wanted to give something to the community, perhaps it really should have gone into WIP first (it didn't because it was only 2 parts borrowed from other mods).

Anyways...

Hopefully I can cater for everyone in the upcoming release (currently testing).

Link to comment
Share on other sites

I think it's ready:

PXnMfd4.png

Conversion in this pic is using the 'Easy Mode' module manager config.

Notes:

  • Hydrogen to liquidHydrogen conversion based on CRP density values
  • Override with 'Easy Mode' ModuleManager config (just drop anywhere into your GameData folder)
  • New 2.5m Electrolysis unit
  • 3 converters to toggle on/off on each Electrolysis unit
  • Converter power requirements are based on Near Future Nuclear Reactor sizes (one reactor per converter)

Link to comment
Share on other sites

One problem as far as mass producing liquid hydrogen, especially with realistic settings: according to my tests and reading of the USI_Converter code, the catchup code fires once on the first physic step after the craft is loaded per converter. This means that when the converter is updated it splits water until oxygen storage fills, since the valve doesn't get a processing step to catch up even if it did have catchup code, which it doesn't, it generates this much Hydrogen, or at least as much as fits in immediate storage and vents the rest, and that is all. Then the compressor fires in one go and produces only as much Liquid Hydrogen as there was Hydrogen present at that point. Or the other way depending on how the parts get ordered.

Either way, to produce 16 tons of Liquid Hydrogen "off screen" in one go you need 16 tons of Hydrogen storage and 128 tons of Oxygen storage, which is not practical. And you can't do it on screen even if you didn't want to do anything else during that time, because as time step goes the EC ticks get too large for any sane battery setups.

My suggestion is to declare that the large part is dedicated for Liquid Hydrogen production and make it generate (mass appropriate) Liquid Hydrogen directly, and automatically vent Oxygen and stop when LH is full. Who would need that much Oxygen anyway? Maybe also add a decompression mode for the Hydrogen container, to make the conversion two way?

Link to comment
Share on other sites

So will this work without realfuels as standard or would I need to alter the config?

i`d like to have the liquid hydrogen be stock Lf and the liquid oxygen be stock Ox

Apologies if this has already been answered.

Also am I right in assuming this will work when the craft is not in focus?

I`d like to think it would (unrealistically) fill up an orange tank in about a week.

I know in RL that would take maybe half a year...

Link to comment
Share on other sites

Ramarren - not sure what issue you're describing RE the catchup code - But I've had zero issue with multi-step converters. Just make sure you have enough capacity to cover the minimum delta time (one day).

Oh right, I did miss that in the code. So that is not actually the problem, my problem was just from the Oxygen storage filling up; the valve from Smart Parts doesn't have catchup code.

Link to comment
Share on other sites

My suggestion is to declare that the large part is dedicated for Liquid Hydrogen production and make it generate (mass appropriate) Liquid Hydrogen directly, and automatically vent Oxygen and stop when LH is full. Who would need that much Oxygen anyway? Maybe also add a decompression mode for the Hydrogen container, to make the conversion two way?

I wanted to remain compatible with Universal Storage as I use their parts within my own game (even if Hydrogen seems like an underused resource - there is nothing stopping other mods from using it). The 2 step process for Water -> Hydrogen -> liquidHydrogen is an attempt to maintain that interoperability between the resources.

Two way compression/decompression was deliberately missed out as I didnt see the need in converting liquidHydrogen back into Hydrogen but even more so now there is an easy mode config (you get more liquidHydrogen from less Hydrogen for the same efforts and power requirements, reversing that process then enables people to use those fuel cells for free power - which i initially missed early on).

I suppose if there is a need for people to convert liquidHydrogen back into Hydrogen, I could add it to the main config and the easy config.

my problem was just from the Oxygen storage filling up; the valve from Smart Parts doesn't have catchup code.

Using the 2.5m Electrolysis unit with 3 NF MX-1 fission reactors it takes around 248 Earth days to fill up the oxygen storage at which point it would require manual venting or disposing of in some other manner (the reactors Uranium supply is also at 58% at that point and so is another cause and reason for manual intervention).

What I would have liked is to build the dump valve into the Oxygen tank so that it works using USI_Tools/Regolith unfocused/on-rails with a nice animation effect (maybe one day - I really would have liked to bundle a part or mod it some way) but until then, venting once every 248ish Earth days will have to be a mission added to your roster.

So will this work without realfuels as standard or would I need to alter the config?

i`d like to have the liquid hydrogen be stock Lf and the liquid oxygen be stock Ox

Apologies if this has already been answered.

Also am I right in assuming this will work when the craft is not in focus?

I`d like to think it would (unrealistically) fill up an orange tank in about a week.

I know in RL that would take maybe half a year...

There is currently no support for realfuels - so it is unneeded (support may be added later by means of drop in config files at a later point). If you would like these parts output Lf and Ox, feel free to make ModuleManager configs to suit (try not to edit the config files directly as updates will clobber your hard work).

Yes, unfocused processing is calculated and added when you return, but note the following posted above:

Just make sure you have enough capacity to cover the minimum delta time (one day).

As for unrealistically filling up tanks, its your game - go crazy :P

Link to comment
Share on other sites

Using the 2.5m Electrolysis unit with 3 NF MX-1 fission reactors it takes around 248 Earth days to fill up the oxygen storage at which point it would require manual venting or disposing of in some other manner (the reactors Uranium supply is also at 58% at that point and so is another cause and reason for manual intervention).

I am confused. Using numbers straight from the config file, and I am reasonable sure that the rates are per second, which seems to agree with the resource panel display, I get 100931048 units of Oxygen produced in 248*24*3600 seconds for three 2.5 converters, which adds up to more than 142 tons of oxygen. I'm pretty sure that is not the usual amount of storage for oxygen a vessel is expected to have. I know that in my test case I have filled a single large TACLS oxygen container in much less than ten earth days. Am I missing something here?

[TABLE]

[TR]

[TD=align: right]

[/TD]

[/TR]

[/TABLE]

More fundamentally, what is the reasoning for limiting the 2.5 converter on oxygen, not hydrogen? For the the Elektron wedge and perhaps the small converter it makes perfect sense, since they are meant to potentially work as part of the life support cycle, and you don't want to be losing breathable oxygen in space, but when processing hundreds kilograms of water per day the only purpose I can think of is producing propulsion hydrogen, in which case you don't want to lose hydrogen, and do want to vent oxygen. Is there some purpose for multiple tons of oxygen I am not aware of?

Link to comment
Share on other sites

As for unrealistically filling up tanks, its your game - go crazy :P

Let's try this again, since this has as much to do with 'unrealistically filling up tanks' as ham does with hamsters.

Whatever the amount you use for conversion. Whether it's a microgram or a kiloton. You have to have enough working space and production slack to cover a single day of production... even if that production is one gram.

If someone is having a problem with converters, odds are something in the chain has insufficient storage for a day of stuff, so it breaks bits further down, and sadness happens.

Link to comment
Share on other sites

I am confused. Using numbers straight from the config file, and I am reasonable sure that the rates are per second, which seems to agree with the resource panel display, I get 100931048 units of Oxygen produced in 248*24*3600 seconds for three 2.5 converters, which adds up to more than 142 tons of oxygen. I'm pretty sure that is not the usual amount of storage for oxygen a vessel is expected to have. I know that in my test case I have filled a single large TACLS oxygen container in much less than ten earth days. Am I missing something here?

I am now very confused, I have a dev game set up with only the mods I needed to get my test set up running.

I use KSP-AVC to ensure USI_Tools and the Community Resource Pack is up to date.

Using 1x 1.25m TACLS Water container (full) and 1x 1.25m TACLS Oxygen container (empty) using the exact setup in the above pic, the launchpad test took 248 days.

Using KerbalEngineer, a full Oxygen container holds 75Kg and a full Water container holds 240Kg so I am at a loss at how i would have managed 142 tons of Oxygen - which is why disposing of 75Kg of Oxygen seems like a small price to pay after 248 days to produce only 24 units of liquidHydrogen (default mode).

The setup in the above pic has launch clamps so I could drop the craft onto the launchpad and start the timer (also ensures the craft is seen as launched).

I will test again later in orbit with Hyperedit as I am unsure how the conversion is happening too slow for me.

Link to comment
Share on other sites

Let's try this again, since this has as much to do with 'unrealistically filling up tanks' as ham does with hamsters.

Nice analogy - but my quote of yourself may have been seen out of context.

Yes, unfocused processing is calculated and added when you return, but note the following posted above:

Copy RoverDude Quote here in relation to the above:

Originally Posted by
RoverDude

Just make sure you have enough capacity to cover the minimum delta time (one day).

Finish by encouraging John FX to play around and do what ever he wants:

As for unrealistically filling up tanks, its your game - go crazy :P

Sorry about that :)

Link to comment
Share on other sites

Not sure what version you have tried, but here is the state of play:

First version had a value based on Paul Kingtiger's (from Universal Storage) conversion rates as mentioned in a forum thread of 561 but it was reversed to make LiquidHydrogen easy to obtain.

Second version, the numbers were reversed so that they were actually based on what Paul Kingtiger originally proposed.

Perhaps I'm just doing something wrong then? I don't know about realism, but wondering how on earth they fill those big storage tanks with LH? I get that a whole factory is working on it, but still the electricity usage seems rather ridiculous for the amount of splitting which happens.

EDIT: I'm aware that probably most is made from natural gas rather than water

Edited by Aedile
Link to comment
Share on other sites

Perhaps I'm just doing something wrong then? I don't know about realism, but wondering how on earth they fill those big storage tanks with LH? I get that a whole factory is working on it, but still the electricity usage seems rather ridiculous for the amount of splitting which happens.

EDIT: I'm aware that probably most is made from natural gas rather than water

I am stuck between a rock and a hard place with the whole Hydrogen production shebang and it is unfortunate that peoples game play differs greatly - but that is what KSP is all about.

These parts were initially for my own use but I figured I should share them with the great KSP community.

When I first put them online, the numbers were greatly wrong and I figured it was only fair to get these numbers a little more balanced based on how things really are (high power requirements to produce a small amount of Hydrogen over long periods of time).

For game play - these more realistic numbers are possibly not for everyone - as I for one certainly did not want to wait years on a planet trying to fill up my liquidHydrogen tank.

If you have the latest version and do not mind the power requirements, you can drop the Dibnah-Engineering-WaterSplitting-EASY.cfg into your GameData folder (included in the zip) - it does not make energy usage any easier but does convert Hydrogen into liquidHydrogen at unrealistic but more playable rates.

If the power consumption is too high, feel free to make a ModuleManager config to adjust the values (you can edit the config files directly but an update could clobber your hard work).

Feel free to tailor the configs to your needs and perhaps post here what numbers you like to use in your game as it may help others (I could also add more ModuleManager files based on this info to suit peoples game style).

I hope that helps :wink:

Link to comment
Share on other sites

Deadpan, I'm not criticizing, I'm trying to figure out if the mod actually works as intended. I just find it pretty amazing that with the energy produced by nuclear reactor, can't seem to split more than 2l of water a day.

I guess it just depends on what we think 1 EC is. What does this mod assume? 1W?

I guess probably the problem is that nuke reactors in ksp are ridiculously underpowered, 3KW nuclear reactors seem a bit feeble.

Link to comment
Share on other sites

Nice analogy - but my quote of yourself may have been seen out of context.

Sorry about that :)

Oops, didn`t mean to start a `thing`. I was just referring to the info that AFAIK IRL it`s going to take about 5 years to make 100 tons of fuel if they do a similar thing on Mars and that would not make good gameplay so I wanted to be able to do more like 20T in a week (about 50 times faster)

EDIT :

Deadpan, I'm not criticizing, I'm trying to figure out if the mod actually works as intended. I just find it pretty amazing that with the energy produced by nuclear reactor, can't seem to split more than 2l of water a day.

I guess it just depends on what we think 1 EC is. What does this mod assume? 1W?

I guess probably the problem is that nuke reactors in ksp are ridiculously underpowered, 3KW nuclear reactors seem a bit feeble.

Lookig at the NASA ones, the first ones made 28w (Nimbus III) followed by 40 (viking 1, pioneer 10), 70 (Apollo), 158 (voyager), 292 (new horizons)

The ones that look like this

A14_SNAP27_sm1.jpg

are the 70 watt ones. That`s 70 watts per hour or about 6 amps at 12v.

As that in the game is 45EC/minute (2700EC/hr)

3Kw is about ten times as powerful as the best from real life (292W) so I would say 1EC is suggested to be 1/10 of a watt.

How powerful are the reactors this mod is designed for?

To match Real Life you`d need tens of RTGs to split not much water at all really

Edited by John FX
Link to comment
Share on other sites

I'm not talking about RTGs. I'm talking about a fission reactor, which at least in game says it produces 3000kW thermal power. As unrealistic as it might sound cooling a 3MW reactor in space, or be that small, I'm not sure if 3kw fission reactor is even possible.

Edit, moreover, an AAA batery has around 90 Watt seconds, so if it 1EC is 0.1W their batteries seem to be really bad.

Also if you have noticed, the lamps use only 2.4EC/minute, or 0.04 EC/s. So yeah, I'd like to see any 0.004W lamps.

Edited by Aedile
Link to comment
Share on other sites

I'm not talking about RTGs. I'm talking about a fission reactor, which at least in game says it produces 3000kW thermal power. As unrealistic as it might sound cooling a 3MW reactor in space, or be that small, I'm not sure if 3kw fission reactor is even possible.

Edit, moreover, an AAA batery has around 90 Watt seconds, so if it 1EC is 0.1W their batteries seem to be really bad.

Also if you have noticed, the lamps use only 2.4EC/minute, or 0.04 EC/s. So yeah, I'd like to see any 0.004W lamps.

The maths is way out on NearFutures mod.

If a reactor makes 2000EC/s then that is 7,200,000EC per hour which is 7.2MEC (MegaEC, there are 3,600 not 1000 seconds in an hour) so they think that 3.6EC=1W (they claim 2000EC/s=2MW)

This makes their numbers... unreliable. They are possibly out by a factor of 36...

I agree the lamps could do with using more power (as could everything it seems) to be realistic.

One AAA battery holds roughly 1.41 Wh, closer to 5000 Watt seconds...

That`s 500EC for a second or 45EC/min for just over 11min (this means batteries are really really really poor, 1AAA battery is a 500EC battery so you need 5 of the smallest stock batteries to make 1AAA battery)

(Energizer's AAA battery has a capacity of 1250 milliamp hours, or 1.87 [email protected])

Where are you getting your numbers for a AAA battery lasting 90 seconds at 1 amp? It seems out by a factor of 50.

EDIT :

I'm not talking about RTGs. I'm talking about a fission reactor, which at least in game says it produces 3000kW thermal power. As unrealistic as it might sound cooling a 3MW reactor in space, or be that small, I'm not sure if 3kw fission reactor is even possible.
Deadpan, I'm not criticizing, I'm trying to figure out if the mod actually works as intended. I just find it pretty amazing that with the energy produced by nuclear reactor, can't seem to split more than 2l of water a day.

I guess it just depends on what we think 1 EC is. What does this mod assume? 1W?

I guess probably the problem is that nuke reactors in ksp are ridiculously underpowered, 3KW nuclear reactors seem a bit feeble.

Also, I was responding to this. It seems 1EC in game=1/10W in real life at *best*. It goes as low as 1EC=0.025W if the stock RTG is supposed to be analogous to the RL one of the same shape...

If that is the case then a device producing 3000EC/hr is actually producing around 77W. If it is 3000EC/minute then that increases to 4.6KW and 3000EC/second is 280KW

To convert 1 litre of H2O to H2 and O2 by electrolysis will require 3.658KWH

which suggests that the 3000EC/s generator at 100% efficiency would convert 76l of water per hour.

which supports your thought that it should produce more than 2l (by a factor of 38, almost exactly the error in NearFutures maths)

Now we just need to figure out whether fuel units are in litres...

/Apologies for the wall of text...

Edited by John FX
Link to comment
Share on other sites

The maths is way out on NearFutures mod.

If a reactor makes 2000EC/s then that is 7,200,000EC per hour which is 7.2MEC (MegaEC, there are 3,600 not 1000 seconds in an hour) so they think that 3.6EC=1W (they claim 2000EC/s=2MW)

This makes their numbers... unreliable. They are possibly out by a factor of 36...

I agree the lamps could do with using more power (as could everything it seems) to be realistic.

One AAA battery holds roughly 1.41 Wh, closer to 5000 Watt seconds...

That`s 500EC for a second or 45EC/min for just over 11min (this means batteries are really really really poor)

(Energizer's AAA battery has a capacity of 1250 milliamp hours, or 1.87 [email protected])

Where are you getting your numbers for a AAA battery lasting 90 seconds at 1 amp?

Right, so even worse according to your math.

And BTW I also made another error. I asked if 1EC is 1 Watt, when I should have been asking, if 1EC is 1J.

Power has no time element. W = V*A.

A 2MW reactor provides 2MW of power. Time has no bearing on this. The work of said reactor would be both 2MW*s or 2MJ, or 2MW*h. Note this is not MW/s but it's power multiplied by time.

So if 1EC=1kJ, 1EC/s will be 1kJ/s, or that is 1kW. And yes 2000EC/s will be 2MJ/s or 2MW.

However I don't believe 1 EC = 1KJ. I think it's more close to 100J than 1000J. Thing is depends on which part you look (talking about stock) they seem to be rather arbitrary. For example a lamp uses 0.04EC/s. So if we go with 1J=1EC that would make said lamp 0.04W. Yes the RTGs in KSP are ridiculous. They provide same power as the nontracking panels. In reality, a cheap trailer solar panel will easily provide 60-100Watts. So if 1EC/s = 1W = 1J/s, a typical solar panel should provide 60-100EC/s. Like you said a battery would have 1.41Wh, or 5076J, so if 1EC = 1J, batteries should be 5000EC or more...

And yes water splitting is not particularly efficient in real life. A water splitter they are building in Germany, requires around 40MW of power (yes it's big installation), and should be able to produce roughly 2 tons of hydrogen a day, by splitting around 36 tons of water...

Link to comment
Share on other sites

The way KSP handles resources is badly suited to model electricity. The only way to get anything like the actually defined efficiency from the splitters requires two things:

1) electric generator based on USI_Converter, like nuclear reactors from http://forum.kerbalspaceprogram.com/threads/91706-0-25-Freight-Transport-Technologies-v0-2-4-2014-11-01

2) not have the craft loaded at any time when the time acceleration is above x100 or so

Any stock EC source or Near Future reactors won't work, because they don't have catchup code to generate surplus electricity to be consumed by the water splitter USI_Converter after the craft is loaded. So it will just convert as much as it can from batteries and then stop.

Having the craft loaded at high time acceleration will have a typical KSP EC problem: the generator will produce as much EC as it produces multiplied by the time step, which will overflow the batteries and be lost, and then the converter will try to consume EC multiplied by the time step, which will not be available in batteries (unless you have billions/trillions of ECs of storage). So it will actually work at the fraction of capacity equal to (battery storage)/(consumption rate*time step). There is some magic in USI_Converter to work around that, but it is either broken or I misunderstand it, it doesn't work in any case. If you actually sat there for a day at 1x time speed it would actually split much more than 2l of water (about 50l at 2000 EC/s for six hour Kerbin day).

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...