KS Power

Topics and discussion about specific mods
User avatar
thereaverofdarkness
Filter Inserter
Filter Inserter
Posts: 558
Joined: Wed Jun 01, 2016 5:07 am
Contact:

Re: [MOD 0.12.26] KS Power

Post by thereaverofdarkness »

Could someone explain how to tweak the energy outputs? I want to make this more compatible with the Harder Energy mod.
NoriSilverrage
Fast Inserter
Fast Inserter
Posts: 159
Joined: Mon Mar 21, 2016 1:19 pm
Contact:

Re: [MOD 0.12.26] KS Power

Post by NoriSilverrage »

thereaverofdarkness wrote:Could someone explain how to tweak the energy outputs? I want to make this more compatible with the Harder Energy mod.
Well you can pretty easily edit the source files, or better yet make a "mod" to edit the files.

For instance, lets say you wanted to double the efficiency of the diesel generator and halve it's fluid usage. Basically it uses less fuel but makes the same amount of energy.

Code: Select all

data.raw["generator"]["petroleum-generator"].effectivity = 200
data.raw["generator"]["petroleum-generator"].fluid_usage_per_tick = 0.0025
Put that into a .lua file, link it using a data.lua with a info.json and you are good to go.
Sean Mirrsen
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Wed Apr 27, 2016 6:30 pm
Contact:

Re: [MOD 0.12.26] KS Power

Post by Sean Mirrsen »

Anson wrote:If someone wants to get enough CO2 from the air to produce one kg of plastic, he needs to suck in and filter one million kg of air which is roughly one million cubic meters (37 million cubic feet, the volume of the Empire State Building). besides the problem how to extract the CO2 from one million cubic meters of air and how much energy that extraction would require, the pumps alone (to suck in the air) would use up roughly 100 kg of oil, and from that oil 100 kg of plastic could be made instead of only 1 kg from the CO2 in the air. btw: with that pipe they used when showing their "revolutionary invention" (maybe 5 cm or max 10 cm in diameter), they would have a windspeed of 30 km/s (kilometers per second !) or mach 100 (100x the speed of sound).

Even when game mechanics are different from real world mechanics, they should not be the opposite of reality. Maybe on another planet, there is 1000 times more CO2 in the air and we would need only 1000 cubic meters for 1 kg of plastic, and/or maybe we don't have only CO2 in the air, but can filter small particles of coal (soot?) directly. It still would be stretching reality quite a bit to give some explanation for those air cleaner machines, or for generators running with "fuel from thin air". I won't use the air cleaners any longer in my maps, and hope for machines that enable me to use H2 as storage instead (or in addition to) accumulators.
Not to mention that in Factorio terms, "pollution" is everything that is disturbing the natural order of the planet. Emissions, noise, etc. Even if they work in practice, a few gigantic turbines sucking in air to get rid of harmful CO2 emissions will generate so much general disturbance that their effect will be pretty much nullified.
User avatar
thereaverofdarkness
Filter Inserter
Filter Inserter
Posts: 558
Joined: Wed Jun 01, 2016 5:07 am
Contact:

Re: [MOD 0.12.26] KS Power

Post by thereaverofdarkness »

Sean Mirrsen wrote:
Anson wrote:btw: with that pipe they used when showing their "revolutionary invention" (maybe 5 cm or max 10 cm in diameter), they would have a windspeed of 30 km/s (kilometers per second !) or mach 100 (100x the speed of sound).

Even when game mechanics are different from real world mechanics, they should not be the opposite of reality.
Even if they work in practice, a few gigantic turbines sucking in air to get rid of harmful CO2 emissions will generate so much general disturbance that their effect will be pretty much nullified.
Perhaps it is pertinent to consider that for gameplay reasons, the technology is a standalone building, when in real life, the obvious solution would be to fit your air cleaners directly to your exhaust vents. Air cleaning technology really does work, it's just not done as a standalone building.
User avatar
thereaverofdarkness
Filter Inserter
Filter Inserter
Posts: 558
Joined: Wed Jun 01, 2016 5:07 am
Contact:

Re: [MOD 0.12.26] KS Power

Post by thereaverofdarkness »

I did a test with the oil steam boiler to figure out how much power you get from the oil. One steam engine uses 300 steam in exactly 50 seconds when it is running at full output. The oil steam boiler produces 300 steam in 5 seconds, using 30kW during that time, or 150kJ. With 50 seconds of running at 510kW output, it generates 25,500 kJ, subtract the 150 and we get a maximum output of 25.35 MJ for exactly half the oil cost of a single solid fuel. One solid fuel gives 25 MJ, making the oil steam boiler have 200% efficiency over solid fuel. I guess this is to represent both the logistics of using water and the higher tech required in researching the oil boiler.
BlakeMW
Filter Inserter
Filter Inserter
Posts: 954
Joined: Thu Jan 21, 2016 9:29 am
Contact:

Re: [MOD 0.12.26] KS Power

Post by BlakeMW »

thereaverofdarkness wrote:I did a test with the oil steam boiler to figure out how much power you get from the oil. One steam engine uses 300 steam in exactly 50 seconds when it is running at full output. The oil steam boiler produces 300 steam in 5 seconds, using 30kW during that time, or 150kJ. With 50 seconds of running at 510kW output, it generates 25,500 kJ, subtract the 150 and we get a maximum output of 25.35 MJ for exactly half the oil cost of a single solid fuel. One solid fuel gives 25 MJ, making the oil steam boiler have 200% efficiency over solid fuel. I guess this is to represent both the logistics of using water and the higher tech required in researching the oil boiler.
I actually calculate this on page 4 of this thread. When boiling light oil you get 4x the energy compared with turning that light oil into solid fuel and burning the solid fuel. I really cannot think of that as a design decision, an oil boiler is easier and simpler in every way than a solid fuel setup, I consider it plainly and simply an error in the numbers - I like the idea that something was doubled instead of halved (or vice verca) accounting for 4x the efficiency instead of 1x the efficiency.
In contrast the diesel generator is much less efficient than solid fuel, generating only 7.5MW per light oil, compared with 12.5MW as solid fuel - so as it is you would be mad or desperate to resort to the diesel generator. Not requiring any water is nice, but for only 14% the efficiency of the oil burner?
User avatar
thereaverofdarkness
Filter Inserter
Filter Inserter
Posts: 558
Joined: Wed Jun 01, 2016 5:07 am
Contact:

Re: [MOD 0.12.26] KS Power

Post by thereaverofdarkness »

Right. The basic boiler is 50% efficient, while the oil steam boiler is 200% efficient. The burner generator is fine early game if you don't have any water nearby, though you start with steam generator tech and every starting area will (should) have water available. It's 40% efficiency, which isn't much worse than the basic boiler. It's also good for a quick setup or if you're building an expansion in a place that doesn't have water nearby.



Now that I'm aware that the basic boiler is only 50% efficient, I have to note that the electric furnace consumes the same amount of power as the steel furnace, which means it consumes twice as much solid fuel when you're running your power systems on the starter boilers.


I don't know if I'm doing some math wrong, but it looks like the Diesel Generator is running at 36% efficiency. It expends 1 diesel fuel per 30 seconds running a 300kW radar. 1 diesel fuel requires the same components as could be made into 1 solid fuel, which yields 25MJ. At 36% efficiency, it is the least efficient source of solid fuel to power, slightly lower than the burner generator.
BlakeMW
Filter Inserter
Filter Inserter
Posts: 954
Joined: Thu Jan 21, 2016 9:29 am
Contact:

Re: [MOD 0.12.26] KS Power

Post by BlakeMW »

thereaverofdarkness wrote: I don't know if I'm doing some math wrong, but it looks like the Diesel Generator is running at 36% efficiency. It expends 1 diesel fuel per 30 seconds running a 300kW radar. 1 diesel fuel requires the same components as could be made into 1 solid fuel, which yields 25MJ. At 36% efficiency, it is the least efficient source of solid fuel to power, slightly lower than the burner generator.
That's in close agreement with the numbers I determined for the Diesel Generator, 1 light oil -> 7.5MW and 1 Diesel -> 9MW sounds reasonable. But I now know how to calculate what the numbers should be, from the raws:

The calculation is as follows:
The diesel generator is a modified steam engine which like the steam engine consumes any liquid. It is 100x more efficient than a steam engine. It consumes 0.3 fuel/s and the liquid which enters it is set to the the following temperatures by a script:
  • Diesel: 100
  • Light Oil: 100
  • Petroleum: 80
  • Heavy Oil: 60
  • Anything else: 15
The energy capacity is 1kJ per degree above the default temperature of the liquid, which is 25 degrees for all oils, and 15 degrees for diesel fuel. So we can now calculate MJ per fuel and MW (MJ/s) by multiplying that by 0.3:
  • Diesel: (100 - 15) * 100 = 8.5MJ : 2.55MW
  • Light Oil: (100 - 25) * 100 = 7.5MJ : 2.25MW
  • Petroleum: (80 - 25) * 100 = 5.5MJ : 1.65MW
  • Heavy Oil: (60 - 25) * 100 = 3.5MJ : 1.05MW
In my post on page 4, I experimentally derive the actual power output to be 7.5MJ per light oil which is in very close agreement.

Because it's secretly just a steam engine, it is also possible to run a diesel generator at on hot water which lets you get nearly 100x the energy out of hot water as you would with the normal steam engine. But this relies on doing some extremely exploitative things with small pumps to manipulate the setup in just the right way that it consumes hot water without the script getting a chance to cool the water to 15 degrees.

On the general topic of the Diesel Generator, if you fix the Oil Burner to be only as efficient as solid fuel in boilers, then the Diesel Generator is still not great in terms of efficiency - being worse than the burner generator - but it is fantastic in terms of compactness and can be fired up quickly in response to a power shortage - although in 0.13 the power switch will mean backup systems can be kept in a state of full performance readiness and response time wont matter.
Last edited by BlakeMW on Thu Jun 09, 2016 10:21 am, edited 2 times in total.
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5267
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [MOD 0.12.26] KS Power

Post by Klonan »

BlakeMW wrote:
thereaverofdarkness wrote: I don't know if I'm doing some math wrong, but it looks like the Diesel Generator is running at 36% efficiency. It expends 1 diesel fuel per 30 seconds running a 300kW radar. 1 diesel fuel requires the same components as could be made into 1 solid fuel, which yields 25MJ. At 36% efficiency, it is the least efficient source of solid fuel to power, slightly lower than the burner generator.
That's in close agreement with the numbers I determined for the Diesel Generator, 1 light oil -> 7.5MW and 1 Diesel -> 9MW sounds reasonable. But I now know how to calculate what the numbers should be, from the raws:

The calculation is as follows:
The diesel generator is a modified steam engine which like the steam engine consumes any liquid. It is 100x more efficient than a steam engine. It consumes 0.3 fuel/s and the liquid which enters it is set to the the following temperatures by a script:
  • Diesel: 100
  • Light Oil: 100
  • Petroleum: 80
  • Heavy Oil: 60
  • Anything else: 15
The energy capacity is 1kJ per degree above the default temperature of the liquid, which is 25 degrees for all oils, and 15 degrees for diesel fuel. So we can now calculate MJ per fuel and MW (MJ/s) by multiplying that by 0.3:
  • Diesel: (100 - 15) * 100 = 8.5MJ : 2.55MW
  • Light Oil: (100 - 25) * 100 = 7.5MJ : 2.25MW
  • Petroleum: (80 - 25) * 100 = 5.5MJ : 1.65MW
  • Heavy Oil: (60 - 25) * 100 = 3.5MJ : 1.05MW
In my post on page 4, I calculate the actual power output to be 7.5MJ which is in very close agreement.

Because it's secretly just a steam engine, it is also possible to run a diesel generator at on hot water which lets you get nearly 100x the energy out of hot water as you would with the normal steam engine. But this relies on doing some extremely exploitative things with small pumps to manipulate the setup in just the right way that it consumes hot water without the script getting a chance to cool the water to 15 degrees.


I've changed the script for 0.13, along with balancing the oil boiler and making it more script efficient, along with the wind turbines,
Overall the new version will be more heavily optimised for large factories, and really the least efficient part is the burner generator (but you shouldn't be using large numbers of them anyway

The best now is the oil boiler, as it doesn't require any scripting now (fluid temperature can be set in recipe properly)
BlakeMW
Filter Inserter
Filter Inserter
Posts: 954
Joined: Thu Jan 21, 2016 9:29 am
Contact:

Re: [MOD 0.12.26] KS Power

Post by BlakeMW »

Klonan wrote: The best now is the oil boiler, as it doesn't require any scripting now (fluid temperature can be set in recipe properly)
That's awesome. It'll allow all the hot-water mods to work properly regardless of orientation and placement order.
NoriSilverrage
Fast Inserter
Fast Inserter
Posts: 159
Joined: Mon Mar 21, 2016 1:19 pm
Contact:

Re: [MOD 0.12.26] KS Power

Post by NoriSilverrage »

Klonan wrote:
I've changed the script for 0.13, along with balancing the oil boiler and making it more script efficient, along with the wind turbines,
Overall the new version will be more heavily optimised for large factories, and really the least efficient part is the burner generator (but you shouldn't be using large numbers of them anyway

The best now is the oil boiler, as it doesn't require any scripting now (fluid temperature can be set in recipe properly)
That sounds awesome.
So I was screwing around with trying to add mk2 version of the diesel engine and it's not as simple as a copy because of the script. I saw that the petroleum generator gets entered into a global table, but no matter what I tried I couldn't get my copy to do the same unless I just copied your whole script.
Do you know if there is a simple enough way to do this?
chipotng
Burner Inserter
Burner Inserter
Posts: 13
Joined: Thu May 05, 2016 10:16 am
Contact:

Re: [MOD 0.12.26] KS Power

Post by chipotng »

Funny, how the Steam engine with (reallife 16% efficency) is superior to an (reallife 40% efficency) Dieselengine. :lol:
Anson
Fast Inserter
Fast Inserter
Posts: 249
Joined: Sun May 22, 2016 4:41 pm
Contact:

Re: [MOD 0.12.26] KS Power

Post by Anson »

thereaverofdarkness wrote:Perhaps it is pertinent to consider that for gameplay reasons, the technology is a standalone building, when in real life, the obvious solution would be to fit your air cleaners directly to your exhaust vents. Air cleaning technology really does work, it's just not done as a standalone building.
TRUE. Maybe someday someone will write a MOD for some modules which could be inserted into machines, burners and engines/generators, and which would reduce pollution for the cost of a bit more energy usage and/or less effectivity ? Maybe there should even be no additional disadvantage since using such modules already would reduce the number of available slots for the current modules that improve production.

The other problem still remains: how can you produce something useful from that filtered CO2 in a cost-efficient and energy-efficient way ? if there would be any method to do so in the real world, wouldn't big companies (most of all the energy companies that produce tons of CO2 every minute) already have built factories to produce lots of plastic or other things "for free" from that filtered CO2 and make even more profit a second time after already having sold electricity ?
Marc90
Inserter
Inserter
Posts: 39
Joined: Wed Oct 07, 2015 5:42 pm
Contact:

Re: [MOD 0.12.26] KS Power

Post by Marc90 »

Anson wrote:
thereaverofdarkness wrote:Perhaps it is pertinent to consider that for gameplay reasons, the technology is a standalone building, when in real life, the obvious solution would be to fit your air cleaners directly to your exhaust vents. Air cleaning technology really does work, it's just not done as a standalone building.
TRUE. Maybe someday someone will write a MOD for some modules which could be inserted into machines, burners and engines/generators, and which would reduce pollution for the cost of a bit more energy usage and/or less effectivity ? Maybe there should even be no additional disadvantage since using such modules already would reduce the number of available slots for the current modules that improve production.

The other problem still remains: how can you produce something useful from that filtered CO2 in a cost-efficient and energy-efficient way ? if there would be any method to do so in the real world, wouldn't big companies (most of all the energy companies that produce tons of CO2 every minute) already have built factories to produce lots of plastic or other things "for free" from that filtered CO2 and make even more profit a second time after already having sold electricity ?
Why have a mod? There are modules in the game, doing exactly that thing. They are called efficiency modules and they reduce pollution as well as energy usage.

And for the second part: there is no energy-efficient way to do that.
BULIGO
Burner Inserter
Burner Inserter
Posts: 19
Joined: Thu Jun 16, 2016 9:36 am
Contact:

Re: [MOD 0.12.26] KS Power

Post by BULIGO »

Klonan,many thanks for the SUPER useful and fun diesel generator! It found it's place on my 'MUST-mods' list in a splitsecond. I would really hate to play Factorio without it now. Also thanks to Yuoki for his legendary pixelart skills. The model looks awesome and it's little minimalistic animation is cute as well.
Sometimes i just sit and enjoy observing my power chart watching the synergy between solar panels ( i dont use windmills, playing on some 11 years ond XP PC makes me try to avoid non-critical animations, even in 2D), accumulators and diesel generators.. I never use the diesel generator at home ( i prefer the steam power module from 5-dim with it;s tier 2 and 3 boilers/steam engines), only on my outposts/expansions. During the day, the solar panels provide all the energy and charge the accumulators, and during the night the Diesel kicks in and helps to extend the accumulator life. Simply awesome.
A problem: even if the railroad tanker wagon does take diesel fuel, the barreling mod (by Firegrenade) doesnt. And since some of my more distant radar outposts are not connected by rail, the only way i can provide diesel fuel for the generator is to build a line of un-barrelling petroleum gas and light oil, put a chem plant to make diesel fuel and plop down one (some) storage tanks. My XML tinkering skills are very limited, i would be thankful if someone could make the barelling mod accept diesel drums too.
The diesel generator mod + Bergius Process mod is a terrific combo, makes me so eager to squeeze teh bejesus out of all those heaps of coal lying out there :)
Oil burner I don't use since to me it is unthinkable to burn liquid fuel just to make energy with all that coal around me. Liquid fuel is way too precious for er.. launching useless satellites into space for example :lol:
User avatar
thereaverofdarkness
Filter Inserter
Filter Inserter
Posts: 558
Joined: Wed Jun 01, 2016 5:07 am
Contact:

Re: [MOD 0.12.26] KS Power

Post by thereaverofdarkness »

Anson wrote:The other problem still remains: how can you produce something useful from that filtered CO2 in a cost-efficient and energy-efficient way ? if there would be any method to do so in the real world, wouldn't big companies (most of all the energy companies that produce tons of CO2 every minute) already have built factories to produce lots of plastic or other things "for free" from that filtered CO2 and make even more profit a second time after already having sold electricity ?
You can produce CO2 which has industrial uses, but it is inefficient to try to turn CO2 into carbon or plastic products because the molecule has a very low energy state. The CO2 was produced in the first place to gain a lot of energy--you'd have to give up that energy to get rid of it.

If you produce large amounts of CO2, it won't be viable for selling as it'll be too abundant, but it can still be kept inside industrial processes to prevent pollution. You can also pump it into hydroponic farms as the plants within can withstand much higher levels of CO2 than animals can. With very high levels of technology, you can turn to hydrogen fusion for clean energy, and you can use that energy to turn CO2 into clean carbon compounds and oxygen.
Nebbeh
Inserter
Inserter
Posts: 48
Joined: Sat Apr 16, 2016 1:46 pm
Contact:

Re: [MOD 0.12.26] KS Power

Post by Nebbeh »

Hi. Thanks for the modpack. Question tho. I tried the burner generator, seems its producing about 51kw of power, is this correct? seems abit little imo.
User avatar
thereaverofdarkness
Filter Inserter
Filter Inserter
Posts: 558
Joined: Wed Jun 01, 2016 5:07 am
Contact:

Re: [MOD 0.12.26] KS Power

Post by thereaverofdarkness »

Nebbeh wrote:Hi. Thanks for the modpack. Question tho. I tried the burner generator, seems its producing about 51kw of power, is this correct? seems abit little imo.
It should produce a max of 102kw, though it may take 3-5 seconds to max out. It should produce over 51kw almost immediately.
Nebbeh
Inserter
Inserter
Posts: 48
Joined: Sat Apr 16, 2016 1:46 pm
Contact:

Re: [MOD 0.12.26] KS Power

Post by Nebbeh »

thereaverofdarkness wrote:
Nebbeh wrote:Hi. Thanks for the modpack. Question tho. I tried the burner generator, seems its producing about 51kw of power, is this correct? seems abit little imo.
It should produce a max of 102kw, though it may take 3-5 seconds to max out. It should produce over 51kw almost immediately.
Hmm thats odd, I did a test and ran 1 burner on 1 furnace requiring 180kw, but the burner did not go over 51kw at any point..
User avatar
thereaverofdarkness
Filter Inserter
Filter Inserter
Posts: 558
Joined: Wed Jun 01, 2016 5:07 am
Contact:

Re: [MOD 0.12.26] KS Power

Post by thereaverofdarkness »

Could be a mod conflict, though I have no idea what mod would affect it. It's working fine for me. :/
Locked

Return to “Mods”