A controller (402, 502) to operate a hydrothermal cleaning unit and electrostatic precipitation unit to separate water and remove solids from a pre-treated and unfiltered renewable feedstock at a refinery, comprising: a first input/output in signal communication with a flow control valve of a refinery, the flow control valve to combine an amount of a water stream containing water and an amount of a feedstock stream containing a contaminant-rich renewable feedstock and an amount of solids to create a blend of the water, contaminant-rich renewable feedstock, and solids, such that the controller is configured to: determine the amount of the water stream to combine with the feedstock stream, based on a type of contaminant-rich renewable feedstock contained in the feedstock stream; a second input/output in signal communication with a heat exchanger of the refinery, the heat exchanger to heat the blend of the water and contaminant-rich renewable feedstock to a specified temperature, such that the controller is configured to: determine the specified temperature based on a first length of time for a hydrothermal reaction; a third input/output in signal communication with a hydrothermal reactor of the refinery, the hydrothermal reactor to wash contaminants in the contaminant-rich renewable feedstock into the water over the first length of time to generate contaminant-rich water and a pre-treated renewable feedstock, such that the controller is configured to: determine the first length of time based on an amount of contaminants in the contaminant-rich renewable feedstock; and a fourth input/output in signal communication with an electrostatic precipitation unit of the refinery, the electrostatic precipitation unit to separate the contaminant-rich water from the pre-treated renewable feedstock over a second length of time, such that the controller is configured to: determine the second length of time based on the amount of contaminants in the contaminant-rich water and an estimated amount of solids in the pre-treated renewable feedstock, determine an amount of power to provide to the electrostatic precipitation unit to polarize the contaminant-rich water and cause the polarized water to pool at the bottom of the electrostatic precipitation unit, allowing for removal of the contaminant-rich water, and allow, for the second length of time, the amount of solids to settle at a bottom of the electrostatic precipitation unit, the amount of solids to be removed with the contaminant-rich water. a first input/output in signal communication with a flow control valve of a refinery, the flow control valve to combine an amount of a water stream containing water and an amount of a feedstock stream containing a contaminant-rich renewable feedstock and an amount of solids to create a blend of the water, contaminant-rich renewable feedstock, and solids, such that the controller is configured to: determine the amount of the water stream to combine with the feedstock stream, based on a type of contaminant-rich renewable feedstock contained in the feedstock stream; a second input/output in signal communication with a heat exchanger of the refinery, the heat exchanger to heat the blend of the water and contaminant-rich renewable feedstock to a specified temperature, such that the controller is configured to: determine the specified temperature based on a first length of time for a hydrothermal reaction; a third input/output in signal communication with a hydrothermal reactor of the refinery, the hydrothermal reactor to wash contaminants in the contaminant-rich renewable feedstock into the water over the first length of time to generate contaminant-rich water and a pre-treated renewable feedstock, such that the controller is configured to: determine the first length of time based on an amount of contaminants in the contaminant-rich renewable feedstock; and a fourth input/output in signal communication with an electrostatic precipitation unit of the refinery, the electrostatic precipitation unit to separate the contaminant-rich water from the pre-treated renewable feedstock over a second length of time, such that the controller is configured to: determine the second length of time based on the amount of contaminants in the contaminant-rich water and an estimated amount of solids in the pre-treated renewable feedstock, determine an amount of power to provide to the electrostatic precipitation unit to polarize the contaminant-rich water and cause the polarized water to pool at the bottom of the electrostatic precipitation unit, allowing for removal of the contaminant-rich water, and allow, for the second length of time, the amount of solids to settle at a bottom of the electrostatic precipitation unit, the amount of solids to be removed with the contaminant-rich water. determine the second length of time based on the amount of contaminants in the contaminant-rich water and an estimated amount of solids in the pre-treated renewable feedstock, determine an amount of power to provide to the electrostatic precipitation unit to polarize the contaminant-rich water and cause the polarized water to pool at the bottom of the electrostatic precipitation unit, allowing for removal of the contaminant-rich water, and allow, for the second length of time, the amount of solids to settle at a bottom of the electrostatic precipitation unit, the amount of solids to be removed with the contaminant-rich water.