Introduction

Sustainable clean water resources1,2 and stable energy supply3 have become a pressing requirement due to population growth4,5,6, industrialization and global climate change7,8. To reduce environmental degradation, address climate change, and promote long-term stable social development, it is crucial to implement strategies for sustainable development. Solar energy, as a sustainable and clean energy source, playing a crucial role in mitigating climate change and reducing air pollution,9,10,11 thus propelling the development of human society. Among the various forms of solar energy conversion, photothermal conversion technology has emerged as a cost-effective solution for desalination and wastewater treatment12,13,14. Interfacial solar steam generation (ISSG)15 utilizes photothermal conversion materials to confine thermal energy at the air-liquid interface, enabling continuous water transfer to the evaporating surface for stable evaporation. Numerous photothermal conversion materials, including carbon-based materials16,17, inorganic semiconductors18,19, polymer materials20,21 and metals22,23, have been developed for efficient ISSG systems. Typically, these photothermal materials are integrated with substrate materials to construct evaporation devices, such as fibrous membranes24,25, aerogels26,27, hydrogels28,29, and biomass-based materials30,31. Highly efficient systems of solar desalination can be achieved by rationally optimizing the functional groups of photothermal materials and the structure of substrate materials.

Among various substrate options, fibrous membranes stand out due to their high porosity and surface area, which facilitate water transport and evaporation. Their porous structure also enables the easy incorporation of photothermal materials, significantly enhancing their photothermal conversion efficiency. Furthermore, fibrous membranes are easy to fabricate, enabling large-scale production. Although these membranes are self-buoyant and can act as photothermal evaporators, the limited water transport channels cause salt accumulation on the evaporating surface. This not only hinders solar energy absorption but also clogs water transport pathways, significantly reducing the efficiency of steam generation32. Current salt-resistant strategies include the design of hydrophilic/hydrophobic structure33, the modulation of porous structure34 and the incorporation specific ionic groups. The integration of polyelectrolytes35,36 and zwitterionic materials in evaporators can effectively mitigate salt accumulation.

Polyionic liquids (PIL) can attract Na+ and Cl in brine via electrostatic interactions, thereby preventing their aggregation into salts at the evaporation interface37,38. Salt-resistant designs based on anti-polyelectrolyte effects have been reported, but the salt-resistance properties of PILs remain underexplored. Theoretically, PIL can regulate water molecules and ions via intermolecular electrostatic interactions, ensuring water flow is unaffected by salt ions even in high-salinity environments. Additionally, due to their charge distribution, PIL exhibit anti-biofouling properties, effectively preventing the attachment of bacteria, algae, and other microorganisms on the surface. This is crucial for the long-term use of ISSG evaporators in natural settings, as it reduces the need for cleaning and maintenance. In contrast, traditional polyelectrolytes are more susceptible to biofouling or adsorption over time, leading to the degradation of performance. Moreover, to utilize the low-grade heat generated during the evaporation process, thermoelectric devices39,40 can be designed to recover this energy, thereby preventing heat dissipation into the bulk water and maximizing solar energy utilization efficiency41,42,43,44,45.

In this work, a photothermal zwitterionic fibrous membrane is fabricated using electrospinning and in-situ oxidative polymerization for solar-driven water evaporation. The fibrous membrane incorporates porphyrin-based conjugated microporous polymers as the photothermal conversion material, enhancing antibacterial properties to prevent bacterial attachment. PILs are introduced as the anti-salt component, with their hydrophilic groups further reducing evaporation enthalpy and improving photothermal efficiency. To optimize the utilization of solar energy, a thermoelectric module is integrated for storing electricity. Notably, the system can release stored energy in the absence of sunlight, sustaining continuous operation of electronic devices and facilitating the co-production of heat, water, and electricity.

Results

Aquaporins46,47 are highly selective transmembrane proteins that facilitate the bidirectional flow of water across cell membranes by forming narrow, curved channels. As water molecules pass through these channels, they align in a single row then traverse a narrow and curved passage, where internal dipole interactions and polarity facilitate the rotation of water molecules to pass through at an appropriate angle, while blocking other ions. Inspired by this mechanism, a photothermal zwitterionic fibrous membrane (PCP/PIL@PAN-M) was fabricated by integrating porphyrin-based conjugated microporous polymers (PCP) and polyionic liquids (PIL) into electrospun polyacrylonitrile (PAN) membranes via in situ oxidative polymerization (Fig. 1). Mimicking the functionality of aquaporins, the porous membrane enables rapid water transport, while zwitterionic PIL form selective channels that hinder the migration of Na⁺ and Cl. Additionally, PCP imparts photothermal conversion property and generates singlet oxygen (1O2) under light exposure, offering antibacterial properties.

Fig. 1: Schematic representation of the photothermal zwitterionic fibrous membrane.
figure 1

A salt-resistant photothermal membrane for seawater desalination, inspired by the function of aquaporins in biological cell membranes.

Firstly, the ionic liquid (IL) was prepared through quaternization, and then PIL was obtained via free radical polymerization reactions (Fig. 2a). PCP was synthesized via the Alder-Longo reaction48 and the oxidative polymerization (Fig. 2b and Figs. S12). Figure 2c and Figure S3 show the structural characterization of IL and PIL. The peak positions and peak areas in NMR were consistent with the structural features of IL and PIL. The gel permeation chromatography (GPC) chromatogram shows the polydispersity index (PDI) of 1.08628, indicating a homogeneous distribution of PIL, and the molecular weight of 46,276 g mol−1 matched the molecular structure of PIL. PIL remained electrically neutral under neutral conditions (Figure S4), which prevents electrostatic interaction with PCP, avoiding phase separation. The above characterizations confirmed the successful synthesis of PIL.

Fig. 2: The synthesis and characterization of PIL and PCP.
figure 2

a The synthetic process of PIL. b The synthetic process of PCP. c The 1H NMR spectrum of PIL, 1H NMR (400 MHz, Deuterium Oxide) δ 9.02 (t, J = 1.7 Hz, 1H), 7.73 (t, J = 2.0 Hz, 1H), 7.56 (t, J = 1.9 Hz, 1H), 7.08 (dd, J = 15.6, 8.7 Hz, 1H), 5.74 (dd, J = 15.6, 2.8 Hz, 1H), 5.36 (dd, J = 8.7, 2.8 Hz, 1H), 4.35 (t, J = 7.2 Hz, 2H), 2.88 (dd, J = 8.2, 6.6 Hz, 2H), 2.28 (p, J = 7.3 Hz, 2H). d The FTIR image of PCP and CB. e The Mott-Schottky curves of PCP. f The N2 adsorption/desorption curve and nonlocal density functional theory images of PCP. g The absorbance of PCP in the wavelength range 200-1400 nm (comparison with AM1.5 standard solar spectrum). h The surface temperature variation curve and the maximum temperature image of PCP at 1 kW m−2.

Scanning electron microscopy (SEM) and transmission electron microscopy (TEM) were used to characterize the morphology of PCP, where PCP showed an aggregation of nanoparticles (30-100 nm), and micrometer-scale holes among the spherical particles (Figure S5). Figure 2d shows the Fourier transform infrared (FTIR) spectra of PCP and carbazole benzaldehyde (CB). CB showed the characteristic peaks of 1700 cm−1 (C = O stretching vibration) and 920 cm−1 (C-H bending vibration), both of which disappeared in PCP. In addition, PCP showed the characteristic peaks at 800 cm1 and 2300–2400 cm−1, which were assigned to the bending vibration of the C-H group and the vibration of the N-H group, respectively49. These observations, along with nuclear magnetic resonance (NMR) spectroscopy (Figure S6) and X-ray photoelectron spectroscopy (XPS, Figure S7), confirmed the successful polymerization between CB and pyrrole. Figure S8 shows the X-ray diffraction (XRD) image of PCP, suggesting its amorphous feature. Figure S9a shows the Tauc plots of PCP, from which the energy band gap was calculated to be 1.18 eV. To further investigate the energy band structure of PCP, the conduction band (CB) and valence band (VB) were determined using Mott-Schottky plots, which were 0.93 eV and −0.25 eV, respectively (Fig. 2e). As a semiconductor material, PCP adopts a mechanism of jumping energy level for photothermal conversion, and a narrower energy band gap is preferred for its absorption of sunlight. The porous structure of PCP was characterized using the N2 adsorption/desorption isotherms, and the pore size distribution of PCP was analyzed using the nonlocal density functional theory (NLDFT) (Fig. 2f). The specific surface area of PCP based on the Brunauer-Emmett-Teller (BET) mode was 828 m2 g−1. Moreover, PCP showed a large proportion of micropores ( < 2 nm) according to the pore size distribution (Fig. 2f inset). The rich porous structure allows light to be reflected and refracted several times within the pores, promoting the ability of light absorption. The absorption capacity is a key parameter for assessing the efficiency of photothermal conversion performance. Figure 2g shows the absorbance of PCP in the UV-visible region, that derived from the UV-visible absorption spectra (Figure S9b). Compared to the AM1.5 standard solar irradiation, PCP showed a high absorbance ( ~ 92 %) in the range of 200–400 nm, verifying its property of light absorption. Under 1 sun illumination, PCP showed a rapid temperature rise to 83 °C within 10 min (Fig. 2h), making it suitable for applications of photothermal evaporators.

CP (as a photothermal material) and PIL (as a salt-resistant material) were mixed to form a spinning solution to produce fibrous membrane with CP and PIL (CP/PIL@PAN-M). CP was then converted to PCP using in-situ oxidative polymerization to obtain PCP/PIL@PAN-M (Fig. 3a). (PAN-M: Pure PAN nanofibrous membranes) PCP/PIL@PAN-M with an optimized mass ratio of PCP: PAN: PIL (1:1:1) exhibited the best performance of photothermal conversion, which reached a surface temperature of 55.7 °C during evaporation under one 1 sun irradiation for 30 min, and achieved an evaporation rate of 2.64 kg m−2 h−1 (Figure S10). Moreover, the fiber diameter and the thickness of PCP/PIL@PAN-M were optimized to be ~ 680 nm and ~ 150 μm, respectively (Figure S11). Figure 3b-d show the SEM images of PAN-M, PCP@PAN-M and PCP/PIL@PAN-M. Compared to pure PAN-M, PCP@PAN-M and PCP/PIL@PAN-M exhibited a rougher surface, which is attributed to the coverage of PCP nanoparticles and PIL. Furthermore, the nanofibers in PCP/PIL@PAN-M had a larger diameter ( ~ 680 nm) compared to pure PAN-M ( ~ 250 nm) and PCP@PAN-M ( ~ 620 nm). Figure 3e shows the elemental mapping analysis images, which reveals the uniform distribution of characteristic elements (C, N, O and S). Figure 3f shows the TEM images of PCP/PIL@PAN-M, which suggests a homogenous distribution of PCP and PIL within the nanofibers. Notably, PCP particles and PIL were uniformly distributed across all scales of the nanofiber (Fig. 3f and Figure S12). This contrasts with the conventional in situ growth methods after electrospinning process, where functional particles were usually coated on the surface of nanofibers50. The uniform distribution is expected to enhance light absorption by the microporous structure of PCP and improve the salt resistance performance of PIL. The S 2p XPS spectrum of PCP/PIL@PAN-M also reveals the successful loading of PIL (Figure S13)51. The hydrophilic groups in PIL endowed PCP/PIL@PAN-M with wettability. PAN-M exhibited a contact angle of 67.2° and remained unwetted by water. With the addition of PCP and PIL, PCP/PIL@PAN-M showed better hydrophilicity (contact angle: 42°) and was fully wetted within 10 s (Fig. 3g). The hydrophilicity of the fibrous membrane promotes the water transport capacity during photothermal evaporation, which further contributed to the photothermal evaporation performance.52 The specific surface area of PCP/PIL@PAN-M based on the BET mode was 30 m2 g−1, and PCP/PIL@PAN-M displayed a large percentage of microporous structure53, which is ascribed to the loading of PCP and facilitates the absorption of light (Fig. 3h). Compared with PAN-M, PCP/PIL@PAN-M possessd superior light absorption properties, reaching up to 95% in the UV-visible region (Fig. 3i, Figure S14), this ensures the superior performance of photothermal conversion of PCP/PIL@PAN-M. Figure 3j shows the thermogravimetric analysis (TGA) curves of PAN-M, PCP@PAN-M and PCP/PIL@PAN-M fibrous membranes, and their weight loss at 300 °C is only 3%. Meanwhile, PAN-M exhibited a faster weight loss compared to PCP@PAN-M and PCP/PIL@PAN-M after 300 °C, demonstrating the enhanced thermal stability of PAN-M with the addition of PCP and PIL.

Fig. 3: Preparation and characterization of photothermal zwitterionic fibrous membrane.
figure 3

a The preparation process of photothermal PCP/PIL@PAN-M. The SEM images and diameter distribution images of (b) PAN-M, (c) PCP @PAN-M and (d) PCP/PIL@PAN-M. Three times each experiment was repeated independently with similar results. e The elemental analysis image of PCP/PIL@PAN-M. f The TEM image and the cross-section images of PCP/PIL@PAN-M. g The water contact angle images of PCP/PIL@PAN-M and PAN-M. Three times each experiment was repeated independently with similar results. h The N2 adsorption/desorption curves with inserted pore size distribution of PCP/PIL@PAN-M. i The UV-Vis absorptivity of PCP/PIL@PAN-M. j The TGA patterns of different photothermal membranes.

Figure 4a shows the schematic diagram of the set-up for evaporation performance testing. Before assembling the PCP/PIL@PAN-M-based evaporator, the photothermal response in the dried state was evaluated. Under 1 sun irradiation (1 kW m−2) for 30 minutes, the surface temperatures of dried PCP@PAN-M and PCP/PIL@PAN-M reached 97 °C and 83 °C (Fig. 4b), respectively, significantly higher compared to PAN-M (40 °C). PCP endows fibrous membranes with photothermal conversion performance. The evaporation rate of PCP@PAN-M can reach 2.20 kg m−2 h−1 under 1 sun irradiation. Furthermore, due to the enhanced hydrophilicity, PCP/PIL@PAN-M exhibited an evaporation rate of 2.64 kg m−2 h−1. which is obviously higher compared to PAN-M and pure water, and slightly higher compared to PCP@PAN-M (Fig. 4c). The evaporation rate of PCP/PIL@PAN-M increased with increasing the intensity of light irradiation (Figure S15). The wetted PCP/PIL@PAN-M and PCP@PAN-M showed similar trend of surface temperature (Fig. 4d). Evaporation is a heat-absorbing process, and the increase in the rate of evaporation reduces the surface temperature. The calculated photothermal conversion efficiency of PCP/PIL@PAN-M reached 97.6%, surpassing that of PCP@PAN-M (95.6%) and PAN-M (6.6%) (Fig. 4e). PCP/PIL@PAN-M exhibited salt-tolerance performance, maintaining an evaporation rate of 2.70 kg m−2 h−1 with increasing the mass fraction of NaCl from 3.5 wt% to 20 wt% (Fig. 4f). PCP/PIL@PAN-M exhibited remarkable durability, with stable evaporation rates and photothermal conversion efficiency, and no salt crystallization observed over 40 h (Fig. 4g and Figure S16).

Fig. 4: Evaporation performance and salt resistance of photothermal zwitterionic fibrous membrane.
figure 4

a Photographs of the setup of photothermal evaporation test and photothermal evaporator. b Curves of the surface temperature for fibrous membranes under the sunlight irradiation of 1 kw m−2 in 30 min. c Curves of evaporated mass for fibrous membranes under the sunlight irradiation of 1 kw m−2 in one hour. d Curves of the surface temperature for evaporations under the sunlight irradiation of 1 kw m−2 in one hour. e Photothermal conversion efficiency of evaporations in 30 min under the sunlight irradiation of 1 kw m−2 (1 sun). n  =  3 independent experiments. Data are presented as mean values +/− SD. f Evaporation rates of PCP/PIL@PAN-M under high brine concentrations. n  =  3 independent experiments. Data are presented as mean values +/− SD. g The evaporation rates and photothermal conversion efficiencies of PCP/PIL@PAN-M over 40 Cycling Cycles.

Salt transport in photothermal evaporation is a complex process influenced by the evaporator structure and water delivery mechanisms. Figure 5 schematically illustrats the diffusion of salt within PCP@PAN-M and PCP/PIL@PAN-M evaporators. Under photothermal conditions, salt transport generates ionic concentration and density gradients between the upper and lower regions, driving downward diffusion (black arrows) and brine advection (red arrows). While both water and salt transport are gradient-driven, their rates differ significantly. Water is rapidly transported via evaporation and capillary action, whereas salt diffuses more slowly, relying solely on concentration gradients. In conventional evaporators, when the local salt concentration exceeds the saturation point, crystallization occurs, resulting in salt deposition that obstructs water transport and decreases light absorption efficiency. This issue can be mitigated if salt ions are able to diffuse away from the evaporation interface. In PCP@PAN-M, the fibrous membrane’s porous structure facilitates rapid water transport, redistributing the salt concentration gradient (Fig. 5a). In PCP/PIL@PAN-M, the porous structure and PIL’s zwitterionic groups enhance convective flow, promoting uniform salt distribution across pores and increasing salt migration away from the evaporating surface, thus preventing salt accumulation (Fig. 5b). The underlying mechanism resembles that of previously reported anti-polyelectrolytes35,54, the incorporation of PIL maintains the structural integrity or pore architecture of the base material but improves hydrophilicity.

Fig. 5: Analysis of the mechanism of salt resistance.
figure 5

The accumulation of salt on the evaporated surface under continuous irradiation and salt transport pathways for (a) PCP@PAN-M and (b) PCP/PIL@PAN-M.

The salt resistance mechanism of PCP/PIL@PAN-M can be analyzed using a crystallization kinetic model. Firstly, the salt crystallization process on the evaporated surface can be expressed by the following equation:

$$\frac{{{\rm{d}}}N}{{{\rm{d}}}t}=k\cdot A\cdot \left({C}^{*}-C\right)$$
(1)

where \(N\) is the number of particles that crystallize, \(k\) is the rate constant of crystallization, \(A\) is the crystalline surface area, \({C}^{*}\) is the saturation concentration, and \(C\) is the actual concentration at the evaporating interface. In a traditional evaporator, water evaporation causes \(C\) to approach \({C}^{*}\), leading to the crystallization of salt. In the PCP/PIL@PAN-M evaporator, ionic groups modify the local microenvironment, reducing the crystallization rate constant (k) and keeping \(C\) below \({C}^{*}\) to suppress crystallization.

The anions and cations of PIL can prevent salt accumulation during evaporation, while its hydrophilic functional groups, combined with the numerous pores in the fibrous membranes, effectively reduce the evaporation enthalpy of brine. Molecular dynamics simulation (MDS) was utilized to explore the mechanism behind the performance enhancement with PIL addition. The diffusion pattern, density of hydrogen bonds and changes in evaporation enthalpy across various solar evaporation systems were analyzed (Supplementary Notes, S3). ‘Water’ and ‘Water + PIL’ systems were established to simulate the dynamic distribution of water molecules and NaCl molecules (Fig. 6a, b). The number of water molecules escaping during evaporation and the count of intermolecular hydrogen bonds were quantified. At the initial simulation stage (0 ps), both the ‘Water’ and ‘Water + PIL’ systems demonstrated comparable water molecule stability at their surfaces. After 500 ps, 1000 water molecules evaporated from the surface of ‘Water + PIL’, significantly higher than the 300 molecules from the ‘Water’ (Fig. 6c). During evaporation, water molecules aggregated on the surface and within the membrane’s pore channels, interfering with hydrogen bonding and reducing the number of water-water hydrogen bonds (Fig. 6d).55 Replica simulations were performed to verify the accuracy of these results56, and the results were shown in Figure S17.

Fig. 6: Analysis of evaporation processes in Water and Water + PIL.
figure 6

a, b The snapshots of interfacial evaporation at 0, 500 ps for MDS. c The statistics of the number of evaporated water molecules within 500 ps. d The statistics of the number of hydrogen bonds between water molecules and the statistics of enthalpy within 500 ps. e DSC tests water evaporation temperature and (f) determination of the position of -OH by IR spectroscopy. g Determination of water molecule types in brine and (h) PCP/PIL@PAN-M by Raman spectroscopy. i Schematic representation of the types of water molecules in brine and (j) PCP/PIL@PAN-M.

Different types of hydrogen bonds exist in hydrated polymers: bound water, intermediate water (IW) and free water (FW), where the IW region with weaker bonding energy is more easily to evaporate57. The bound water that strongly interacts with the hydrophilic polymer is non-freezable water. In contrast, IW and FW are freezable57. Differential scanning calorimetry (DSC) verified that the system with PIL added is more prone to freezing and has a lower freezing temperature compared to pure water (Figure S18a). Simultaneously, IW and FW with weaker bond energies also have lower evaporation temperatures (Fig. 6e). Compared with the -OH peaks in evaporation, the -OH peaks of pure water in the IR spectra shifted to higher wavelengths, which is more indicative of the weakened hydrogen bonding energy (Fig. 6f). Raman spectroscopy (Fig. 6g, h, Figure S18b) further confirmed that the addition of PIL increases the specific gravity of IW,58 promoting evaporation at lower energy, thereby reducing the system’s evaporation enthalpy (Fig. 6h, j). This is also consistent with the simulation results (Fig. 6d). Dark evaporation experiments were also conducted to verify the reduction in evaporation enthalpy. Evaporation enthalpy was calculated by comparing evaporation rates in dark conditions with the known enthalpy of pure water (Figure S18d, Tabe S1).

The practical desalination performance of the PCP/PIL@PAN-M-based evaporator was evaluated using natural seawater from East China. Figure 7a shows the UV-Vis absorption spectrum of seawater before and after desalination. The desalinated seawater showed no absorbance, indicating high purity. The concentration of metal ions such as Na⁺, K⁺, Mg2+ and Ca2+, decreased by two to three orders of magnitude after desalination (Fig. 7b), which meets the standard of freshwater set by the World Health Organization (WHO) and other59 (Table S2, Table S3). Notably, ‘Condensed water from the PCP/PIL@PAN-M’ exhibited lower residual ion concentrations compared to ‘Condensed water from PCP@PAN-M’, which is attributed to the ionic interactions between the functional groups in PIL and metal ions in seawater. In addition, PCP/PIL@PAN-M could rapidly purify Methylene Blue (MB) and Rhodamine B (RhB) to colorless and transparent within 1 h (Fig. 7c) with a removal rate of more than 99.9 %. The electrical resistance of seawater and organic dyes also decreased dramatically after purification using PCP/PIL@PAN-M (Figure S19). The conductivity of the desalinated seawater reduced from 31.59 mS cm−1 to 33.63 μS cm−1, which further illustrates the water purification performance of PCP/PIL@PAN-M (Fig. 7d).

Fig. 7: Water purification and antibacterial capacity of PCP/PIL@PAN-M.
figure 7

a UV-visible absorption spectra, (b) metal ion concentration of seawater before and after desalination. (c) UV-visible absorption spectra and images of organically dyed before and after desalination. Dyestuffs and dyestuffs-1 represent sample before and after purification, respectively. d The electrical conductivity of seawater before and after desalination. e Determination of the intensity of 1O2 produced by photothermal membranes under light illumination by EPR. f The sterilizing properties of photothermal membranes. Blank represents the blank control group. g Freshwater collected by the evaporator is used for pea seedling cultivation.

To validate the performance under real conditions, the evaporator (6 × 8 cm²) was tested outdoors. The ambient temperature and light radiation intensity during test were recorded using a thermometer and a photo-radiometer (Figure S20). With increasing the intensity of solar radiation at noon, the vapor produced by photothermal evaporation gradually gathered and condensed at the top of the device, and then flowed along the inclined wall into a collection tank. Additionally, PCP/PIL@PAN-M exhibited strong resistance to chemical degradation, maintaining structural integrity and color after immersion in strong acidic and alkaline environments for two hours (Figure S21), demonstrating chemical stability in diverse operational settings.

Seawater contains various bacteria that can adsorb onto membrane surfaces during desalination, hindering long-term purification efficiency. Porphyrins can be sterilized by generating 1O2 in the presence of light60,61,62. This was verified through Electron Paramagnetic Resonance (EPR) measurements (Fig. 7e and Figure S22), where both PCP@PAN-M and PCP/PIL@PAN-M produced strong 1O2 signals upon light exposure, significantly surpassing those of control samples. Moreover, the intensity of 1O2 signal also increased with longer illumination times. Figure 7f shows the antibacterial activity of PCP@PAN-M and PCP/PIL@PAN-M, where almost all bacteria in the medium were eliminated under light exposure for 20 min, with antibacterial rates as high as 99%–100%. Finally, the desalinated seawater was successfully used to support plant growth (Fig. 7g), indicating the material’s multifunctionality in providing clean water, antimicrobial activity, and agricultural utility.

Solar-driven thermoelectric generator (TEG) utilizes photothermal material as the hot end of a thermoelectric module and the interface in contact with water as the cold end. Through the Seebeck effect41,63,64, a temperature difference between the two sides is applied to generate electrical energy, achieving the conversion from solar energy to thermal energy and subsequently to electrical energy. Figure 8a, b shows the mechanism and device design for TEG, wherein the TEG module was positioned between the evaporator and the water surface. Irradiated for one hour at 1 sun, the TEG-PCP/PIL@PAN-M demonstrated an open-circuit voltage (Voc) of 184 mV and a short-circuit current (Isc) of 10.56 mA. In contrast, the blank TEG without PCP/PIL@PAN-M only showed a Voc of 60 mV and an Isc of 3 mA (Fig. 8c), which can be attributed to the enhanced photothermal properties imparted by PCP to the fibrous membranes. The output performance demonstrated good cycling stability over five consecutive measurement cycles (Fig. 8d-e). The Voc of the thermoelectric generator increased with increasing the intensity of sunlight, achieving 300 mV at 2 suns irradiation (Fig. 8f). The current–voltage (IV) curves (Fig. 8g) revealed that the TEG-PCP/PIL@PAN-M device delivered a maximum power density of 1.5 W m⁻² (Fig. 8h), and the stored electricity was calculated to be 6 J over 1 hour (Figure S23).

Fig. 8: The performance and applications of thermoelectric power generation.
figure 8

a Schematic diagram of thermoelectric power generation - based on the Seebeck effect. b Schematic diagram of evaporation-thermoelectric power generation install. c Open-circuit voltage and short-circuit current of thermoelectric co-evaporation system at 1sun. d Open-circuit voltage and (e) short-circuit current over 5 cycles. f Open-circuit voltage generated by PCP/PIL@PAN-M at different light intensities. g Current-voltage curve and (h) power density of thermoelectric co-evaporation system at 1sun. i, j Thermoelectric generator driving a small fan and a small light bulb. k Graph of the performance in comparison with other operations26,65,66,67,68,69,70.

To verify the practical applicability, the TEG was irradiated at 2 sun for 5 min and then quickly transferred to a thermostatic plate at 0 °C to charge the electronic device. The stored energy was sufficient to illuminate a small light bulb (rated voltage: 1.5 V) for approximately 15 seconds (Fig. 8j, videos S1), and power a mini-fan (Fig. 8i, videos S2). Compared with previously reported works (Fig. 8k, Table S4), our system exhibited enhanced performance across multiple key parameters. While certain systems demonstrate relatively high evaporation rates, their electrical outputs are typically limited (e.g., power densities below 0.7 μW cm−2), restricting their potential for efficient water-energy co-conversion. In contrast, our material simultaneously delivers high evaporation performance (evaporating rate: 2.64 kg m−2 h−1; photothermal conversion efficiency: 97.6 %) and high electric output (Voc:184 mV; Isc: 10.6 mA). Moreover, the integration of salt-resistant and antibacterial functionalities further underscores its robustness and potential for practical applications in complex water environments26,65,66,67,68,69,70.

Discussion

In summary, we developed a fibrous photothermal membrane with a zwitterionic polyionic liquid that redistributes salt concentration via ion interactions and rapid water transport, effectively overcome the issue of salt accumulation commonly encountered in conventional photothermal evaporators. Under standard solar irradiation (1 kW m−2), the integrated evaporator showed an evaporation rate of 2.64 kg m−2 h−1 (maintain high evaporation rate even in highly concentrated brines), and a photothermal conversion efficiency of 97.6%. Furthermore, the presence of porphyrin units endowed the photothermal membrane with strong antibacterial activity. Coupling the membrane with a thermoelectric generator yielded a stable output voltage of 184 mV and a power density of approximately 1.5 W m−2, sufficient to power various small electronic devices. This multifunctional evaporator, capable of desalination, power generation, salt resistance and sterilization, offers a compelling approach for the advancement of integrated solar-driven systems and considerable promise for practical applications.

Methods

Materials

All the materials and solvents were purchased from commercial sources without further purification. Pyrrole ( > 99.0 %) was purchased from TCI Shanghai Chemical Development Co., Ltd., 3,5-Bis(9H-carbazol-9-yl) benzaldehyde (99 %) was purchased from Gallinor (Suzhou) new materials Co., Ltd. Acetic acid, nitrobenzene N, N-dimethylformamide (DMF), ferric chloride, nitromethane was purchased from Sinopharm Chemical Reagent Co., Ltd., Chloroform, polyacrylonitrile (99%, Mw=150,000), methanol was purchased from Shanghai Titan Technology Co., Ltd.

Synthesis of tetracarbazole phenyl porphyrin (CP)

13 mL of acetic acid, 9 mL of nitrobenzene and 3,5-Bis(9H-carbazol-9-yl) benzaldehyde (700 mg, 1.6 mmol) were mixed and heated to 120 °C. Pyrrole (112 μL, 1.6 mmol) was gradually added, and stirred for 1 h. The reaction was cooled to ambient temperature. The resulting mixture was filtered, and the crude product was washed using methanol and dried under vacuum to get the CP monomer with a 70% yield.

Preparation of polyacrylonitrile (PAN) nanofibrous membranes (PAN-M)

PAN powders (0.5 g, Mw = 150,000 g mol−1) were dissolved in 2.7 g DMF and stirred for 8 hours to obtain a well-dispersed electrospinning solution. The electrospinning process was conducted at a working voltage of 12 kV and a feed rate of 1 mL/h (25 °C, 45 ± 5% humidity). The resulting PAN-M were dried under vacuum at 60 °C for 12 h and then hot-pressed at 100 °C and 2 MPa.

Preparation of CP monomer composite PAN nanofibrous membranes (CP@PAN-M)

The electrospinning solution containing 0.5 g CP, 0.5 g PAN and 4.8 g DMF was stirred for 10 hours until homogeneously dispersed. Electrospinning was performed under the same conditions as above. The resulting CP@PAN-M were vacuum-dried at 60 °C for 12 hours, followed by hot pressing at 100 °C and 2 MPa.

Preparation of PCP composite PAN nanofibrous membranes (PCP@PAN-M)

The CP@PAN-M membrane was immersed in an oxidant solution of ferric chloride (283.85 mg) and 4 mL methanol for 24 h. After soaking, the membrane was washed using methanol and then dried under vacuum at 60 °C for 12 h.

Synthesis of zwitterionic ionic liquid (IL)

1-vinyl imidazole (5 g, 53.1 mmol, 1eq), sodium 3-bromopropanesulfonate (12.55 g, 55.7 mmol, 1.05 eq), polymerization blocking agent 2,6-di(tert-butyl)-p-cresol 10 mg and 10 mL DMF were added in a 100 mL single-necked flask,. The mixture was heated to 70 °C for 24 hours. After cooling to ambient temperature, the solution was added to 200 mL of ice-cold ether and stirred overnight. The yellow precipitate was filtrated and washed using ether, and dried to yield a product with 92% yield (10.57 g).

Synthesis of zwitterionic polyionic liquid (PIL)

The synthesized IL monomer (5 g, 23.12 mmol, 1 eq) and 10 mL deionized water were added in a 100 mL two-necked flask along with VA-086 initiator (0.05 g, 0.17 mmol, 0.007 eq). The reaction mixture underwent three freeze-thaw cycles in a liquid nitrogen bath to remove the oxygen in the system, and then the reaction was carried out at 75 °C for 24 h. Upon completion, the unreacted monomer was removed by dialysis in deionized water for three days using a 3500 Molecular Weight Cut-Off (MWCO) dialysis bag, then the dialysate was concentrated in a vacuum. Lithium bis(trifluoromethanesulfonyl) imide (7.96 g, 27.74 mmol, 1.2 eq) was added and stirred overnight. After filtration and vacuum drying at 60 °C, a light yellow solid product was obtained.

Lithium bis(trifluoromethanesulfonyl) imide (7.96 g, 27.74 mmol, 1.2 eq) was then added and stirred overnight. After filtration and drying under vacuum at 60 °C, a light yellow solid was obtained.

Preparation of PCP/PIL composite PAN nanofibrous membranes (PCP/PIL@PAN-M)

The preparation method is the same as that of PCP@PAN-M, except that PIL was added to the spinning solution in an amount equal to that of CP.

Characterization techniques

The molecular structures of the samples were examined using Fourier transform infrared (FT-IR) spectra (Nicolet 670 spectrometer). The specific surface areas were determined using the Brunauer-Emmett-Teller (BET) model. The pore size distributions (PSDs) were calculated based on the nonlocal density functional theory (NLDFT) model. The electrical signals generated by thermoelectric power generation were recorded by a digital multimeter (DMM6500, Keithley, USA). Other bctails of other characterization can be found in Note S2 (Supplementary Notes).

Solar water evaporation experiment

The sample membranes with an area of 2 × 2 cm2 were embedded in an insulating polystyrene (PS) sponges with the ability to float and water-transport capability, and covered with PS foam with no light-absorbing capacity to confine the area to light. Then enough simulated seawater (Mass fraction:3.5 wt% NaCl solution) or East Seawater was then added to the volumetric beaker underneath. The evaporator was placed in a solar simulator with an AM 1.5 G filter and the light intensity was calibrated using an irradiometer. During the evaporation process, the surface temperature of the samples was monitored using an infrared thermal camera. The mass change of the evaporator was recorded simultaneously using an electronic analytical balance.

Antibacterial performance test

The photothermal membranes were cut into 1\(\times\)1 cm2 pieces, which were then incubate with bacteria (Methicillin-resistant Staphylococcus aureus) under dark condition for 20 min, and 100 μL of bacterial solution was taken to coat the plate. After that, it was transferred to the light condition and incubated with bacteria for 20 min, and 100 μL of bacterial solution was taken to coat the plate.

Synchronized test experiment for solar evaporation generation and thermoelectric power generation

Hydrophilic filter paper was placed in the middle of the photothermal membrane (4 × 4 cm2) and thermoelectric (TE) module (TECI-12704, 4 × 4 cm2) to absorb water, and then they were embedded in the PS foam. The TE module was connected to a digital multimeter to continuously monitor the open-circuit voltage and short-circuit current of the thermoelectric power generation system during the solar evaporation experiment.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.