Planned: Fuel values on fluids and Hydrogen balance. Give opinions.

Some mods, made by Bob. Basically streaks every Factroio-area.

Moderator: bobingabout

Planned: Fuel values on fluids and Hydrogen balance. Give opinions.

Postby bobingabout » Sun Feb 11, 2018 11:23 pm

Part of one of my drives is to work on the ability to use fluids as fuels, with base game support.
Klonan is actually behind me on this, and has already partially implemented the idea, Fluids can now have a fuel value, but the only thing that can make use of it is a modded generator (Klonan demonstrates this in his mod KS-Power)

Anyway, Fuel values on fluids, what should they be worth?

KS-Power has the following:
Petroleum Gas = 1MJ
Light oil = 3MJ
Heavy oil = 2MJ
Diesel = 4MJ


Doing a little research on RL values, and calculations on some in game fuel, such as fuel blocks, I've come to the following:
Code: Select all
Petroleum Gas = 4.6MJ
Light oil = 3MJ
Heavy oil = 2MJ
Liquid fuel = 4MJ
hydrazine = 380kJ
glycerol = 1.46MJ

--Some existing fuel items for calculations
enriched fuel = 100MJ
solid-fuel = "25MJ",
coal = "8MJ",
raw-wood = 4MJ

LPG (Liquefied Petroleum Gas) has 46MJ/kg. Diesel has 42MJ/kg, so to make the numbers work, I divided by 10. it's quite a difference to Klonan's 1MJ, and does mean that converting Petroleum Gas to a fuel block gives a large net loss.
(but if you ask me, making fuel blocks out of gas is dumb anyway, since it's far more efficient to make it from light oil, where it costs 10, rather than 20, cracking heavy into light to make fuel blocks gives a net gain because of this IIRC.)
using enriched fuel, you get Hydrazine 100MJ - 25MJ = 75MJ/200 = 375kJ, which is close to the real world value of 3.8MJ/kg /10 = 0.38MJ = 380kJ, so I kept it.
Glycerol again is a straight up divide by 10 plug of some RL numbers from the internet.


The big problem comes with Hydrogen...
IRL 142MJ/kg makes it 7.1MJ in my mod. (Divide by 20 not 10, because hydrogen has a x2 multiplier set. Most other "Gasses" have a x2.5 multiplier set, PG being base game is an exception)
(it's why you get 20 hydrogen and 12.5 oxygen from a single electrolysis cycle from 10 water. if the numbers were equal you'd get 10 and 5, or even if they all had the same multiplier for gas you'd get 25 and 12.5.)
(It's based off 2H2O -> 2H2 + O2. which states 2 water molecules becomes 2 hydrogen molecules plus 1 Oxygen molecule. Then apply the multipliers because it's a gas, so it'll take more space even when compressed)

8kJ - 11.25kJ by electrolysis (cost in electricity for one cycle, divided by how many hydrogen you get per cycle.)
Electrolyser MK4 gives 560kW/3.5(speed) = 160kJ(energy cost per cycle)/20(hydrogen per cycle) = 8kJ(energy per hydrogen) or for the MK1 180kW/0.8 = 225kJ /20 = 11.25kJ

68kJ by fuel block (25MJ - 8MJ for coal fuel value = 17MJ. 17MJ/250(how much hydrogen to make 1 block) = 68kJ)
96kJ by hydrazine (I forgot how I worked it out, but that's what it came to)
460kJ from PG (10PG makes 100Hydrogen, so, 4.6MJ /10 = 0.46MJ = 460kJ)
Keeping in mind the 100 hydrogen from 10 petroleum gas isn't exactly balanced as it is, from 10 you should be getting 20, or 40 with the 2x, maybe +20 from the hydrogen in water too, bringing it to 60. so if you used those values, it's only /6 not /10, which makes it 766.66kJ.


Anyway, the question is, what fuel value do I use for Hydrogen? Do I need to balance some of these recipes?
Do I make electrolysers cost more electricity to run?(10x makes it 80kJ - 112.5kJ, 12x would be 96kJ - 135kJ)
do I make fuel blocks cost more or less hydrogen? (170(based on 17MJ) would be 100kJ, 180 is about 94kJ)
do I make PG cracking give more Hydrogen? (I once calculated it should give 500, 4.6MJ/50 = 92kJ)
(The calculation actually states that, going by the energy cost to make hydrogen from electrolysis, 1 PG = 500 Hydrogen. However, if we're also making the cost to product hydrogen 10x more expensive, that drops from 1:500 to 1:50, meaning 10 PG from 1 cycle produces 500 Hydrogen)
If I do all of the above, it puts most fuel value calculations between 80kJ and 100kJ, or 92kJ and 96kJ, which seems far more balanced.
You can then explain the discrepancy with 7.1MJ from RL values as... it's not compressed. Sometimes game balance is more important than RL values, right?

Even if you're not interested in fuel values, you could take away from this that Hydrogen's production and usage is currently unbalanced, and view it as a possible balancing exercise.
User avatar
bobingabout
Smart Inserter
Smart Inserter
 
Posts: 5002
Joined: Fri May 09, 2014 1:01 pm

Re: Planned: Fuel values on fluids and Hydrogen balance. Give opinions.

Postby E-37 » Mon Feb 12, 2018 12:44 am

Are you using this in vehicles or as a power plant? I'm going to assume this is a standalone mod and not part of Bob's Mods or anything. Either way the fuel values seem really high if you take into account how much harder it is to get coal than oil. (not that it is hard to get coal but even pump running at minimum capacity can do the work of several drills) Ill run some numbers just for fun.

Looking at coal liquefaction, you can turn 10 coal (80MJ) 25 heavy oil (50MJ) and 50 steam (1.5MJ) into 35 heavy (70MJ) 15 light (45MJ) and 20 petroleum (92MJ) which is turning 131.5 MJ into 207MJ. I suppose that is alright since you can produce power turning oil into solid fuel.

Assuming by "Fuel Oil" you mean crude oil, you can turn 100 Oil (400MJ) and 50 Water (0MJ) into 55 Petroleum (253MJ), 45 Light (135MJ) and 10 heavy (20MJ) which is turning 400MJ into 408 which is very similar. If you take into account that the Refinery uses 2.1MJ to produce that, it is quite balanced as you get almost the same amount of energy you put in.

If you have 1 pumpjack running at minimum speed (2/s) you can crack it with advanced processing into 8MJ/s. The pumpjack uses 60kW/s and the refinery uses 2.1MJ/50s (because it won't run all the time because of the 1 pumpjack) That is producing about 7.9MJ/s. And... one pumpjack on a fully depleted patch can produce the same power as at least 5.2 boilers. This doesn't seem fair. Once oil (and the modded tech) is researched, boilers become outclassed since you won't need to find new coal patches and probably use less space and be able to run a mid-game base on 10 oil splats easily.

So... my thoughts? I would reduce all the fuel values by a factor of at least 2-4 since they are fairly effortless to obtain. As it seems now, it offers many of the benefits of other power without any real downside because it offers the infinite power of solar without the space requirements or even the need for accumulators and early game access like boilers. As for the ratios of crude - heavy - light - gas, they seem fairly balanced to me. I know nothing about Hydrazine and Glycerol.
Good things come in bags marked "SWAG"
E-37
Inserter
Inserter
 
Posts: 23
Joined: Mon Jan 22, 2018 12:37 am

Re: Planned: Fuel values on fluids and Hydrogen balance. Give opinions.

Postby bobingabout » Mon Feb 12, 2018 1:01 am

These values would be for any entity that burns fluids as a fuel (similar to how solid fuels like coal and fuel blocks work now), take a look at KS-Power to see what he did with the Diesel generator.
currently, the base game doesn't support many things for fluid fuels, the only thing you can really do without scripting is modding the "Generator" (ingame it's Steam engine/turbine) to consume fluids with a fuel value, instead of a heat capacity, but further support might be added later.

Fuel oil (edited original post now) is Liquid fuel, something from my mod.
Crude Oil would have a value of 3.8MJ, except I don't want it to be usable as a fuel directly, so I'm not giving it a fuel value.

Also keep in mind that mining crude oil is simply retrieving a resource from underground, similar to just mining coal, and you should look at it as such. Making oil not infinite is something some people have done in mods to counter this issue.
and one of the things I would like to do eventually (which to do properly will require source code edits) is an oil powered boiler. Right now though it's just a KS-Power Diesel generator style entity, because that's what base game allows.

Glycerol is actually a net loss (you're not making it to burn as a fuel anyway, you're making it to make nitroglycerin for ammo) because it's a 1:1 ratio light oil to Glycerol.

Also, initial values were based on those in KS power, modified to make more sense. KS-Power gets 3MJ for light oil based on the cost of making solid fuel (which comes to 2.5MJ, because it costs 10 to make 1 25MJ fuel block, so you're consuming 30MJ of light oil to make a 25MJ fuel block)

Also, who's to say the entity burning the fuel is 100% efficient? Although Klonan's is 100% efficient, Boilers themselves are only 50% efficient, so I'd probably start off with a low end generator's efficiency around... 40% and a high end one around 75% (40% base is equivalent of reducing the fuel values by a factor of 2.5)
Keep in mind that with my power mod, you can already squeeze boiler/steam engine efficiency up from 50% to 96%

I did toy around with some other values, like 2.5 for light oil and 1.25 for heavy oil before deciding that Klonan's values of 3 and 2 were close enough.
User avatar
bobingabout
Smart Inserter
Smart Inserter
 
Posts: 5002
Joined: Fri May 09, 2014 1:01 pm

Re: Planned: Fuel values on fluids and Hydrogen balance. Give opinions.

Postby thc133 » Mon Feb 12, 2018 11:28 pm

I like the idea burning fluids to get energy. It should be in between burning coal/wood/etc. and solar energy. Burning solid fuel is the cheapest, with lowest efficiency, but generates a lot of pollution. Solar energy generates non pollution but needs a lot of material and space and time. Burning liquid is in between - moderate cost and efficiency, low pollution.
thc133
Long Handed Inserter
Long Handed Inserter
 
Posts: 85
Joined: Thu Oct 30, 2014 5:05 pm

Re: Planned: Fuel values on fluids and Hydrogen balance. Give opinions.

Postby bobingabout » Tue Feb 13, 2018 12:44 am

thc133 wrote:I like the idea burning fluids to get energy. It should be in between burning coal/wood/etc. and solar energy. Burning solid fuel is the cheapest, with lowest efficiency, but generates a lot of pollution. Solar energy generates non pollution but needs a lot of material and space and time. Burning liquid is in between - moderate cost and efficiency, low pollution.

That's another issue.... Burning some fuels like Hydrogen and Hydrazine should be pollution free as they generate only steam and nitrogen as by-products. yet burning oils should be as polluting as burning coal. There's no real way to determine pollution based on fuel type, it's purely based on the factory. And with the way things are currently set up, the entity probably wouldn't produce any pollution at all.

anyway, this power station would likely produce less power per entity than a steam generator, but you wouldn't need to worry about steam management, nor converting oil into solid fuel, it would all just burn in the power plant entity.
User avatar
bobingabout
Smart Inserter
Smart Inserter
 
Posts: 5002
Joined: Fri May 09, 2014 1:01 pm

Re: Planned: Fuel values on fluids and Hydrogen balance. Give opinions.

Postby E-37 » Tue Feb 13, 2018 12:58 am

As for different pollution values for different fluids, could you make an entity that takes any liquid for fuel and several that each take 1 type and all use the same sprite. Then when the master object receives a fluid, it could change to the burner for that specific fluid and back to the master when there is no more liquid. Each specific burner could have its own pollution value and other stats if needed. I've never tried Factorio modding so I don't know if you can replace a building with another on a trigger like that.
Good things come in bags marked "SWAG"
E-37
Inserter
Inserter
 
Posts: 23
Joined: Mon Jan 22, 2018 12:37 am

Re: Planned: Fuel values on fluids and Hydrogen balance. Give opinions.

Postby bobingabout » Tue Feb 13, 2018 8:15 am

E-37 wrote:As for different pollution values for different fluids, could you make an entity that takes any liquid for fuel and several that each take 1 type and all use the same sprite. Then when the master object receives a fluid, it could change to the burner for that specific fluid and back to the master when there is no more liquid. Each specific burner could have its own pollution value and other stats if needed. I've never tried Factorio modding so I don't know if you can replace a building with another on a trigger like that.

replacing it itself is fairly simple with a script. the hard part is detecting when a fluid enters. However, I'm trying to avoid scripting.
The main issue is the fact that the entity type is "generator", same as the steam engine, which can't produce polution!
So... if I were going to write a script (which I don't want to), it would be to artifically create polution when the generator burns a fluid.
User avatar
bobingabout
Smart Inserter
Smart Inserter
 
Posts: 5002
Joined: Fri May 09, 2014 1:01 pm

Re: Planned: Fuel values on fluids and Hydrogen balance. Give opinions.

Postby Aeternus » Tue Feb 13, 2018 9:16 am

bobingabout wrote:That's another issue.... Burning some fuels like Hydrogen and Hydrazine should be pollution free as they generate only steam and nitrogen as by-products. yet burning oils should be as polluting as burning coal. There's no real way to determine pollution based on fuel type, it's purely based on the factory. And with the way things are currently set up, the entity probably wouldn't produce any pollution at all.

Then make 2 types of burners. The "Hydrocarbon burner" that takes oils and the "Clean burner" that takes non-carbon based fuels. Note that even clean burners should produce a bit of pollution since combustion with air inevitably leads to some nitrogen-oxygen reactions. I like the idea of oil based burners, especially given how fast liquids transfer from tank wagons (5 seconds or so to fully transfer 25000 fluid, less if more pumps are used).
Aeternus
Filter Inserter
Filter Inserter
 
Posts: 451
Joined: Wed Mar 29, 2017 2:10 am

Re: Planned: Fuel values on fluids and Hydrogen balance. Give opinions.

Postby Arch666Angel » Tue Feb 13, 2018 10:00 am

bobingabout wrote:
E-37 wrote:As for different pollution values for different fluids, could you make an entity that takes any liquid for fuel and several that each take 1 type and all use the same sprite. Then when the master object receives a fluid, it could change to the burner for that specific fluid and back to the master when there is no more liquid. Each specific burner could have its own pollution value and other stats if needed. I've never tried Factorio modding so I don't know if you can replace a building with another on a trigger like that.

replacing it itself is fairly simple with a script. the hard part is detecting when a fluid enters. However, I'm trying to avoid scripting.
The main issue is the fact that the entity type is "generator", same as the steam engine, which can't produce polution!
So... if I were going to write a script (which I don't want to), it would be to artifically create polution when the generator burns a fluid.


My issue with hydrogen or any similar process was and still is that there is a difference in spending a resource you have to mine and is "limited" in the regard of that you have to set up a new mining operation (=effort, gameplay) and the "set up once, run forever" mentality of virtually free (aside from power) resources like water and air. So the only real options you have is make the production of these "free" resource more expansive/involved if you want to transform them into fuel competing against resource fuels or add a resource to the recipes. With Petrochem I went the way to add a carrier material (coke == coal) to all fuel blocks and then tried to balance out the virtual fuel values. What I did not was sticking to any RL values because of said problems above.
User avatar
Arch666Angel
Smart Inserter
Smart Inserter
 
Posts: 1407
Joined: Sun Oct 18, 2015 11:52 am
Location: Darmstadt, Germany

Re: Planned: Fuel values on fluids and Hydrogen balance. Give opinions.

Postby bobingabout » Tue Feb 13, 2018 10:19 am

Arch666Angel wrote:My issue with hydrogen or any similar process was and still is that there is a difference in spending a resource you have to mine and is "limited" in the regard of that you have to set up a new mining operation (=effort, gameplay) and the "set up once, run forever" mentality of virtually free (aside from power) resources like water and air. So the only real options you have is make the production of these "free" resource more expansive/involved if you want to transform them into fuel competing against resource fuels or add a resource to the recipes. With Petrochem I went the way to add a carrier material (coke == coal) to all fuel blocks and then tried to balance out the virtual fuel values. What I did not was sticking to any RL values because of said problems above.

Yeah, I'm taking RL values as more of a guide. it seems to work with everything except Hydrogen, which, due to how it's made so cheaply in my mod makes it godly.

If I give it a fuel value of 100kJ, then alongside the 380kJ Hydrazine (which is fairly processed, and costs hydrogen to make), then it's not too bad. though that doesn't take processing costs from hydrogen to hydrazine into account, so would be a net loss.

However, further to your point, that's why the solid fuel block from Hydrogen recipe costs coal, and why the Enriched fuel from Hydrazine costs a solid fuel block. To burn them directly wouldn't make a lot of sense.

I'm going to need to make Electrolysis a lot more expensive to remove some of this "free energy from a free resource" infinite power feeling from these gasses, though not too much that it breaks actually making them in the first place. Maybe 5 times the energy cost would be a good balance between having to think about the creation cost vs the gain, and breaking other uses for electrolysis. at 5x you'd need a generator to be about 60%+ efficiency to be worth it, so if I start with 40%, you're pretty much already limiting it to only the top end generator producing a gain that or use productivity.
User avatar
bobingabout
Smart Inserter
Smart Inserter
 
Posts: 5002
Joined: Fri May 09, 2014 1:01 pm

Re: Planned: Fuel values on fluids and Hydrogen balance. Give opinions.

Postby mrvn » Tue Feb 13, 2018 10:53 am

Have you checked that making hydrogen in electrolyzers and burning it to make electricity is a loss? Even at the highest efficiency and with modules cycles like that should not be a gain.

This is unlike a greenhouse/wood burning cycle where you can claim that you are putting in sunlight to grow the trees as well so you gain energy in the loop. Or an algae farm power plant where again growing the algae adds energy.
mrvn
Smart Inserter
Smart Inserter
 
Posts: 1552
Joined: Mon Sep 05, 2016 9:10 am

Re: Planned: Fuel values on fluids and Hydrogen balance. Give opinions.

Postby bobingabout » Tue Feb 13, 2018 12:37 pm

mrvn wrote:Have you checked that making hydrogen in electrolyzers and burning it to make electricity is a loss? Even at the highest efficiency and with modules cycles like that should not be a gain.

This is unlike a greenhouse/wood burning cycle where you can claim that you are putting in sunlight to grow the trees as well so you gain energy in the loop. Or an algae farm power plant where again growing the algae adds energy.


If you look at the original post, I said that to make Hydrogen cost the same as it's fuel value would need a 10x cost increase, and that is also dependant which electrolyser you make it in (80kJ for MK4, 112.5kJ for MK1), this also doesn't include the cost of cleaning the water first. if you assume the 40% efficiency of the low end generator, and 75% of the high end, then even with a 5x cost to electrolysis, all low end gear will be a loss, but when you start to use higher end gear, it will be a gain.

From the one perspective, you might not want any free gains from doing this at all, but if you gain nothing from burning hydrogen, then what is the point in being able to burn hydrogen at all?
a 5x, where you have no gain at entry (Forcing you to be reliant on traditional methods, or oil burning), but a small gain at end level feels like it should work to me.
User avatar
bobingabout
Smart Inserter
Smart Inserter
 
Posts: 5002
Joined: Fri May 09, 2014 1:01 pm

Re: Planned: Fuel values on fluids and Hydrogen balance. Give opinions.

Postby mrvn » Tue Feb 13, 2018 4:10 pm

bobingabout wrote:
mrvn wrote:Have you checked that making hydrogen in electrolyzers and burning it to make electricity is a loss? Even at the highest efficiency and with modules cycles like that should not be a gain.

This is unlike a greenhouse/wood burning cycle where you can claim that you are putting in sunlight to grow the trees as well so you gain energy in the loop. Or an algae farm power plant where again growing the algae adds energy.


If you look at the original post, I said that to make Hydrogen cost the same as it's fuel value would need a 10x cost increase, and that is also dependant which electrolyser you make it in (80kJ for MK4, 112.5kJ for MK1), this also doesn't include the cost of cleaning the water first. if you assume the 40% efficiency of the low end generator, and 75% of the high end, then even with a 5x cost to electrolysis, all low end gear will be a loss, but when you start to use higher end gear, it will be a gain.

From the one perspective, you might not want any free gains from doing this at all, but if you gain nothing from burning hydrogen, then what is the point in being able to burn hydrogen at all?
a 5x, where you have no gain at entry (Forcing you to be reliant on traditional methods, or oil burning), but a small gain at end level feels like it should work to me.


The point is that you need the oxygen to smelt lead. And now you have that lovely combustible hydrogen around with no use. You have all that energy spend already to make it and all you can do is vent it. So any energy you reclaim by burning it is a win. No need for a closed loop that produces energy out of nothing. That's simply not realistic. Same reason why botteling/unbotteling must not have productivity bonuses and produce more oil+barrels than you put in.
mrvn
Smart Inserter
Smart Inserter
 
Posts: 1552
Joined: Mon Sep 05, 2016 9:10 am

Re: Planned: Fuel values on fluids and Hydrogen balance. Give opinions.

Postby bobingabout » Tue Feb 13, 2018 5:02 pm

That reminds me of oxygen not included. I did make the an Electrolysis setup to vent oxygen and burn hydrogen to make power, but then when I ran the numbers realised that you don't get enough power back from the hydrogen even to power the electrolysers, it's just a bit of bonus power returned while destroying the otherwise useless hydrogen, in a process to produce oxygen for your replicants to breath.

The easy solution is to just make hydrogen not have a fuel value. I mean, you can still use it to make fuel blocks out of coal, or mix with Nitrogen to produce Hydrazine (through a chain where you make Ammonia and hydrogen peroxide first, which requires some oxygen.)

And then I did a rant thing
Actually, that whole Nitrogen/Oxygen production system is a one of the things that bugs me, but not as much as the Hydrogen, Chlorine and Sodium hydroxide recipe. Considering both come from the same recipe from free to obtain air, in theory you could just pull Nitrogen, or Oxygen straight from the air... however, whilst this may be okay to do for just Nitrogen, it kind of defeats the purpose of going through all that Electrolysis to produce the Oxygen to get the Hydrogen by-product.

Take that Hydrazine loop for example. 2x(5 Nitrogen + 12 Hydrogen -> 10 Ammonia.) 10 Oxygen + 8 Hydrogen -> 10 Hydrogen Peroxide. 2x(10 Ammonia + 5 Hydrogen Peroxide -> 4 Hydrazine + 2 Water.)
0.4x of an Electrolyse cycle on the 4 water = 4x water -> 8 Hydrogen + 10 Oxygen.

Total in = 10 Nitrogen, 32 Hydrogen, 10 Oxygen.
Total out = 8 Hydrazine, 8 Hydrogen, 10 Oxygen.
Total change = 10 Nitrogen + 24 Hydrogen -> 8 Hydrazine.

The Oxygen in this cycle can be considered to be a closed loop, but you also need to put Hydrogen and Nitrogen to make the Hydrazine, both of which have Oxygen as a by-product.

One Nitrogen factory gives 20 nitrogen and 5 oxygen. that's also twice as much nitrogen as you need for this process, so, we need half a nitrogen factory per everything else so far.
one Electrolyser gives 20 Hydrogen and 12.5 Oxygen, so we need 1.2 Electrolysers for this.
All these recipes have a speed of 1, so if you're using MK4 factories, the all have a speed of 3.5, so everything is in a 1:1 ratio.
Nearest whole numbers puts 6 electrolysers for 5 cycles, and 1 nitrogen plant for 2 cycles, which means for perfect 100% performance, you need 12 Electrolysers and 5 Nitrogen plants to supply 20 Ammonia plants, 10 Hydrogen Peroxide plants and 20 Hydrazine plants. This gives a total of 175 Oxygen as an output per cycle, or assuming all the MK4s, 612.5 Oxygen per second, to produce 80 Hydrazine per cycle, or 280 Hydrazine per second.

That's just the smallest with a 100% activity on all factories.


So, instead of having an issue where you want to dispose of Hydrogen from your oxygen factory, you instead end up with excess Oxygen from your Hydrazine factory, which can be used to smelt your lead... which gives Sulfur Dioxide as a by-product, which can be used to make Sulfuric acid to use to make your batteries....

Also, one of the reasons why I love this cycle... Bots vs belts? well, doesn't matter, this entire process uses only fluids, and therefore, only pipes!


Needless to say, whatever route I take, testing will be required. The implementation of this might be so laughably low due to the low fuel value of hydrogen, or even Hydrazine compared to Petroleum gas, that it wouldn't be worth all the trouble. The burning entity can have a power output limit and a fluid flow limit, meaning that Hydrogen could be producing only 10% of the power per entity than something with a higher fuel value.
User avatar
bobingabout
Smart Inserter
Smart Inserter
 
Posts: 5002
Joined: Fri May 09, 2014 1:01 pm

Re: Planned: Fuel values on fluids and Hydrogen balance. Give opinions.

Postby mrvn » Thu Feb 15, 2018 11:21 am

I think that is perfectly fine, just a bit of extra power instead of costing you power to flare it off.

That you need to spend power to get rid of the excess hydrogen really bugs me.
mrvn
Smart Inserter
Smart Inserter
 
Posts: 1552
Joined: Mon Sep 05, 2016 9:10 am

Re: Planned: Fuel values on fluids and Hydrogen balance. Give opinions.

Postby bobingabout » Fri Feb 16, 2018 11:19 am

:|

I tried actually making the entity... well, I wrote it on Tuesday, but did testing last night.

A few points to note about it.

1. It's a steam generator, so functions as such. if you put high temp steam in a generator, it wastes the excess. As such, if you put in a fluid with a fuel value higher than what it needs, it wastes the excess.
2. This means you have to tune it to the highest known fuel value (I worked with 4, even though PG has 4.6), which brings us to point 2. It reports to produce whatever value you put on the tag to define maximum power output, but you'll only get that IF you use the best fuel
3. And, to bring to point 3, if you set effectivity (Efficiency) to 0.4 (40%), this it consumes 100% fuel as per the maximum power output definition, but only generates the 40% efficiency as actual output. PG gave 400kW the same as Liquid fuel, even though it was a 1MW generator.
4. Since it is based on the steam generator which doesn't produce pollution (because the steam power pollution is generated by the boiler) It will never produce pollution.

So a 1MW liquid fuel burning generator with 40% efficiency will report a max output of 2.5MW, and you'll only ever get that high if you use 4MJ fuel. if you use 100kJ hydrogen, you'll only get 25kW as an output.

It also reports fuel consumption as (0/0)/s, it will only report whole numbers, but we had to tune the fuel consumption to match the 2.5MW, which with 4MJ fuel is only 0.625 per second... and actually gives wobbly numbers because you have to define it all PER TICK, and math rounding errors start to creep in when you're using 0.625/60 fluid to produce 2.5/60MJ per tick.


It works, but not how I would like it to, it all feels so... hackish.

And yes, that means the hydrazine generator in my rant example requires 280 of these entities to produce 106.4MJ of power.



HOWEVER, you can specify a single fluid filter, and if you do only that fluid will be allowed to enter the entity's fluid box. Which means you can make a Liquid fuel burner, Petroleum Gas burner, Hydrogen burner and Hydrazine burner as separate entities and tune it for the mentioned fluid. you can't write exclusions though, it's literally just a filter to allow just that fluid, or no filter at all.

Personally, I feel inclined to have a general oil burner tuned for the highest, this isn't too bad when used with any of the main fuels, Petroleum Gas has 4.6, Liquid fuel 4, Light oil 3 and Heavy oil 2. Glycerol has 1.46 but isn't really important. using all those in an oil burner, okay, heavy oil produces less than half as petroleum gas, but, still worth doing.

Then have a special one specifically for Hydrazine, with a filter, that gives high efficiency for that fuel and burns... maybe 10 to 15 units of fluid per second to give about a 5MW output. (minus efficiency loss, 80% would give 4MW even though say it produces 5MW) Would also only need 28(if 10 fluid per second) of these for that Hydrazine rant example, which seems more realistic.

And just remove Hydrogen's fuel value. It's pointless in the general fluid fuel burner and to give it it's own would just be wrestling with the "Free power" issue anyway. it also means I don't need to worry too much about balancing electrolyser power costs. Though they probably do still need a x2 to x5 multiplier anyway.


Another possible solution (That I'm probably not going to do) is to have a fuel converter entity. it will require pre-defined recipes, and probably be a furnace type entity (recipe auto-changing) which produces 10 units of fluid fuel (some arbitrary new fluid that has a fuel value on it) out of X units of the fluids we currently have as fuels, depending on their fuel value. (So if we go with 4MJ, 10 units of fluid fuel is worth 20 units of heavy oil, or 105.3 units of hydrazine), it also needs to be a burner or electric powered entity itself, so does require power to use. it can also produce pollution.
User avatar
bobingabout
Smart Inserter
Smart Inserter
 
Posts: 5002
Joined: Fri May 09, 2014 1:01 pm

Re: Planned: Fuel values on fluids and Hydrogen balance. Give opinions.

Postby Aeternus » Fri Feb 16, 2018 11:54 am

bobingabout wrote:
mrvn wrote:From the one perspective, you might not want any free gains from doing this at all, but if you gain nothing from burning hydrogen, then what is the point in being able to burn hydrogen at all?

The point would be to turn a waste gas into something useful. Hydrogen is a byproduct of some chains, and if you don't turn around and use that gas elsewhere, you might as well get some energy from it. As I recall there is/was already an option to get some Solid Fuel out of Hydrogen, along the lines of 250 H2 -> Solidfuel?

I think we're largely missing the point of it all though. Most of the chains you propose are never meant to be for energy generation, they are for chemical processing. So having a ridiculously low fuel value for H2 and other chemical byproducts makes sense. I'd even support just leaving it at "can make some solid fuel with it" to dump it into something useful that way.
Last edited by Aeternus on Fri Feb 16, 2018 2:59 pm, edited 1 time in total.
Aeternus
Filter Inserter
Filter Inserter
 
Posts: 451
Joined: Wed Mar 29, 2017 2:10 am

Re: Planned: Fuel values on fluids and Hydrogen balance. Give opinions.

Postby bobingabout » Fri Feb 16, 2018 12:12 pm

Aeternus wrote:
bobingabout wrote:
mrvn wrote:From the one perspective, you might not want any free gains from doing this at all, but if you gain nothing from burning hydrogen, then what is the point in being able to burn hydrogen at all?

The point would be to turn a waste gas into something useful. Hydrogen is a byproduct of some chains, and if you don't turn around and use that gas elsewhere, you might as well get some energy from it. As I recall there is/was already an option to get some Solid Fuel out of Hydrogen, along the lines of 250 H2 -> Solidfuel?

1 coal + 250 hydrogen -> 1 solid fuel block.
Though with my rebalance, it's going to change to 1 coal + 175 hydrogen.
User avatar
bobingabout
Smart Inserter
Smart Inserter
 
Posts: 5002
Joined: Fri May 09, 2014 1:01 pm

Re: Planned: Fuel values on fluids and Hydrogen balance. Give opinions.

Postby bobingabout » Tue Feb 20, 2018 10:57 am

I've been looking at making this better by editing source.
I've already released a small bug fix (effectivity was being applied twice if it was lower than 100%, giving unextected results)

But what I can confirm is that the emissions tag (that creates pollution) is read as part of the electricity type energy source system (not new information, it's on the wiki), and therefore it should be capable of producing pollution. Maybe because it's generating rather than consuming it's performing a "cleaning" effect, and to make it spew out clouds of biter attracting death, you need to specify the amount as a negative?

Also, now that I've been reading the source code I can understand why this small shortcut to use the generator was implemented rather than a proper new fuel type system. "It easier" is an understatement. I can't go into details though, because of the NDA I signed.
User avatar
bobingabout
Smart Inserter
Smart Inserter
 
Posts: 5002
Joined: Fri May 09, 2014 1:01 pm

Re: Planned: Fuel values on fluids and Hydrogen balance. Give opinions.

Postby mrvn » Tue Feb 20, 2018 11:31 am

bobingabout wrote:I've been looking at making this better by editing source.
I've already released a small bug fix (effectivity was being applied twice if it was lower than 100%, giving unextected results)

But what I can confirm is that the emissions tag (that creates pollution) is read as part of the electricity type energy source system (not new information, it's on the wiki), and therefore it should be capable of producing pollution. Maybe because it's generating rather than consuming it's performing a "cleaning" effect, and to make it spew out clouds of biter attracting death, you need to specify the amount as a negative?

Also, now that I've been reading the source code I can understand why this small shortcut to use the generator was implemented rather than a proper new fuel type system. "It easier" is an understatement. I can't go into details though, because of the NDA I signed.


Burning hydrogen creates steam so no pollution sounds about right. Unless you count fog and slightly increased rainfall as pollution. Aliens shouldn't be smart enough to notice those.

Unless they are in a desert and don't like water at all...

So maybe a separate hydrogen burner is a good idea so it can have no pollution while burning crude oil has a lot.
mrvn
Smart Inserter
Smart Inserter
 
Posts: 1552
Joined: Mon Sep 05, 2016 9:10 am

Next

Return to Bob's mods

Who is online

Users browsing this forum: No registered users and 8 guests