mekanism / Mekanism

A mod for Minecraft
MIT License
1.39k stars 528 forks source link

The "Great Greylocke GasTech" Feature Request #1037

Closed aidancbrady closed 9 years ago

aidancbrady commented 10 years ago

Putting this here for my own reference. All credit goes to Greylocke.

Mek Gas Tech, part 1 - Hydrogen batteries

In reality, Hydrogen is an energy carrier -- a means of transporting the energy that was spent in separating it from a water molecule. I suggest a subtle shift in how Mekanism treats H2; not as a fuel, but as the "chemical battery" that it truly is.

This would be accomplished by doing the following:

  1. Reduce the per-unit energy output of the Hydrogen Generator to be equal to the amount of energy required to produce hydrogen in the Electrolytic Separator. By burning H2, you’re getting back (almost) what you put into it.
  2. Allow hydrogen to be stored in dynamic tanks (liquid H2 from the Rotary Condensentrator?).
  3. Create a portable tank for compressed gas, something like a plastic Gas Canister for powering small devices and a metal Gas Cylinder for multi-bucket gas transportation.

Reducing the energy output will make hydrogen a less desirable mid-tier energy system, but should actually increase its overall utility as a kind of very flexible, portable, easily expandable energy storage system. Hydrogen will become a giant battery to be used during consumption spikes or for powering remote or temporary installations. In a Buildcraft- or IC2-based modpack, lava often fills this same role, but lava is so... prehistoric. We've climbed further up the tech tree, haven't we?

Mekanism Gas Tech, part 2 Heat & Pressure

So what to do when Heat Generators and Windmills no longer keep the machines running? Biofuel! Crush plant matter into lovely gobs of material that can be burned as fuel in a Bio Generator. This will keep things running for a while, but soon even Biofuel cannot keep up. At this point in the Mekanism tech tree, we've likely got tanks of hydrogen and lots of excess Biofuel... I suggest Mekanism add the potential to boost Bio Generator output to extend their useful life. Introducing… the Pressurized Reaction Chamber (PRC).

Pump hydrogen, Biofuel, and water into the new Pressurized Reaction Chamber, turn on the heat, and watch the internal pressure build. Some of the hydrogen and water is used to heat and pressurize the unit, and some is mixed with the Biofuel. Once the machine has hit critical pressure, the hydrogen, vaporized water and biofuel react to be become gaseous ethylene!

Ethylene is a combustible hydrocarbon with many uses, one of which is a fuel. Burning ethylene in a Bio Generator will produce double the power of biofuel (240J/t) , and burn for 200 seconds, 20 times longer than Biofuel alone! Once converted to a liquid in the Rotary Condensentrator, Ethylene could be able to fuel other mods’ engines, since it is a combustible hydrocarbon very much like Buildcraft’s Fuel or Forestry’s Ethanol. 500mB of liquid ethylene is produced for every 1000mB of gaseous ethylene (2:1 compression)

Pressurized Reaction Chamber (PRC)information:

Ethylene makes a great fuel, but what else can you do with it?

So what happens when ethylene-powered Bio Generators aren’t cutting it anymore? Got the resources? Step up to top-tier Mekanism power -- the Vaporized Gas Turbine (VGT). The VGT is actually an assembly of five machines:

VGT Power generation – when running at full power, the VGT consumes 100mB of ethylene every 3.3 seconds and generates 500kJ/s (25,000J/t) at the Generator. The VGT requires one minute (RL) to spin up to its “idle” speed of 10% power. It has 5 levels of operation: 10%, 25%, 50%, 75%, 100%. This can be set manually, or an “auto” mode will adjust its output every 10 seconds to match the current energy requirements.

Steam Generation – If water is piped into the Exhaust Unit, it will create steam when not running at “idle” speed. The Exhaust Unit creates 10mB of steam per tick.

Notes

illumincrotty commented 10 years ago

Growth Hormone: In the “real world,” Ethylene is used to ripen citrus, avocados, and other fruits. Use ethylene gas in a sprayer to speed up the growth of your crops! Spray a single plant with a (new) Mekanism Portable Sprayer, or put ethylene in a stationary Powered Sprayer and you’ll affect every plant in a large area around the sprayer. -can you make this activate growth ticks instead of acting bonemeal?

Turbine Shroud - is installed behind the Vaporizer. The shroud is a fairly simple assembly of control circuits, steel chassis, and diamond bearings that houses the actual turbine item, which is placed into the Turbine Shroud GUI. The Turbine Fan is an osmium and steel beast that spins like crazy on precision diamond bearings. The turbine will wear out after approximately one year of minecraft days (about 5 RL days, if running 24/7). An abnormal system shutdown will cause damage to the turbine and may result in a catastrophic failure of the turbine, shroud, and other blocks nearby -if the turbine shuts down "abnormally" can it just break the turbine and/or the housing? Part of my enjoyment of mekanism is the lack of explosive machines. At the very least could this be configurable?

rikai commented 10 years ago

Figure'd i'd stick this here as an addendum to the GasTech stuff. There was some discussion in the IRC about a viable nether-only power system, this was my suggestion using my limited knowledge of things, and a bit of input from Greylocke:

<rikai> It'd be neat to have some sort of nether specific generator that only works in the nether and creates energy by harvesting 'nether gasses' of some sort (which would be why it only works in the nether)... Maybe SO2? Combine that with sodium and you've got energy from the sodium-sulfur interaction... Just trying to come up with something that fits into the gas theme. :)

--- And a bit later ---

<rikai> Greylocke: Any thoughts on my silly idea for a nether power source? I'm not very chemically inclined, but i was trying to come up with a something that might work with the nether theme... Ended up with something like harvesting SO2 from the nether and using it combined with salt to make a way to store geothermal heat more efficiently in a Molten-salt battery sort of thing, or some sort of sodium-sulfur interaction itself causing power generation (less realistic, as i understand it).
<rikai> Was mostly thinking about it because someone was asking about a better nether-only power source than heat generators. Figured you'd be the guy to ask about making it less of a derpy idea with the awesome GasTech stuff you'd talked to Aidan about and since the whole biofuel line of energy doesn't really work too well in a nether-only line of play. :)
<Greylocke> rikai: actually, I thought that was a cool idea. In order to make it 'real' either something needs to be consumed or there needs to be an energy differential
<rikai> Mmm,  perhaps a need to replenish the sodium source over time?

Sorry about the crappy formatting, not quite sure how to get it to copy/paste irc text to github without having it erase names in any other way.

This suggestion would be able to pair well with existing system, as well as adding sulfur which can tie into other neat things down the road like creation of H2SO4 (Sulfuric acid) that can be used for all sorts of things like dyes, batteries, water treatment, fertilizers(this one could maybe tie in with the irrigation suggestion i made over in #1040).

H2SO4 could also be used as a catalyst to make hydrochloric acid, which opens up even more uses.

Another thought is that perhaps we could pull iodine from the Brine we're using for ore production and use it in the S-I cycle as another path to producing hydrogen, could also be useful in the nether due to the need for high heat.

It would also give hydrogen a viable, if theoretical place in greylocke's revised endgame with a fairly involved process to make use of it effectively.

A lot of the byproducts of this stuff can further tie into other things, like even more extended ore processing, among other things. hydrochloric acid, for example, is used in the pickling of steel.

unpairedbracket commented 10 years ago

I'm planning on implementing some of this soon, first I have some questions for @Greylocke:

Greylocke commented 10 years ago

1 In general terms, the energy density of H2 should match RL, which... depends upon the gas pressure... but if it is output to a 3000psi system, H2 has an energy density of about 1.825MJ/l = 18.25MJ/Bucket = 18.25kJ/mB. At this rate, a heat gen with 5 sides exposed to lava (25J/t, right?) would make 1mB of H2 every 35 seconds or so.

2 The PRC concept is a multipurpose machine that can be used for future expansion, not just ethylene production. The power input is mostly there to keep the PRC flexible, allowing for an input of electricity directly if the process requires it (electrolysis, changing energy states, etc). For the creation of ethylene, I'd think that the power requirements would be minimal, just whatever it takes to keep the machine operating. Maybe it pulls a constant 5-10J/t when it is running?

3 My concept was that the burning of biofuel is inefficient and the combustion of H2 should be energy neutral or a slight loss. The ethylene produced by combining the two in the PRC gives access to more of the chemical energy stored in the hydrocarbons of the biofuel (hydrocarbons created by photosynthesis). To summarize, the "extra" energy from ethylene was always there in the biofuel, but inaccessible -- so conservation of energy still applies. :)

4 Ethylene in a heat gen? This number was pulled out of the air just to make Ethylene a viable step up from biofuel. I'd say 50mB of liquid ethylene (100mB of gaseous ethylene) burns for 200 seconds at 240J/t. This would mean that a bucket of liquid ethylene would last about 30 RL minutes. Sounds like a long time, but when you factor in that a bucket is RL 10 liters... the heat gen is still pretty inefficient. In RL terms, it would be like a portable 5000W generator burning through 2.5 gallons of fuel in 30 minutes.

On a side note, I'm thinking that I might put together an energy flow sheet that follows the resource costs through the system. That might help make sure things stay balanced.

unpairedbracket commented 10 years ago

Thanks, that's all very helpful.

One thing that I've just noticed, though: that gives gaseous ethene about half the energy density of hydrogen (9.6kJ/mB vs. 18.25kJ/mB). Would it be better to maybe up the output/tick of ethene to 625J/t? That would give it more than the combined (available) energy density of the hydrogen and the BioFuel used to make it (2500kJ > 1825kJ + 2*24kJ).

Greylocke commented 10 years ago

ah. Good point, @unpairedbracket . In messing with some numbers and checking my previous notes, I noticed that I wasn't specifying gaseous v. liquid ethylene. I think that the PRC should produce liquid ethylene, not gas.

RL liquid ethylene has an energy density of 33MJ/l = 330kJ/mB, which is roughly 18x the density of H2 @3000psi. Checking the recipe for ethylene, If we take the energy of 100mB of H2 (1825kJ) and add 2 biofuel (48kJ), we get 1873kJ. Multiply that by the energy density ratio of 18x and we get 33863kJ, so the recipe works pretty well -- 100mB of H2 (1825kJ) just made 100mB of liquid ethylene (33000kJ). So the recipe looks good. I guess the problem in comparing the energy rates is with the performance of liquid ethylene in a Heat Generator.

The max output of the Heat Gen is currently 240J/t (correct?). If you don't change that max, then the Heat Gen should run for 68.75 seconds per mB of liquid ethylene. This would be for a system that is 100% efficient... which the Heat Gen isn't! Assuming a 15% efficiency, then 1mB of liquid ethylene would produce 240J/t for ~10.3 seconds (((330,000 / 240) / 20)*0.15). Therefore a bucket would last for 2.86 hours. A long time, but still only producing just under 5000W during that time. This just happens to correspond pretty well with actual fuel consumption data for small gasoline generators. :)

How does that sound?

unpairedbracket commented 10 years ago

The way I've currently got it (provisionally) working is that the PRC produces an item and a gas from an item, a fluid and a gas (This would be easy to change to an item and a fluid, but I'd rather have it either produce a gas or a fluid, as having unused results to recipes makes the code a bit nastier to work with, and GUIs get cluttered). I've been working on increasing the versatility of the hydrogen generator so that it can burn a variety of gaseous fuels (hydrogen and ethene principally, but I've also got fuel and oil to work, after being vapourised in the condensentrator) as that seemed like the most sensible way of dealing with gaseous fuel. I've got varying output powers working OK, so that's not a problem, and I've also made it eat fuels at varying rates (I've just added in a gas fuel registry, basically, that keeps track of how long 1mB of something should burn for and how much energy should be released in doing so). Do you think burning gaseous ethene would be viable?

Either way I seem to be rewriting large parts of Generators anyway (most of it seems to date from before a lot of the internal structure of Mek's code was around, for instance the hydrogen generator never actually contained a proper GasTank before), so I might well end up rewriting the BioGen as well. If so I'll probably allow it to burn fluids in a similar way to how I've got the Hydrogen gen working with gases. How does that all sound to you?

Greylocke commented 10 years ago

If it is easier to make the PRC produce gas, that sounds like an expedient solution. Just make the recipe 1/2, since the ratio of gas:liquid ethylene is 2:1. Does the condensentrator work that way? Can each gas & liquid have its own gas:fluid ratio?

unpairedbracket commented 10 years ago

HDPE Blocks, everyone:

2014-04-10_02 19 14

Looks like a Forge PR is going to be necessary for the slick blocks to actually work but never mind that, just look at how pretty they are! They only use 4 textures between them, as well. (Ignore the fact that they're using 128x HD textures, that's just because I'm better at vector art than bitmap. As in, not totally hopeless at vector art.)

Greylocke commented 10 years ago

woot! That'll be great to have a "tech" building material to work with. This will be the new "space age" material :)

What needs the Forge PR? I thought the "slick" effect would work like ice does. no?

unpairedbracket commented 10 years ago

It would, but I'm only using one blockID and block type for all four types of block, and slipperiness is not metadata sensitive at the moment, so for now all or none of them will be slippery, unfortunately...

unpairedbracket commented 10 years ago

I've changed it to use 4 block IDs, things were getting a bit dodgy with the way I was making it only need one anyway. I've got it using slipperiness for the slick blocks at the moment (so they behave just like ice). I've just noticed that MFR Road and TiCon Brownstone provide a proper speed boost now, do you think I should do something similar with the slick blocks, or just leave it as is?

Another thought: jet fuel is kerosene, right? It's produced (or at least, was initially produced) by distilling some of the fractions out of coal. Could we maybe (when I get that far) make the VGT take kerosene instead of (or as a better alternative to) ethene, and have kerosene produced in either a chemical oxidiser from coal (just producing kerosene as output) or a PRC from coal and maybe water and oxygen (or other secondary ingredients) producing kerosene and some kind of depleted coal (or something like coal coke) as output?

unpairedbracket commented 10 years ago

Also, introducing Glow Panels! 2014-04-15_01 45 00

They can also be placed inside a hollow cover to get them flush with the wall: 2014-04-15_01 45 16

Greylocke commented 10 years ago

Amazing! Looks great! I really like the "flush" look, too. Roads.. hm... maybe add some sand in the mix to get extra traction and a speed boost? I think it sounds like a cool idea!

[randomthought] what if pathways/roads were transmitters? Utilizing the same code as UniCable... even used a Unicable as part of the recipe... basically just big blocky transmitters, but now you can lay out paths around your base AND power at the same time... and now that there's power in the path, you can do all kinds of crazy things like light up at night or charge your items while you're on the path, or act like maglev tracks for carts... or shock monsters ... or change colors ... or .. any number of insane things. [/randomthought]

Regarding Kerosene, that'd be a neat way to use all the coal that tends to accumulate mid-game. The energy density of ethylene is actually slightly higher than jet aviation fuel, 34.5 MJ/l for liquid ethylene v. 33 MJ/l for Jet Av fuel/kerosene. Actually, when researching this project, I often used JetA or petrol (34MJ/l) for real-world comparisons and data.

I like ethylene because it is renewable, and once you have set up your production system and now have tanks of the stuff, you can use it to not only make cool things like polyethylene blocks and glow panels, but also as a fuel.

But I also like the potential for kerosene. Obviously it could be a nice way to utilize stockpiles of coal, but I also think it would add great synergy with modpacks that include Buildcraft. After all , kerosene is commonly distilled from crude oil... so here's another use for those oil spouts! My original concept of the VGT was to allow it to be multi-fuel. Why not add kerosene to the list, as well?

unpairedbracket commented 10 years ago

Right, roads are in; I'm just finishing up some gui work for generators and then I think I'll merge this all into development. I'm going back to University in a week so I won't be around very much for a while, but I might see about getting the 1.7 update underway before I go.

unpairedbracket commented 10 years ago

One note I've just noticed - because of the high energy density of hydrogen, one HDPE pellet takes around 2MJ of energy to produce. This is probably fairly realistic, but it's a lot relative to what energy is worth in the rest of Mekanism. For example, I think that means that with the energy in a filled Ultimate Energy Cube it's possible to make... about 4 HDPE blocks. I feel like people might think this is a bit expensive, but Mekanism's Energy units have historically been worth more than real-life joules (For example, 128MJ in Mekanism is a lot of energy. IRL, not so much). I was thinking I could either rebalance the default generation rates of the generators, storage of the energy cubes and consumption of the machines, or reduce the energy density of hydrogen a bit.

Greylocke commented 10 years ago

hehe... good point! This is a game not a simulator, so I'd say reduce the density of H2. Maybe start with a factor of 10 and see how that works out? I think it is important to keep in mind that mid- to late-game energy is cheap and abundant, but things still need to feel balanced.

unpairedbracket commented 10 years ago

Well, I've implemented most of the ideas in this feature request (notable by its absence is the VGT), pushed to master and called it Mekanism 6.1.0.

I've started out work on the update to 1.7.2 (fixing over 3000 compile-time errors in 24 hours must be a personal best), but alas, for now I must disappear into my Physics degree again. @aidancbrady should be back from his real-life stuff shortly, I think, so he should be able to get the update finished before too long. I'll probably be returning to modding in about 9 weeks (having had some exams go either really well or really badly; hopefully the former), at which point I'll try to implement what's left of this that hasn't been done by then.

I also have an idea (which I need to pass by Aidan) for a top-tier power system that's in a similar vein to what's been done in some other mods, but approached from a different direction that I feel fits Mekanism a bit better (hint: it involves big lasers, something called a hohlraum and lots and lots of very cold helium).

Thanks for all your advice and great ideas; It's been a pleasure working with you.

Greylocke commented 10 years ago

hohlraum??? Interest piqued! I'll have to do some research. It has been great working thru this stuff with you -- I can't wait to try out the new items. Thanks for spending your break to implement them. All the best to you in your next semester of studies.

[edit]omg https://www.youtube.com/watch?v=9PbJ9ts94_k

illumincrotty commented 10 years ago

Build 85 failed on the jenkins. Ben are you going to fix it or should we just wait till aidan gets back?

unpairedbracket commented 10 years ago

Looks like it was just a bad import. I think I'll be able to fix it.

[edit] Yep, that's done the trick.

illumincrotty commented 10 years ago

Thanks I'll be trying to beak it tonight :) honestly I think this a great move into the direction of both logic and balance and will only make mek more likable. Thanks for all your hard work Ben!

illumincrotty commented 10 years ago

I found some issues... One is with the barrier, it's uncraftable. The next is not knowing how to create hpde pellets or substrate or ethylene. Maybe nei integration? Plastick doesn't seem to be used in anything... Maybe in the plastic barrier? Or in the atomic dissembler instead of refined obsidian? Or in the advanced solar generator instead of enriched alloy? Or in the road instead of its current recipe it could be a t of plastick and plastic blocks in the corners? Just some ideas...

illumincrotty commented 10 years ago

Can't find a way to get the ethylene out of the PRC (but I did realize the recipe of water hydrogen and biofuel)

Greylocke commented 10 years ago

There are still some missing recipes. Substrate is a byproduct of Ethylene production in the PRC. And yes, it seems like the gaseous Ethylene does not want to leave the PRC.

aidancbrady commented 9 years ago

@Greylocke, can this be closed or is there anything else you hope to be implemented?

aidancbrady commented 9 years ago

Merging into #2217.

hron84 commented 8 years ago

@aidancbrady sprayers will be implemented for using ethylene as a growth hormone? Or it is already implemented but with different name?

Gryffen1971 commented 7 years ago

I have ran into a problem with the color of the current version of the Electrolytic Separator in Minecraft 1.10.2, The colors are all Orange, when on your Mekanism site it states that Hydrogen is pumped out the Blue side and Oxygen is pumped out the Red side. Since, all the ports are the same color it is a little difficult to determine which side to use. Can the Texture be updated to show the correct colors for the ports, please. Thank you.

Greylocke commented 7 years ago

The wiki hasn't been updated since the new textures were added. When standing in front of the machine, hydrogen is on the left and oxygen is in the right, just like the GUI. If you forget... just open the GUI

Gryffen1971 commented 7 years ago

@Greylocke , After sent in the issue that is what i did and BING! Now, everything is working great.