**Experimental setup.** Figure 8a depicts the experimental facility. One sun solar flux, dual head halogen lamp (Luminar WORK, serial 17g 63974), with variable beam angles simulates solar irradiation. The lamp was placed 1m above the evaporating surface. The produced water reservoir was 88 mm in diameter and 120 mm in depth and was insulated with a 20 mm polyurethane foam. Evaporative mass loss of the produced water was measured by a digital scale (Mettler Toledo-MS1003TS/00). The dark evaporation was measured under the same laboratory conditions without solar illumination. The spatial and temporal variabilities in temperature were measured using Type-J thermocouple and IR camera (FLIR 72001). Two iPads were used to record salt precipitation on the evaporating surface. The temperature, humidity, and mass loss were recorded using data acquisition system (Keysight 34970A). All the measured data and iPad videos were transmitted to a PC for further data reductions. Chemical constituents of the produced water were analyzed using SEM/EDS (Thermo Scientific Prisma, 10104).

**Photothermal foam.** A polyurethane disc (80 mm diameter and thicknesses: 3, 5, 10, and 15 mm) was used as the floating photothermal foam. The commercially available (https://www.uline.com) charcoal foam had incomplete cell walls with pores to enable thermo-fluid transport, and the charcoal color increased thermal absorption. Its material composition enabled water absorption and retention, and moderate swelling when saturated with water. The foam was resistant to chemical and photooxidative degradation under prolonged exposure to ultraviolet radiation. The average porosity was 0.952 ± 0.019, pore diameter was 78.13 µm, thermal conductivity was 0.048 to 0.05 ± 1.5% W/mK, and specific heat capacity was 2359 to 2996 J/kg K35. Ninety-six 2.5 mm equally spaced macrochannels were uniformly drilled through the foam using a 3D-printed mold. These channels increased the capillary flow of water and preferential salt transport from the saturated surface to the evaporating surface.

**Produced water.** The produced water was obtained directly from an oilfield midstream water company in the Permian Basin region of the United States. Analytical characterization of the water revealed high level of total dissolved solids, (TDS >200,000 mg/l), which was six times higher than sea water. Furthermore, an elemental analysis of the water samples on mass basis using SEM-EDS showed 38% carbon, 27% iron, 9% sulfur, 3% silicon, 7% sodium and chloride, 3% calcium, and other trace constituents (Al, Mg, Zn, and K). The anions and cations, chloride, sodium, and calcium are predominantly present in produced water with a sublimed strontium, barium, magnesium, bromide, low carbonate, and sulfate36. The presence and spatial variability of organics and inorganics, and the high-level of TDS in produced water is a major technological treatment challenge for beneficial reuse and recycle.

**Thermal circuit.** Figure 8b shows the thermal circuit diagram of the experimental setup. The solar flux illumination arrived at the evaporating surface via convective (\({q}_{cv}^{"})\)and radiative (\({q}_{rad}^{"})\)heat transport. It in turn was used for evaporation (\({q}_{ev}^{"})\), heat conduction (\({q}_{cd}^{"})\)across the foam, and volumetric heating (\({q}_{VH}^{"})\)of the produced water. This is expressed as

$${q}_{cv}^{"}+{q}_{rad}^{"}={q}_{ev}^{"}+{q}_{cd}^{"}+{q}_{VH}^{"}$$

1

where \({q}_{VH}^{"}={q}_{matrix}^{"}+{q}_{SH}^{"}+{q}_{pore}^{"}\); \({q}_{matrix}^{"}\) is heat transfer to the foam material, \({q}_{SH}^{"}\) is the heat transfer to the produced water resulting in temperature change, and \({q}_{pore}^{"}\) is the heat added to the fluid within the foam pore. Assuming negligible \({q}_{pore}^{"}\) and \({q}_{matrix}^{"}\) and rearranging Eq. (1), the energy balance is written as

$$\frac{{h}_{a}\left({T}_{\infty }-{T}_{s}\right) + \epsilon \sigma \left({T}_{\infty }^{4}-{T}_{s}^{4}\right)}{Δ \delta }={\frac{{\rho }_{pw}\dot{e}{L}_{pw}}{Δ h}+k{\nabla }^{2}{T}_{s}\left(\varvec{r},t\right)+\left(\rho {C}_{p}\frac{DT}{Dt}\right)}_{pw}$$

2

where\(\sigma\) is the Stefan-Boltzmann constant (5.67 × 10 − 8 W/m2K4), \(\epsilon\) is surface emissivity, \({T}_{\infty }\) is the ambient temperature in Kelvins, ha is the convective heat transfer coefficient to air in W/m2K, Cp is the heat capacity in J/kg, k is the thermal conductivity in W/mK, \(\rho\) is the density (kg/m3 ), Lpw is the latent heat of vaporization of the produced water (2450 J/kg), \(\dot{e}\) denotes the evaporation rate in m/s, and \(Δ \delta\) represents a penetrating depth for radiation, convection, and latent heat fluxes, pw is the produced water. The temporal and spatial evolution of the evaporation rate can be described as a function of surface temperature for constant thermophysical properties of h, Cp, K, \(Δ \delta\), and \(\rho\) as

$$\dot{e}=\frac{Δ h}{{\rho }_{pw}{L}_{pw}}\left\{\frac{\epsilon \sigma \left({T}_{\infty }^{4}\left(\varvec{r},t\right)-{T}_{s}^{4}\left(\varvec{r},t\right)\right)+{h}_{a}\left({T}_{\infty }\left(\varvec{r},t\right)-{T}_{s}\left(\varvec{r},t\right)\right)}{Δ \delta }- {K}_{eq,}{\nabla }^{2}{T}_{s}\left(\varvec{r},t\right)-{\left(\rho {C}_{p}\frac{DT\left(\varvec{r},t\right)}{Dt}\right)}_{pw}\right\}$$

3

Equation 3 illustrates that minimizing the volumetric heating and conduction losses enhance the evaporation rate. Analytical or numerical solution to Eq. (3) requires knowledge of ha, \(Δ \delta\), \({T}_{s}\left(\varvec{r},t\right)\), \({T}_{pw}\left(\varvec{r},t\right)\), and the effect of salt transport and precipitation in the pore and on the foam surface. Hence, it will require experimental measurements.

**Produced water flow.** The flow of produced water through the foam is described by the Hagen-Poiseuille equation as \(Q=Δ P{\pi r}^{4}/8\mu {L}_{c}\), where Q is the flow rate in the throat that connects the foam pores, \(Δ P=2\sigma /r\) is the pressure difference between the saturated and evaporation surface, r is the pore radius, \(\sigma\) is the surface tension, \(\mu\) is the dynamic viscosity, and \({L}_{c}\) is the pore length or foam thickness. The capillary pressure gradient driving the produced water flow to the evaporating surface must exceed the gravitational head and viscous losses along the flow path with the pore length. The Hagen-Poiseuille equation has been used by researchers to describe fluid flow through a porous media 37.

**Salt rejection.** During evaporation from the saturated foam, convection induced by capillary flow transports salt toward the evaporation surface while diffusion tends to spread the salt homogenously on the surface. The resulting interplay between convection and diffusion affects the dynamics of salt distribution on the foam surface. This is commonly described by the Peclet number Pe (ratio of convection to diffusion transport). Both mechanisms are related by the Peclet number, Pe, the ratio of advection to diffusion, and is expressed as \({L}_{c}\) × u/ α. Where u is the velocity, and α is the diffusivity. The diffusivity of salt in water (αs ~ 10− 9 m2s− 1) is two orders of magnitude lower than that of water vapor in the air (αw ~ 10− 5 m2 s− 1) resulting in corresponding differences in Peclet numbers and increased mass transport of salt across the foam characteristic length. When Pe > > 1, advective mass flow of the ions is dominant, hence salt will accumulate on the foam evaporating surface.

**Experimental Procedure.** The foam was saturated in distilled water for approximately two hours to degasify entrapped air, thus, enhance water absorption and flow through the pores. The foam was dewatered and placed in the 500 ml produced water reservoir. Thermocouples were attached to the foam in r, \(\theta ,\) and z directions. Additional thermocouples were used to measure ambient, bulk water, and the solar simulator surface temperatures. All the thermocouples were connected to three 20-channel multiplexers embedded in a Keysight data acquisition system (DAQ). The DAQ and precision digital mass balance scale was connected to the computer via an RS232 and USB cable, respectively. The iPads monitored and recorded the dynamics of salt formation and progression patterns of the salt precipitation fronts. A total of 23 experiments were conducted. This included triplicates for the control (produced water without foam), 3mm, 5mm, 10mm, and 15mm thick foams. The average evaporation operation was 15 hrs. All tests were conducted under standard laboratory conditions.