Electricity: Three Phase AC & Grid Distribution
Posted: Tue Nov 28, 2023 10:58 pm
Hi, new here and new to modding Factorio/in general, so maybe there's an idea here or maybe there isn't!
Preface - I've looked through existing mods, fluidic power, transformer/high voltage/low voltage offerings and didn't see the exact electricity overhaul I've been thinking about.
I've looked at the prototype & API documentation and had a mess around with Lua to start familiarisation so I have a very patchy understanding, but wish to see if my ideas have any feasibility.
So, the idea.
- AC power (sinusoid) rather than the mysterious perfect supply in vanilla.
- Include frequency matching requirements (with turbine damage/blackouts/factory damage if ignored)
- Maybe include grid isolation (circuit breakers) to handle factory power-up from a blackout (prevention of turbine stall/frequency drop from factory start-up)
- Maybe consider current limits (and damage if current in power poles are exceeded)
My thinking is to create three fluids (phases) (labeled a, b, & c) and have power plants attempt to generate a contribution to the fluid flow rate (the current) in each of those phases. Each phase would have an accompanying scalar describing the phase angle, and the summation of these can interfere (constructively or destructively). This data would ideally be in the electrical network GUI and you could graph the phase amplitudes.
Some things I've been thinking that might be show-stoppers:
- the need for 'negative fluids' or some phase-cancelling maths to determine resultant amplitude.
- maybe fluids aren't the way to go, and instead storing local variables could work?
- the local maths on turbine inertia, frequency etc. affecting UPS.
- the graphing GUI and how to manipulate fluids into the electric grid readout.
There are probably a lot more but any thoughts/input/advice from experienced modders/community members would be very appreciated! Would be awesome to have a real-grid style power distribution system where real consequences of adding new turbines or not managing your grid could exist!
Thanks in advance and thank you for reading.
A
Preface - I've looked through existing mods, fluidic power, transformer/high voltage/low voltage offerings and didn't see the exact electricity overhaul I've been thinking about.
I've looked at the prototype & API documentation and had a mess around with Lua to start familiarisation so I have a very patchy understanding, but wish to see if my ideas have any feasibility.
So, the idea.
- AC power (sinusoid) rather than the mysterious perfect supply in vanilla.
- Include frequency matching requirements (with turbine damage/blackouts/factory damage if ignored)
- Maybe include grid isolation (circuit breakers) to handle factory power-up from a blackout (prevention of turbine stall/frequency drop from factory start-up)
- Maybe consider current limits (and damage if current in power poles are exceeded)
My thinking is to create three fluids (phases) (labeled a, b, & c) and have power plants attempt to generate a contribution to the fluid flow rate (the current) in each of those phases. Each phase would have an accompanying scalar describing the phase angle, and the summation of these can interfere (constructively or destructively). This data would ideally be in the electrical network GUI and you could graph the phase amplitudes.
Some things I've been thinking that might be show-stoppers:
- the need for 'negative fluids' or some phase-cancelling maths to determine resultant amplitude.
- maybe fluids aren't the way to go, and instead storing local variables could work?
- the local maths on turbine inertia, frequency etc. affecting UPS.
- the graphing GUI and how to manipulate fluids into the electric grid readout.
There are probably a lot more but any thoughts/input/advice from experienced modders/community members would be very appreciated! Would be awesome to have a real-grid style power distribution system where real consequences of adding new turbines or not managing your grid could exist!
Thanks in advance and thank you for reading.
A