From what I understood about fluids in the game, the fluid flow model relies on the difference in levels between adjacent pipe segments.
I got an idea to model somewhat more realistic fluid flow model based on pressure / viscosity of the liquid (or gas).
As I am not very familiar with the game API, I want to ask if it's even possible to mod at all?
My goal is to enable efficient way to transport liquids over long distances through pipes (not by train/barrels) by introducing pressure.
Fluid pressure / viscosity?
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Fluid pressure / viscosity?
Not as far as I know, that sort of thing is pretty much internal, and not really open to being modified.
But that's what the pumps are for.
But that's what the pumps are for.
Re: Fluid pressure / viscosity?
Pumps can boost the pressure, but if you want to alter viscosity, it is a property of the fluid itself. So it is possible to set different flow rates for gases/liquids. I believe vanilla factorio has those values set to the same amount gamewide though... which is odd, steam should flow much easier then heavy oil.
- Ranakastrasz
- Smart Inserter
- Posts: 2173
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: Fluid pressure / viscosity?
I think they tried, or at least someone did, and it had rather wierd results due to how the fluid simulation works. It wasn't ideal, so they reverted it.Aeternus wrote:Pumps can boost the pressure, but if you want to alter viscosity, it is a property of the fluid itself. So it is possible to set different flow rates for gases/liquids. I believe vanilla factorio has those values set to the same amount gamewide though... which is odd, steam should flow much easier then heavy oil.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: Fluid pressure / viscosity?
Current fluid mechanics is based on a flow to energy factor(FTE), a pressure to speed factor(PTS) and a base area (BA). The FTE and PTS factors are fluid defined where the BA is pipe defined. There is also a base elevation factor, but we ARE "in Kansas" and the elevation remains constant. You could mess around with the FTE and PTS factors but they are not independent and messing with them can give you undefined behavior. In fact, the base area is also not an independent variable, but currently works as long as you don't go less than a base are of 1.0 for any pipes you implement.
You could try :
FTE = 0.599 and PTS = 0.4 ---OR--- FTE = 0.59 and PTS = 0.409 for a less viscous material. The breaking point is (1 - FTE) / PTS > min(BA).
Of course all this is moot since the fluid implementation is going to be greatly changed in the near future. I think Wube is looking to collect all of the fluid boxes into its own Array structure and deal with each pipe line as a junction to junction system instead of a stepwise tile by tile system.
You could try :
FTE = 0.599 and PTS = 0.4 ---OR--- FTE = 0.59 and PTS = 0.409 for a less viscous material. The breaking point is (1 - FTE) / PTS > min(BA).
Of course all this is moot since the fluid implementation is going to be greatly changed in the near future. I think Wube is looking to collect all of the fluid boxes into its own Array structure and deal with each pipe line as a junction to junction system instead of a stepwise tile by tile system.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Fluid pressure / viscosity?
that was me.Ranakastrasz wrote:I think they tried, or at least someone did, and it had rather wierd results due to how the fluid simulation works. It wasn't ideal, so they reverted it.
Making the fluids thicker, so that they don't flow as easily works fine, but when you try to make a fluid flow easier, it creates an effect where the fluid ripples back and forth along the pipe.
Re: Fluid pressure / viscosity?
Only if you go too far with it. Fluid tries to flow from high pressure to lower, to all adjacent tiles it connects to with different pressure. You only get the wave effect if the amount of fluid transferred ends up being more then half of the pressure difference - when that happens, the next tick the stuff flows back into the "vacuum" left behind by the flow. If the flow is less then half the pressure difference, then the oscillation will still occur, but is dampened each tick until smoothed out.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Fluid pressure / viscosity?
which pretty much means that whatever the current settings are is already configured for the best flow without breaking anything.