This is my first post on the forum. I looked through other posts but couldn't find exactly what I needed.
I'm creating yet another energy creation mod, with a few very simple additions to vanilla Factorio. One particular building I need to create is similar to a boiler and a chemical plant. The building will take two solid input materials and a single 15 degree water input, and will output a single solid material and hot water at 100 degrees. It takes Thorium plate, Fluoride salt and water and produces Plutonium pellets and hot water, so maybe you can guess what the mod does

So far I have just copied the chemical plant prototype from the base model and modified that to use my special recipe, which works fine. The problem is I don't understand how water temperature is changed. I figure I just need to take whatever makes a boiler a boiler and add that to my custom chemical plant.
I've looked at the base boiler code as well as a few mods out there that do custom boilers and it looks like the action is in control.lua, like in the oil boiler mod for example. I don't really understand what is going on here though. Could someone break down the things that need to happen to change a liquids temperature? I would like it to be simply x units of cold water go in and x units of hot water comes out.
Thanks in advance!
Josef