Read Liquid Flow in Pipe?

Place to get help with not working mods / modding interface.
reyome
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Oct 02, 2016 6:45 am
Contact:

Read Liquid Flow in Pipe?

Post by reyome »

Hello all, I've been creating a mod the past several days, and have even got the mod working more-or-less. I've been trying to create a water wheel, to act as an early game clean power source, and the mod works wonderfully... as long as the water is hot. After studying and thinking on the problem, I think I've come up with a solution. Basically I want to read the speed of the flow of in the pipe at the input, and then through some math shenanigans, convert that to a temperature in the FluidBox to power the building. Then at the output, I want to restore the water to default temperature.

Unfortunately, I haven't been able to find a function that reads the speed of the flow in a pipe. Is there one that I've just overlooked, or am I looking at this from the wrong angle entirely?

Any help would be appreciated. Thanks.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Read Liquid Flow in Pipe?

Post by aubergine18 »

As far as I know there's no way currently to get speed of flow.

I assume you're using a steam engine, so hotter water = faster turning wheel?

Do you have any screenshots of where you're up to? A water wheel would be very useful for a mod I'm working on, which is also early game (pre-red tech in fact) to the extent that it uses wooden pipes lol.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Read Liquid Flow in Pipe?

Post by aubergine18 »

Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
reyome
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Oct 02, 2016 6:45 am
Contact:

Re: Read Liquid Flow in Pipe?

Post by reyome »

aubergine18 wrote:As far as I know there's no way currently to get speed of flow.

I assume you're using a steam engine, so hotter water = faster turning wheel?

Do you have any screenshots of where you're up to? A water wheel would be very useful for a mod I'm working on, which is also early game (pre-red tech in fact) to the extent that it uses wooden pipes lol.
Right now the mod is still fairly early in development. But what I've got so far is taking the generator entity type and applying it to an otherwise normal small pump for the buliding size. Ideally the wheel would generate power regardless of temperature, but I understand that's a limitation of the entity type I'm using.

As for screenshots, is what you're asking for?

http://i.imgur.com/sE7R86K.jpg - The water wheels connected to pre-heated water. The four red pumps are my wheels.

http://i.imgur.com/arHwa20.jpg - Each wheel is producing approximately 20kW of power.

http://i.imgur.com/Ynd0Kcm.jpg - The same four wheels, but now connected to cool water. No power is being generated.

As far as the FluidPrototype page goes, I'm not sure. From first glance it looks like a reference page for creating a new type of fluid, which will be handy once I can get the water wheels working.

The Flow Control mod has an "overflow valve" that only works when the pipe is >80% full. That might be a way around the limitation of not being able to measure flow.
Post Reply

Return to “Modding help”