Energy Generation Mod (Help with Boilers)!

Place to get help with not working mods / modding interface.
Walden Prescot
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun May 31, 2015 5:31 pm
Contact:

Energy Generation Mod (Help with Boilers)!

Post by Walden Prescot »

Hello all,

I was hoping to get some pointers as to how exactly Factorio codes for boilers. My hope is that the code dealing with boilers is handled in a hitherto unexposed .lua file as opposed to the C++ source. If my wishful thinking is incorrect would it be possible to have access to either the source or in future updates add several additional parameters exposed to lua?


I find the massive solar arrays rather boring: Once construction robotics, solar arrays, and accumulators are researched, power production becomes a non-factor.

Basically what I intend to do in my mod is introduce new methods of power generation. And, as a part of that process, increase the maximum temperature of the fluid "water" from 100 deg C to something much higher. The "water" at higher temperatures would simulate steam under very high pressures. While increased temperature allows for the transfer of additional energy, exceeding a certain threshold will cause pipes and other equipment to burst (blow-up). I introduced a lua script which checks the temperature for all pipes, steam engines, and storage tanks. If the temperature gets too high, the object will explodes. While this is all fine and dandy, I have hit something of a wall: Boilers continue to heat whatever liquid is in them to the very maximum temperature of the fluid. Hence the need to control how boilers work.

Eventually, I would like to have direct control over boilers via the red/green circuits, but as a default I would like the boilers to automatically turn off when they reach 100 deg C.


As a part of my new energy generation scheme, I would like to include new power sources such as nuclear reactors and larger, more efficient boilers. The advanced boilers would be a great mid game energy solution and the nuclear reactors and solar panels (power output diminished) would be excellent end game options.



The advanced boiler and nuclear reactor would have very high energy generation necessitating the use of fluids other than water to carry the energy away from the plant. Therefore I would use heat exchangers to transfer the enthalpy to water for use in steam turbine engines. These turbines would not destroy the water but would merely convert a portion of the heat into electrical energy so a small electric pump would be required to circulate the water/steam.

For early power generation, steam engines and boilers would be sufficient. However, standard boilers are very inefficient. One thing which could be done to improve the power generation is preheating the water with solar collectors (already implemented in the mod). My mod already has solar collectors which combine the time of day and the current temperature of the water to calculate an efficiency parameter. Its fluid box heats accordingly. While these solar collectors are not efficient (temperature maximums) for actually generating sufficiently hot water for the power plant, they would serve as pre-warmers for the boilers.

I would also like to implement a thermometer which outputs the current temperature as an item and broadcasts it to the red/green circuit network. To prevent pipe bursts, diversion valves and exhausts would also need to be implemented. I was also thinking that the advanced boilers would pipe out their pollution (as a new fluid). This pollution could either be exhausted to the environment or "scrubbed" using an assembler with coal.
Degraine
Filter Inserter
Filter Inserter
Posts: 282
Joined: Wed Aug 13, 2014 10:49 am
Contact:

Re: Energy Generation Mod (Help with Boilers)!

Post by Degraine »

A lot of what you want to do isn't really possible unless you script it, and it sounds like certain things (such as bursting pipes, which I don't approve of for the same reason I hated breaking machines in Industrialcraft) would be prohibitively expensive to do. Atomic Power (it has its own subforum now) does some of the things you're talking about, like heat exchangers, but it's unreliable and not multiplayer-safe at the moment. For multiple fluid outputs take a look at Oil Steam Boilers, or even the vanilla chemical plant. Both of those are good examples. Temperature sensing, I recommend checking out Smart Circuit Systems, and possibly waiting for 0.12, since that's going to implement a bunch of sensors and fluid temperature will probably be among them.
Post Reply

Return to “Modding help”