Page 1 of 1

Temperature dependant recipes?

Posted: Thu May 04, 2017 3:26 pm
by bobingabout
I've got looked into this before, but is it possible to have a recipe that demands the temperature of a fluid be a certain temperature? So, for example, Steam, rather than water? (Steam is just Water with a temperature above 100 degrees)
Or define temperature on the result, so you could have a recipe that makes steam?

Re: Temperature dependant recipes?

Posted: Thu May 04, 2017 3:57 pm
by Aeternus
From the recipy for the Steam Engine, defined in Entities.lua:

Code: Select all

 {
    type = "generator",
    name = "steam-engine",
    icon = "__base__/graphics/icons/steam-engine.png",
    flags = {"placeable-neutral","player-creation"},
    minable = {mining_time = 1, result = "steam-engine"},
    max_health = 400,
    corpse = "big-remnants",
    dying_explosion = "medium-explosion",
    effectivity = 1,
    fluid_usage_per_tick = 0.5,
    maximum_temperature = 165,
**snip**
    fluid_input =
    {
      name = "water",
      amount = 0.0,
      minimum_temperature = 100.0
    }
Suggests you can set a minimum temperature for water to be used in recipies, along with a maximum that the particular entity will be able to handle. I assume that the temperature properties apply to each fluid as part of their data model - so yea, I think you can use the temperature property in your recipies. Boilers/heat exchangers simply take a fluid plus fuel and output a fluid with a higher temperature.

[Edit] And if you want to create boilers that have a different max temperature, there's the "target_temperature" value in the boiler. Dunno what you're planning to do with this...

Re: Temperature dependant recipes?

Posted: Fri May 05, 2017 7:58 am
by bobingabout
I knew about those tags, but just thought they were part of specific boiler/steam engine logic.

what I actually want to do is a recipe, like in an assembling machine. In this case it could be taking Lithia water in, and giving Lithium Chloride and water with a high temperature out to make it steam.

The other one was a condenser recipe that would take steam and create pure water (change the water type from "water"/"lithia-water" to "pure-water"), but since I specifically want steam, it needs to be temperature dependant.

These would all be done in an assembling machine or furnace type entity. (Furnace and Assembling machine are pretty much the same internally, the only difference is that furnace automatically chooses the recipe based on the ingredient you put in, where assembling machine requires you specify the recipe)

Re: Temperature dependant recipes?

Posted: Fri May 05, 2017 8:52 am
by Klonan
Yes it is possible, you just need to specify a minimum or maximum temperature in the recipe,

However this information about the temperature isn't shown to the player anywhere, so it will just show that the recipe needs water, but not that it needs water at 100 degrees

Also we will be changing steam to its own fluid very soon, to solve everything with circuit network, virtual signals, usage in recipes etc.

Re: Temperature dependant recipes?

Posted: Fri May 05, 2017 10:40 am
by bobingabout
Klonan wrote:Yes it is possible, you just need to specify a minimum or maximum temperature in the recipe,

However this information about the temperature isn't shown to the player anywhere, so it will just show that the recipe needs water, but not that it needs water at 100 degrees

Also we will be changing steam to its own fluid very soon, to solve everything with circuit network, virtual signals, usage in recipes etc.
Steam being it's own fluid would make things easier to do. But thanks for that information, very useful to know.

Re: Temperature dependant recipes?

Posted: Fri May 05, 2017 10:25 pm
by Aeternus
How will Steam and Water intermingle? I can see a potential problem with the Heat Exchanger, which can take steam heated from standard boilers for the neat 1.8MW + 4MW sum to fully utilize a Turbine. If those fluids are different, how will the Heat Exchange work with existing low energy steam and Water, especially if you've got a system that switches between the two based on load and/or nuclear fuel availability?

[Edit] Also, the energy on the fluids from heating, will that become available to the structure doing the recipy, much like a steam engine - and reduce power draw? I'm kinda curious where that heat energy goes, if anywhere...

Re: Temperature dependant recipes?

Posted: Sat May 06, 2017 1:44 am
by bobingabout
Just keep in mind when making steam it's own fluids... Allow for boiler inputs to be an ARRAY!!! So that I can add different kinds of water (Water, Lithia water, Salt water, Pure water) to be able to become steam.
You can then, as pointed out by Aeternus, have Water and Steam on the array of the heat exchanger by default.

Re: Temperature dependant recipes?

Posted: Sat May 06, 2017 12:04 pm
by Fatmice
Aeternus wrote:How will Steam and Water intermingle? I can see a potential problem with the Heat Exchanger, which can take steam heated from standard boilers for the neat 1.8MW + 4MW sum to fully utilize a Turbine. If those fluids are different, how will the Heat Exchange work with existing low energy steam and Water, especially if you've got a system that switches between the two based on load and/or nuclear fuel availability?

[Edit] Also, the energy on the fluids from heating, will that become available to the structure doing the recipy, much like a steam engine - and reduce power draw? I'm kinda curious where that heat energy goes, if anywhere...
The two fluid likely won't mix such that the boiler and heat exchanger will work on one type at a time.

Currently, liquid_input property does not accept an array of fluid types... So I guess they will make liquid_input={{name="water", amount=0, minimum_temperature=15},{name="steam", amount=0, minimum_temperature=100}}

I doubt they will transparently allow removing heat from the input source to power the entity. The only entity that removes heat from its input is the generator type and they destroy the input. Assembler type can use heat as an energy source but I've yet to try and make one hookup to a heat pipe.