Tracking the formation potential of vivianite within the treatment train of full-scale wastewater treatment plants

recovering phosphate in the form of vivianite. This work focuses on studying the iron, phosphorus, and sulfur interactions at full-scale wastewater treatment plants (Viikinm ¨ aki, Finland and Seine Aval, France) with the goal of identifying unit processes with a potential for vivianite formation. Concentrations of iron(III) and iron(II), phosphorus, and sulfur were used to evaluate the reduction of iron and the formation potential of vivianite. M ¨ ossbauer spectroscopy and X-ray diffraction (XRD) analysis were used to confirm the presence of vivianite in various locations on sludge lines. The results show that the vivianite formation potential increases as the molar Fe:P ratio increases, the anaerobic sludge retention time increases, and the sulfate concentration decreases. The digester is a prominent location for vivianite recovery, but not the only one. This work gives valuable insights into the dynamic interrelations of iron, phosphorus, and sulfur in full-scale conditions.

• The Fe:P ratio affects the vivianite formation more than the Fe:S ratio.Phosphorus recovery is a vital element for the circular economy.Wastewater, especially sewage sludge, shows great potential for recovering phosphate in the form of vivianite.This work focuses on studying the iron, phosphorus, and sulfur interactions at full-scale wastewater treatment plants (Viikinmäki, Finland and Seine Aval, France) with the goal of identifying unit processes with a potential for vivianite formation.Concentrations of iron(III) and iron(II), phosphorus, and sulfur were used to evaluate the reduction of iron and the formation potential of vivianite.Mössbauer spectroscopy and X-ray diffraction (XRD) analysis were used to confirm the presence of vivianite in various locations on sludge lines.The results show that the vivianite formation potential increases as the molar Fe:P ratio increases, the anaerobic sludge retention time increases, and the sulfate concentration decreases.The digester is a prominent location for vivianite recovery, but not the only one.This work gives valuable insights into the dynamic interrelations of iron, phosphorus, and sulfur in full-scale conditions.

Introduction
Vivianite is a naturally occurring mineral in the environment (Rothe et al., 2016), which can be a route for iron and/or phosphorus extraction.Vivianite is also spontaneously formed in wastewater treatment plants (WWTPs) (Wilfert et al., 2016(Wilfert et al., , 2018)).The need to extract phosphorus in the form of vivianite is increasing.This need is driven by two motivators: (1) phosphorus is becoming scarce and is in high demand (Desmidt et al., 2015) and (2) the potential eutrophication risk associated with phosphorus discharge (Preisner et al., 2020).Recently, the phosphorus limit has become stringent.According to a recent EU directive draft (European Commission, 2022), the new phosphorus effluent limit concentration has been proposed to be 0.5 mg/l, which is half the current limit (1 mg/l).This would force WWTPs to dose more chemicals for efficient phosphorus removal.Most of the removed phosphorus can form vivianite, which can cause pipe clogging and scaling if not removed (Prot et al., 2021).Therefore, vivianite recovery is not only a new route for phosphorus recovery but also alleviates the scaling problems.
One of the current phosphorus recovery routes is struvite precipitation.Plants that use enhanced biological phosphorus (bio -P) removal tend to recover phosphorus as struvite.Struvite is a magnesiumammonium-phosphate crystal that can be formed in WWTPs with high levels of phosphorus, magnesium, and nitrogen and can be used as a slow-release fertilizer (Le Corre et al., 2009).However, the recovery rate is low (10-30 % of the phosphorus in the influent) (Prot et al., 2022), and struvite cannot be directly used as a sole NPK fertilizer because the N:P ratio needed by crops is higher than that of struvite (Latifian et al., 2012).Moreover, the formation of struvite is prevented by iron compounds present in the influent water (Doyle and Parsons, 2002), let alone the dosed iron for chemical phosphorus (chem-P) removal.Ergo, vivianite should be explored as another potential way for phosphorus recovery.In general, struvite recovery is preferable for bio-P plants, and vivianite recovery is preferable for chem-P plants where iron is dosed.
Chem-P removal is preferred over bio-P removal in many WWTPs.More than 50 % of the WWTPs in Germany, the Netherlands, the United Kingdom, and France use chem-P removal or a combination of bio-P and chem-P for phosphorus removal (Wilfert et al., 2015).For chem-P removal, iron is the most widely used chemical because it is inexpensive compared to other coagulates (e.g., aluminum salts), removes phosphorus efficiently, reduces hydrogen sulfide formation, and improves sludge flocculation (Frossard I et al., 1997).The iron-dosing chem-P WWTPs cannot recover phosphorus in the form of struvite because vivianite is the dominant phosphorus structure (Wilfert et al., 2018).Most of the studies conducted on vivianite focused on digested sludge from the digester units (Hao et al., 2022;Heinrich et al., 2023;Prot et al., 2019Prot et al., , 2020;;Roussel and Carliell-Marquet, 2016;Wilfert et al., 2016Wilfert et al., , 2018)), and one pilot-scale study was able to recover 80 % of the vivianite from digested sludge (Wijdeveld et al., 2022).Because the vivianite is formed in-situ with uncontrolled conditions in anaerobic digester particles sizes are small, and a high-gradient magnetic separator is then necessary to separate it from the sludge (Wijdeveld et al., 2022).Another route could be to collect iron phosphate sludge before vivianite was formed and crystallize it in a dedicated process to produce crystals which can be easily handled (Priambodo et al., 2017).However, for this so-called ex-situ strategy, it would be necessary to know accurately in which zones of treatment plant the iron reduction starts and vivianite forms.
Current research has shown that vivianite formation decreases as the sulfur concentration increases in the sludge due to iron sulfide formation, which in turn decreases the available iron to bind with phosphates (Heinrich et al., 2023;Wilfert et al., 2016).Sulfates can mainly enter WWTPs through four routes: the use of sulfates in drinking water treatment plants as coagulants, the presence of sulfates in the drinking water sources, industrial discharges containing sulfates to the sewage systems (Pikaar et al., 2014), and the addition of iron sulfates at WWTPs for chem-P removal (Heinrich et al., 2023).Subsequently, sulfates undergo biochemical reduction in anaerobic conditions within clarifiers and digesters (Ho et al., 2022).Limited research focused on the formation of vivianite elsewhere, that is, other than digested sludge.Prot et al. (2022) initiated a lab reactor with a waste-activated thickened sludge sample that had a residence time of 30 h from Hoensbroek WWTP.The results showed that 2-4 days of anaerobic storage were enough for iron reduction to be completed, and the percentage of iron that formed vivianite increased from 10 % (in thickened sludge sample) to 50-55 % (after 1-3 days of anaerobic storage).The formation of vivianite in digested sludge has been intensively studied, unlike in other sludges such as excess sludge.Typically, digesters are optimized for biogas production rather than phosphorus recovery.Thus, it becomes imperative to explore alternative settings where vivianite recovery can be effectively enhanced.
The present study aims to fulfill this research need and explore the potential locations for vivianite recovery other than the digester, either to develop in-situ or ex-situ strategies, since long retention times are not needed for iron reduction and vivianite formation.The study utilized full-scale WWTPs data to pursue this exploration and produce useful information for research and industry in this area.To the authors' knowledge, such work especially with full-scale WWTPS has not been investigated in previous studies.In this full-scale study, we sampled two different WWTPs (Viikinmäki, Finland, and Seine Aval, France) for 10 weeks each to assess the interactions of sulfur and phosphorus with iron and to establish the quantity of iron (II) produced by iron reduction and the vivianite quantity that is formed before reaching the digester.The size and the difference in the treatment train of these two WWTPs add another unique element to this study.Sampling locations were chosen along both the water and sludge lines to monitor the impact of chemical changes in the wastewater on the formation of vivianite.This approach opens up opportunities for WWTPs without digesters to potentially recover vivianite.The formation potential of vivianite was evaluated by tracking the change in the chemistry of iron, phosphorus, and sulfur, followed by a global mass balance for each WWTP.Advanced qualitative analysis, such as Mössbauer spectroscopy and XRD was employed as confirmatory techniques to verify vivianite formation and study its structural characteristics.

Wastewater treatment plants with sampling locations
Two different wastewater treatment plants were chosen for sampling (the Viikinmäki (VIK) WWTP in Finland and the Seine Aval (SAV) WWTP in France).The sampling duration was 10 sampling weeks for each plant.The sampling locations for each plant are highlighted with a green circle, followed by a 2-3 letter symbol in Fig. 1.The VIK sampling was done between September and November 2021, and the SAV sampling was done between April and July 2022.The operational conditions for both plants were stable, and the average water temperature while sampling was around 18 • C for VIK and 20 • C for SAV.VIK and SAV were chosen to understand vivianite formation in different wastewater conditions.The iron is dosed in ferrous form as iron sulfate at VIK and in ferric form as ferric chloride at SAV.The molar ratios of iron:phosphorus:sulfur are different in both plants, and the process design varies L. Amin et al. significantly at the two plants.

Plant 1: Viikinmäki WWTP, Helsinki, Finland
Viikinmäki is the largest wastewater plant in Finland, with an inflow of 280,000 m 3 /d.The influent average water temperature is 15 • C. As shown in Fig. 1, the plant consists of a preliminary treatment that includes four screens, three aerated sand and grit removal units, and one large pre-aeration unit with intermittent aeration of 10 min on -50 min off, with a retention time of 52 min.The aeration prevents the settling of the sludge and oxidizes the iron sulfate that is dosed in the grit removal.The ferrous sulfate dosing points are the grit removal and biological tanks, with total average dosing of 16 gFe/m 3 inflow.The biological treatment consists of nine lines with six sections each.Three of them are anoxic for pre-denitrification, and the rest are aerobic.However, the anoxic sections can be changed to aerobic if nitrification is not enough.Then there are nine lines, with 18 tanks for secondary sedimentation, followed by biological filters for post-denitrification.The wasteactivated sludge is pumped to the primary sedimentation where it is mixed with primary sludge and continues to the digestion units.There are seven primary settling lines, and two digestion lines, with each digestion line consists of a two-phase digester.Periodically, external sludge containing organic matter, oils, fats, and such is pumped directly to the digestion units.The feeding of the external sludge to the digester was not documented during the sampling period.

Plant 2: Seine Aval WWTP, Paris, France
Seine Aval is the largest wastewater treatment plant in Europe with an inflow of 1.5 million m 3 /d.The biological treatment is split unequally into two different lines (Fig. 1).The first line, which receives 20 % of the flow, consists of membrane bioreactors with anoxic and aerobic zones where the water samples were collected.The ferric chloride dosing points are the anoxic and aerobic zones of the biological line, lamellar settling tanks before the biofiltration line, and four of the primary sedimentation tanks, with a total average dosing of 7.7 gFe/m 3 inflow.There are 20 sedimentation tanks, iron is dosed to 4 of them, and the sludge from these 4 tanks is combined into one line, where sample PSF is collected.The sludge from the other 16 tanks is divided into 4 lines, and the sludge sample (PS) is collected from one of those lines.At SAV, there are two sets of digester trains: the first train (called the primary digester) receives all the sludge from the primary sedimentation.The second train, with four secondary digesters, receives the sludge from all the biological lines.Each digestion train consists of a two-phase digester.Between the primary sedimentation and the primary digester, there are seven centrifuge units and a storage unit for mixing the sludge.The biological sludge passes through different dewatering processes (consisting of thickening units, flotation units, and centrifugation units) until reaching the storage unit where all the sludge is mixed before being pumped to the four secondary digesters.

Description of sampling locations
The sampling locations were chosen to give an overview of the water lines, and a more detailed view of the sludge lines.For both VIK and SAV, the first sample was taken after the pretreatment and before any iron dosage to the plant (INF).The second sample at VIK was taken from the pre-aeration tank (PA), after the first iron-dosing point to check if the dosed ferrous iron is being oxidized before reaching the biological tanks.For the biological line at VIK, samples were taken from the aerobic zone (AR), anoxic zone (AN), and the return-activated sludge (RAS).For the sludge line, samples were taken before and after the digester unit.The sample collected before the digester is called mixed sludge (MS) because it is the combination of raw and excess sludge that is thickened in the primary clarifiers.The sample collected after the digester is referred to as the digester tank (DT) as it was taken from the second phase of the digester before the sludge was pumped out of the digester.That is because, at VIK, air is pumped as the sludge leaves the digester.At SAV, samples were taken from the anoxic zone (AN) and the return activated sludge (RAS).There was no need to take from the aerobic zone because it was shown from the VIK results that the AN and AR samples behave remarkably similar.The rest of the SAV samples were collected from the sludge lines.The first two samples were taken after the primary sedimentation units.One was collected from the line that had no iron dosing (called primary sludge (PS)), and the other was collected from the line with iron dosing (called primary sludge with Fe (PSF)).Other samples were taken from the influent and effluent of the primary digester (PDI and PDE) and the secondary digester (SDI and SDE).

Sampling technique, probes measurements, and sample pretreatment
The sampling for both plants was carried out in the morning in the middle of the week to avoid periods of peak fluctuation.Two liters were collected from each location.Half a liter was used to measure temperature, pH, redox, conductivity, and total dissolved solids (TDS) using WTW probes.
Pretreatment was conducted within 20 min (40 min for SAV) of the sample collection.The pretreatment consisted of acidifying around 20 ml (60 ml for SAV) of each sample with HCl and mixing for 10 min until the pH dropped to <1.5.Then the samples were filtered using 0.45 μm filters.For concentrated sludge samples (MS, DT, PS, PSF, PDI, PDE, SDI, and SDE), direct filtration was not possible, so these samples were centrifuged at 1000 rpm for 10 min prior to filtration.The resulting acidified and filtered samples were stored in airtight containers in the dark for total Fe 2+ and P-PO 4 analysis.For soluble P-PO 4 , and SO 4 analyses, the same procedures were carried out, but without the acidification step.

Spectrophotometric and solids analysis
After pretreatment, VIK samples were transported back to the laboratory.It took around 30 min for the Fe 2+ , P-PO 4 , and SO 4 analysis to be conducted, and 1-2 weeks for the total Fe and total P to be analyzed.All measurements were automatically conducted via the BluVision (Ska-lar®), which applies SFS-ISO 15923-1:2018 and ISO/TS 15923-2 protocols.For SAV samples, Fe 2+ analysis was done manually using the same calorimetric methodology used by BluVision on the same sampling day.Within 1-2 weeks, all the other analyses (P-PO 4 , SO 4 , total Fe, and total P for SAV) were analyzed manually using the same protocol as that used in BluVision.Iron analysis is based on the phenanthroline spectrophotometry, phosphorus analysis is based on the molybdenum blue method, and sulfate analysis is based on the formation of barium sulfate suspension.For total Fe and total P analysis, the samples were digested by adding potassium peroxidesulfate and autoclaving for 2 h prior to analysis.These measurements are helpful for understanding the chemical transformations leading to vivianite formation.
For solids analysis, wastewater samples were passed through 0.45 μm filter papers and dried at 105 • C for determining the Total Suspended Solids (TSS).Then the filter papers with the dried sludge were further heated to 550 • C for Volatile Suspended Solids (VSS) analysis.However, for thick sludge samples, the filtration step was skipped, and Total Solids (TS) and Volatile Solids (VS) measurements were determined instead of TSS and VSS.

Mössbauer and XRD sample preparations and analysis
For the VIK samples, 50 ml of the sample was centrifuged within 5-6 h from collection, and the supernatant was discarded.The rest was placed in an amber bottle and purged with nitrogen for 1-2 days until the sludge had totally dried.For SAV samples, the sludge samples were dried under a vacuum using lyophilization for 24 h.The dried sludge was removed and pulverized using a mortar and pestle.Pellets for Mössbauer spectroscopy were prepared by mixing 50-200 mg sample powder with epoxy resin.The pellets were sealed under vacuum, sent for Mössbauer analysis, and stored in a glove box.The rest of the powder was used for XRD measurements.Some samples were prepared inside a glove box with an N 2 atmosphere, and others were prepared in air conditions.Due to the added complexity of working in a glove box, we compared pellets prepared inside and outside the glove box, and we noted no significant differences.The sample preparation outside the glove box was conducted quickly (within an hour).For one sample, we used the two drying methods on each half, followed by the same steps for pellet preparation.The Mössbauer analysis for both of the pellets showed the same results.Henceforth, samples for Mössbauer analysis were prepared in open-air conditions in fume hood.
The 57 Fe Mössbauer spectroscopy measurements were done using a Ritverc 57 Co(Rh) source and an Oxford CF-506 continuous-flow cryostat in transmission geometry.Measurements were done at 300.0 K, with a maximum Doppler velocity of 4.0 mm/s in constant-acceleration mode and with vacuum in the sample chamber, and at 5.6 K using liquid helium, with 11.5 mm/s and helium gas in the sample chamber.PANalytical X'PERT PRO MPD Alpha1, with Cu as the X-ray source and K-alpha1 monochromator (45 kV, 40 mA) was used for XRD analysis.The measuring angle was 5 • to 80 • , the step size was 0.026 • , and the spinning revolution was 16 s.

Mass balance
To verify the representativeness of the sampling and correctness of the data collected from the processes mass balances were performed for total iron and phosphorus.Other compounds of ferrous iron, phosphate phosphorus, and sulfate were presented to get an overall picture of the mass flows within the processes.The loads in kg/d of total iron, total ferrous, total phosphorus, soluble phosphate, and soluble sulfate for VIK and SAV were calculated based on the average of 10 sampling weeks.The mass balances for total Fe and P are shown in red in Fig. 2. Note that the effluent parameters for phosphorus and iron (orange boxes in Fig. 2) were not part of the sampling campaign measurements, and data were obtained from plant operators.Also, they were insignificant compared to other locations.For example, the respective average effluent concentrations of total Fe and total P of VIK were 0.6 and 0.18 mg/l, and for SAV, they were 0.4 and 1.4 mg/l.
For VIK (Fig. 2A), most of the iron is dosed in the grit removal, and 80 % of this iron is oxidized in the pre-aeration.The biological tanks (AN, AR, RAS) accumulated the total Fe, mostly as Fe 3+ , by the recirculation of water.The iron and sulfate were reduced before reaching the MS point.They were then further reduced in the digester (DT point).The difference between Fe and P in the inlet and outlet of the digester was due to the way the samples were collected.At VIK, there are seven primary sedimentations and 2 two-phase digester units.The MS point was taken from a combination outlet of the first and second primary sedimentations, and the DT point was taken from the second phase of the first digester unit.When calculating the balance, it was assumed that all sedimentation outlets have the same concentration and flow as the MS outlet, which is not completely accurate because the pumping frequency and the loads are not the same for all primary sedimentation units.That is why the balance for the MS and DT points was not closing.However, the overall balance was conserved with errors of 8 % and 4 % for total P and total Fe, respectively.
The increase of total phosphorus concentration from INF to PA is due to the recirculation of the wasted sludge from the secondary clarifiers to the pre-aeration.The soluble phosphates decrease in PA because of the ferrous sulfate dosed in the grit removal.Phosphate was removed almost entirely before reaching the MS, indicating that there were no longer soluble phosphates that could contribute to vivianite formation.Only the insoluble phosphate would be responsible for the vivianite formation in the digester.On the other hand, the sulfate and total Fe were further reduced in the digester, signifying possible pyrite formation.
For SAV (Fig. 2B), the three ferric chloride dosing points are shown in purple.The INF had around 27 % of the iron as ferrous and 30 % of the phosphorus as soluble phosphates.The iron accumulates in the biological tanks (AN) mostly as ferric, and the phosphates are mostly consumed by bacteria or precipitate by ferric chloride.Moving on to the digester units, it is shown that for the primary and secondary digester units, the ferric was reduced to ferrous before reaching the digester units, and most of the phosphorus is insoluble (PDI and SDI samples).In the primary digester, the total amount of iron and phosphorus remains constant, ensuring a conserved mass balance.The sulfate was already reduced before reaching PDI, and it was further reduced after PDE.For the secondary digester, the mass balance for iron and phosphorus had an approximate error of 20 %.That is because the calculation of the load for the SDI point was based on the flow to the mixing storage unit (gray rectangle tank in Fig. 2B) before all the secondary digesters, and the concentration used was taken from the influent of only one secondary digester.However, for the digester's effluent, both the flow and concentration were based on the outflow of one digester, and this value was multiplied by 4, assuming the other three secondary digesters had similar conditions, which cannot exactly be true.Phosphates and sulfates of the secondary digester followed the same trend as the primary digester.Looking at the overall balance for SAV (red number in Fig. 2B), the iron balance varies due to the high variation of the influent iron.However, the phosphorus balance was maintained, with an error of 13 %.

Iron, phosphorus, and sulfate concentrations
Fig. 3 presents a box plot of total iron, total ferrous iron, soluble phosphates, and soluble sulfate concentrations of VIK and SAV for the 10 sampling weeks.This figure helps in understanding the iron oxidation and reduction potentials throughout both plants.The changes in iron from ferric to ferrous help in identifying the possible locations where vivianite is formed since ferrous is a prerequisite for such formation.The y-axis represents the concentration in mg/l for total iron, total ferrous iron, and soluble sulfate, and the bar boxes represent the different sampling locations.First, for the iron and ferrous graphs, the scale of the y-axis for VIK is double that for SAV, indicating a higher iron concentration at VIK.This is expected since the iron dosage at VIK (16 gFe/m 3 inflow) is almost double the iron dosage at SAV (7.7 gFe/m 3 inflow).Overall, ferrous concentration increases as the flow moves from the water line to the sludge line for both plants.The total iron and total ferrous concentrations of all the water line sampling locations (INF, PA, AN, AR, RAS) were below 900 and 100 mg/l, respectively.The iron at these locations was mostly ferric.For the sludge line, ferrous iron was predominant.In VIK, the ferrous iron concentration after the digester (DT) was higher than before the digester (MS).However, the ferrous iron concentrations at SAV, before PDI, SDI and after PDE, SDE were comparable.The primary sludge from the primary sedimentation, where iron is dosed at SAV (PSF), had the highest variation throughout the whole sampling campaign.Thus far, it seems that iron was completely reduced at SAV before reaching the digester.
There were variations during the 10 sampling weeks for both plants.Compared to VIK's influent, SAV's influent had a higher concentration of sulfate.For VIK, the sulfate concentrations in the water line samples (INF, PA, AN, AR, and RAS) were higher than in the sludge line samples (MS and DT), indicating that sulfate and iron reduction occur concomitantly.The MS sample had a higher variation than the DT sample.Similarly, for SAV, the excess sludge samples (PSF, PDI, and PDE) showed the highest sulfate variations.However, the PS sample, which is also excess sludge, had less sulfate variation than the PSF sample, but the PS sample had less total and ferrous iron than the PSF sample.These observations suggest that areas with high iron concentrations correspond to a more pronounced variability in sulfate concentrations.
The molar concentrations at VIK and SAV are presented in Fig. 4. At VIK, the total Fe to total P ratio for MS and DT is around 2.5, which is much higher than at SAV for PDI, PDE, SDI, and SDE (0.9-1.0).At SAV, the total Fe to total P ratio of the primary sludge with (PSF) and without iron dosage (PS) was 1.3 and 0.4, respectively.For the INF points for VIK and SAV, the ratio is 1.0 and 0.6, respectively.It is shown that SAV sludge points (PDI, PDE, SDI, and SDE) had a ferrous to total iron ratio of around 0.9, unlike VIK, where this ratio was 0.8 at the DT point and 0.6 at the MS point.The primary sludge points at SAV had a relatively high total ferrous to total iron ratio, which was 0.8 in PS and 0.9 in PSF.On the other hand, for the other samples at SAV and VIK (INF, PA, AN, AR, RAS), the molar concentration of total ferrous was significantly lower than total iron.For PA, AN, AR, and RAS (VIK sampling points), the total iron molar concentration was much higher than the total phosphorus concentration.Dissimilarly, for AN and RAS (SAV sampling points), the phosphorus concentration was higher than the total iron concentration.

Overall comparison between SAV and VIK
Table 1 presents a comparison between all the sampling points at both VIK and SAV.The solid retention times before the digesters (MS, PS, PSF, PDI, and SDI) were much lower than after the digester (DT, PDE, and SDE).In all these previously mentioned locations, the redox measurements were always negative.The redox conditions in the preaeration tank (PA) at VIK were always negative, but less negative than the primary and secondary sludges.Although PA redox measurements were negative, the Fe 2+ percentage was only 20 %, meaning that the dosed iron sulfate was oxidized in the grit removal and PA.The pH for all locations was in the range of 6-8, showing that all water and sludge had a neutral pH.However, locations such as PA, PS, and PSF had less stable pH, which could be attributed to the low pH of ferrous sulfate (3.5-4) and ferric chloride (2-3).
The total iron value in mgFe/mgS was higher in DT than in MS at VIK and higher in the primary sludge where ferric chloride is dosed at SAV (PSF) than PS.The percentage of Fe 2+ to total Fe increases from MS moving to DT.However, for SAV, the percentage of Fe 2+ was similar between PDI and PDE, and SDI and SDE.The soluble P was mostly below 1 mgP/gS in all locations (except INF).For sulfate, it was reduced from the water line moving to the sludge lines in both plants.However, for VIK, the sulfate level at the sludge line (MS and DT) was low compared to SAV (PS, PSF, PDI, PDE, SDI, SDE).That means that sulfate is not fully reduced in the sludge lines of SAV.Especially at the point PSF, the highest sulfate concentration was recorded in the sludge lines at SAV.

Solids analysis
Mössbauer analysis was conducted at two temperatures: 300.0 K (Fig. 5A) and 5.6 K (Fig. 5B).The spectra recorded at 300.0 K were mainly fitted according to the method suggested by Prot et al. (2020).The method determines the amount of vivianite Fe 2+ , vivianite Fe 3+ , and other iron-containing compounds, but the two latter components can be difficult to distinguish.In our fittings, we assume that vivianite Fe 3+ contains contributions from Fe 3+ ions in oxidized vivianite and derivative compounds like metavivianite.The amount of vivianite Fe 3+ was set to 50 % of vivianite Fe 2+ as an upper limit of oxidized vivianite

Table 1
A comparison between all the sampling locations at VIK and SAV.The probe and parameter results are documented as the average value of the 10-week samples ± standard deviation.( Rouzies and Millet, 1993) in spectra where it cannot be fitted reliably.Samples from VIK needed an additional component with parameters similar to hematite (Fe 2 O 3 ).The 5.6 K spectra made it possible to differentiate between some of the other iron-containing materials in the samples, but the amount of vivianite Fe 2+ could be difficult to accurately quantify.Some of the vivianite Fe 2+ remained paramagnetic at 5.6 K (vivianite Fe 2+ peak 3).The 5.6 K spectra from SAV exhibited an extra component with parameters similar to tochilinite (9 [Fe 2+ ] 0.9 S 9 5Mg 0.95 5[Fe 2+ ] 0.05 [OH] 2 ).Assuming an identical recoil-free fraction for all iron-containing compounds, we could combine the results as illustrated in Fig. 5C.The amount of vivianite Fe 2+ was taken from the 300.0K measurements.Vivianite Fe 3+ , ferrihydrite ([Fe 3+ ] 2 O 3 .0.5 [H 2 O]), goethite (FeHO 2 ), and hematite were similar at 5.6 K, thus vivianite Fe 3+ was set to 50 % of vivianite Fe 2+ when possible, and the remainder of the 5.6 K component was identified as ferrihydrite, goethite, and hematite.Pyrite could be identified in the 5.6 K spectra, and the rest was marked as other iron compounds.Poorly formed ferrihydrite, goethite, and hematite were probable major contributors to the other iron compounds.More samples were analyzed at 300.0 K than at 5.6 K as the magnetically split 5.6 K spectra require more sample material and longer measurement times than the paramagnetic spectra at 300.0 K. Overall, it was shown that vivianite was already formed in the mixed sludge (MS8 and MS10) at VIK and in the secondary undigested sludge (SDI8) at SAV.Then, after the digester, the amount of vivianite increased for all the samples (DT7, DT9, and SDE8), and the amount of ferrihydrite decreased.In the samples where the ferrous to total iron ratio was significantly high (SDI8 & DT7), the amount of ferrihydrite available was small.There was no clear pattern observed for pyrite.However, it seems that the pyrite component was slightly lower in digested sludge compared to undigested sludge at VIK.In undigested sludge (MS8, MS10, and SDI8), there was a larger fraction of other Fe components.That is due to the nature of undigested sludge, where there was a vast variety of organic and inorganic components that could bind with iron.According to the 300.0K results, the amount of vivianite for DT was higher than that of MS at VIK. Regarding the secondary digester at SAV, SDI had lower vivianite compared to SDE.However, for the primary sludge, the amount of vivianite in PDI was comparable to that of PDE.There was a huge variation when it comes to the PSF samples.The Mössbauer results showed that vivianite is the primary form of iron in PSF7, constituting 80 % of the total iron content.In contrast, PSF8 had only 20 % of its iron content in the form of vivianite.In the previous results, it was already shown that the PSF sample location had shown huge variations in all the analyses, indicating that the conditions were not stable during operation.It was not possible to measure the PS7 sample because of the low iron content present in the sample (7.4 mgFe/ gTS) compared to PSF7, which was 52.6 mgFe/gTS.The PS8 sample had a similar amount of iron content as PS7, but more sample was used for the Mössbauer analysis.However, the results might be unreliable due to the low amount of iron in the sample, and thus we could not really compare the PS location to other locations.The XRD measurements were in line with the Mössbauer results, confirming the presence of vivianite Fe 2+ , vivianite Fe 3+ , pyrite, and ferrihydrite.Examples of other iron components found in the VIK samples were strengite (FePO 4 ⋅2H 2 O), goethite, hematite, ludlamite ([Fe 2+ ] 3 [PO 4 ] 2 ⋅4H 2 O), and ferrous sulfate.For the SAV samples, tochilinite, and iron phosphate hydroxides were found using the XRD analysis.The XRD measurements are presented in Appendix A.
The Mössbauer results were used to estimate the percentage of iron bound to phosphorus as vivianite (Fig. 5A).Then based on the molar ratio of iron and phosphorus in vivianite, along with the iron and phosphorus concentrations results, the maximum theoretical percentage of phosphorus that can be recovered as vivianite was calculated.Considering this in situ formation of vivianite, the maximum theoretical percentage of phosphorus that could be recovered from VIK was around 85 % for the MS point (calculated using MS8 and MS10) and almost 100 % for the DT point (calculated using DT7 and DT9).However, for SAV, the percentage was much loweraround 35 % for PDI7, 45 % for PDE7, 20 % for SDI4, and 35 % for SDE4.It is important to mention that these percentages could overestimate the amount of phosphorus that can be recovered as vivianite because the utilization of phosphorus for microbial growth was not considered during the calculation.Nevertheless, these percentages provide a comparative indication of phosphorus recovery rates among the different locations and both plants.Although most of the iron at SAV was in the form of vivianite, the phosphorus that could be recovered as vivianite was much lower.However, for the VIK case, most of the phosphorus could be recovered as vivianite using insitu vivianite formation.Fig. 5.The Mössbauer results (A) measured at 300.0 K (B) measured at 5.6 K (C) combining the 300.0K and 5.6 K.In graphs B and C, ferrihydrite refers to ferrihydrite, geothite, and hematite.The left y-axis represents the percentage of iron-containing compounds in each sample from the Mössbauer results, and the right y-axis represents the ferrous iron to total iron ratio from the spectrophotometric results marked by black squares.The x-axis corresponds to the sludge samples.Each sample location is followed by a number that represents the week of the sampling campaign.

Fe reduction
This work shows that most iron reduction was achieved in thickening zones (primary and mixed sludge) while a part of vivianite was formed in those zones.The iron reduction process was reported to be fast (2-4 days) under anaerobic conditions (Prot et al., 2022;Wang et al., 2019).This work confirms the relatively fast process of iron reduction and even goes further to conclude that iron reduction can be achieved within 1-2 days, which is in line with the laboratory batch tests conducted by Varga et al., 2020.The iron reduction at SAV was completed before reaching the digesters (primary and secondary).The sludge retention time for PDI and SDI was 1.1 days, and 90 % of the iron was already in ferrous form.The same percentage of iron was in the ferrous form in PDE and SDE, given that this sludge has a much higher retention time (20 days).The results have also shown that around 35 % of the iron was in ferrous form in the samples taken from INF at both plants.That is because in the pipeline, the conditions are partially anaerobic, and then the sludge is introduced to air during pretreatment.However, the iron oxidation process is not fast, leaving 35 % of the iron unoxidized.
At VIK, the iron reduction is slower than at SAV, although the Fe content in the sludge is higher at VIK than at SAV.This contradicts the findings of Wang et al. (2019), which state that iron reduction increases as the iron content in the sludge increases.The contradiction does not necessarily mean that the iron content in the sludge does not affect the iron reduction, but it does mean that the relationship is not straightforward, and several factors are involved.The findings of Wang et al. (2019) favor the theory that chemical iron reduction is physically enhanced.However, iron reduction is also impacted by microbiological and chemical conditions.Hao et al. (2022) have shown that microbial communities play a role in iron reduction.For example, the inhibition of methane-producing bacteria (MPB) can increase the iron reduction process as the dissimilatory metal-reducing bacteria and MPB compete for acetate as their substrate.This can explain the slow iron reduction at VIK.Therefore, we plan to conduct microbial analysis in the future to further understand the iron reduction process in the sludge.

Comparison of plants
More vivianite was formed at VIK than at SAV, despite the faster iron reduction at SAV.We can try to explain that by digging into the sulfur component in sludge.From a wider angle, VIK doses iron as ferrous sulfate and SAV as ferric chloride.And according to Heinrich et al. (2023) results, using sulfur containing chemicals should decrease vivianite formation.This cannot be applied to the VIK case, as 47 % and 82 % of the iron had formed vivianite in the mixed and digested sludges, respectively.It is possible that the vivianite percentage could have increased if sulfur free chemicals were used at VIK.Also, it is important to note that the molar Fe:P ratio of VIK sludge is 2.5.This seems to be the main driving factor for vivianite formation at VIK.According to Prot et al. (2020), the P fraction responsible for vivianite formation increases linearly as the Fe:P ratio increases, until reaching a plateau at a Fe:P ratio >1.5.In comparison, there was no sulfur chemicals dosed at SAV, and yet vivianite formation is less than that at VIK. Possible reasons are the lower Fe:P molar ratio imposed by the iron dosage in SAV compared to VIK and the higher sulfate concentrations in SAV than in VIK (INF point in Figs. 2 and 3).Sulfates undergo reduction to sulfur in anaerobic conditions, and more iron is immobilized by reacting with sulfur compared to capturing phosphate.The concentration of sulfate in the influent water at SAV ranged from 100 to 150 mg/l.It seems that the sulfate reduction at VIK started early at the mixed sludge (MS) location compared to SAV, where sulfate reduction varied.The sulfate concentration ranged from as low as 25 to as high as 170 mg/l in PDI and SDI.For PDE and SDE, the variation still exists but is lower, ranging from 25 to 70 mg/l.Overall, it seems that SAV had higher sulfur content sludge compared to VIK and produced less vivianite, although the latter is dosing sulfur containing chemicals.

Vivianite identification
Wastewater sludge, consisting of a multitude of compounds, poses a challenge to the identification of the constituting phases.Vivianite identification has been conducted in literature through three main analytical techniques: scanning electron microscopy, XRD, and Mössbauer spectroscopy.The first two techniques can produce useful qualitative information about the crystal shape, size, and crystalline phase, but not so much about the chemical quantity and chemical structure of vivianite.Mössbauer spectroscopy, only seeing the local environment of the iron atoms, gives an estimate of the quantities in both crystalline and amorphous phases.However, Mössbauer spectroscopy can only identify a limited number of dominating compounds as overlapping contributions can lead to several possible interpretations.Combining Mössbauer spectroscopy results at room (300.0K) and low (5.6 K) temperatures with XRD results aid in resolving the ambiguity.Although Mössbauer and XRD require specialized equipment and skilled researchers, the experiences of their use in this study show that they provide useful additional information about the chemical composition of the sludge.This information can be useful when trying to pinpoint ways of enhancing vivianite formation.
The Mössbauer spectroscopy results showed that vivianite formation starts in primary sludges (MS, PSF, PDI, SDI) and continues to increase in digested sludges (DT, PDE, SDE).In a retention time of 1.1 days, vivianite is already formed, and this formation increases as the time of anaerobic conditions increases (15-20 days in digester units).Since XRD analysis had confirmed the presence of vivianite in all these sludge samples, this indicates that at least some of the vivianite formed is in crystalline form.Using Mössbauer spectroscopy to compare VIK and SAV samples have pinpointed some differences.For example, pyrite formation was higher in SAV than in VIK.This is due to the higher concentration of sulfates (microbially reduced into sulfide) found in the influent of SAV compared to VIK.Another example is in SAV, where we observe tochilinite formation, but not in VIK.On the other hand, we find a higher presence of ferrihydrite at VIK compared to SAV.While these iron compounds are beyond the scope of this study, it is important to note that Mössbauer spectroscopy can serve as a valuable first step in comprehending the various iron transformations in wastewater treatment plants.

Challenges and uncertainties
The main challenge that was encountered during this study was the oxidation of vivianite.Various researchers have reported different theories regarding vivianite re-oxidation.For example, the findings of Wang et al. (2019) suggest that the re-oxidation of vivianite is slow once it is formed, whereas Prot et al. (2020) claimed that light and oxygen can easily oxidize vivianite.To test that, we remeasured two absorbers after one year of storage in the glove box, and the Mössbauer spectra were the same for both absorbers.We suggest that the oxidation of vivianite can be quite fast, but it already occurs during sampling.Then after that, equilibrium is established between vivianite Fe 2+ and vivianite Fe 3+ , and little oxidation may occur.Another challenge is the complexity of the Mössbauer analysis.The samples contain many materials that give similar contributions to the Mössbauer spectra, which can cause some ambiguity in the result.Comparing the room temperature and lowtemperature spectra and the results from XRD help to mitigate this problem.
Since this study was conducted in full-scale conditions, there were many uncertainties associated with the data collection.We tried to make sure that the plants were working in typically stable conditions every time we sampled and that there were no abnormal activities.However, it was difficult to make sure that conditions were always similar while sampling, so some abnormal results were discarded as outliers while interpreting the results.

Overall vivianite recovery
A first strategy is to collect the vivianite produced in situ in the sludge from existing process units (Fig. 5A).The locations with high potential for vivianite formation at VIK were MS and DT, with 47 % (average of MS8 and MS10) and 82 % (average of DT7 and DT9) iron conversion to vivianite, respectively.These locations had a molar Fe:P ratio of 2.5.The locations with moderate potential for vivianite formation are the locations with a molar Fe:P ratio of around 1. The corresponding locations at SAV are PDI, PDE, SDI, and SDE.The Mössbauer results showed that the percent of iron that formed vivianite was 59 % for PDI (average of PDI7 and PDI8), 72 % for PDE (average of PDE7 and PDE8), 40 % for SDI (average of SDI4 and SDI8), and 66 % for SDE (average of SDE4 and SDE8).This shows that vivianite formation increases as the molar Fe:P ratio increases.Despite iron reduction being relatively rapid and almost complete at SAV before the digester, vivianite formation seems to take more time to reach a climax after digestion.Although most of the iron at SAV was in the form of vivianite, the recoverable phosphorus in the form of vivianite was much lower.In that case a strategy consisting in collecting the sludge for crystallizing vivianite in dedicated reactor could be envisaged.The points with significant reduction of iron but only limited vivianite formation would be good candidates for implementing such a strategy.
In contrast, for the VIK case most of the phosphorus can be recovered as vivianite with in-situ formation.This can be explained primarily due to the high Fe:P ratio.At VIK, almost 100 % (DT location) of the phosphorus can be recovered as vivianite, but at SAV, the maximum recoverable phosphorus was 45 % from PDE.These percentages represent the upper limit of phosphorus content for vivianite formation, with the current iron dosage.However, it does not guarantee the amount of recoverable phosphorus.This limitation arises due to the inclusion of all vivianite components (crystal and amorphous) in the Mössbauer analysis, which was used to calculate the vivianite quantity.Mössbauer and XRD analyses have shown that pyrite was formed in all sludge locations, indicating the competition of phosphorus and sulfur for iron.The formation of FeS reduces the availability of iron and therefore decreases vivianite formation.
This study provides significant insights into the intricate relationships between iron, phosphorus, and sulfur under real-world conditions.It demonstrates that the likelihood of vivianite formation grows with increasing the molar Fe:P ratios, increasing the anaerobic sludge retention times, and decreasing the sulfate concentrations.While anaerobic digesters hold promise for vivianite formation and recovery, they are not the sole potential sites.Moreover, collecting the vivianite produced in situ is not the unique strategy to investigate, and future work on dedicated ex-situ vivianite crystallizer could also be considered.Supplementary dosage with iron(II) and better control of condition for lowering sulfide competition could be scrutinized in such ex-situ process.This creates possibilities for wastewater treatment plants lacking digesters to potentially reclaim vivianite.Digesters are primarily designed to optimize biogas production, with little emphasis on phosphorus recovery.Therefore, comprehending the mechanisms of vivianite formation across entire treatment plants becomes instrumental in pinpointing potential sites for enhancing vivianite formation.

Conclusions
The overall balance at both plants shows that ferric iron, phosphates, and sulfates were mostly reduced in the primary settled sludge before reaching the digester.In this study, the iron reduction was rapid and almost completed at both plants before the digester, especially in primary settled sludge.The vivianite formation starts conspicuously before the digestion, and the formation continued during the digestion.This highlights the possibility of implementing vivianite recovery before the digestor which was perceived to be the only location with high recovery potential.The Fe:P ratio plays a major role in vivianite formation.Although most of the iron at SAV and VIK was in vivianite form, the recovered phosphorus at VIK was much higher than that at SAV.The higher the sulfur content in the sludge, the more iron sulfide is formed, which reduces the availability of iron.It is also suggested to investigate ex-situ formation of vivianite in dedicated reactors as a complementary strategy.This work supports the understanding of vivianite formation and paves the way for these new routes for phosphorus recovery.

Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

•
As the sulfer content in sludge increases, vivianite formation decreases.•The digester is a possible location for vivianite recovery, but not the only one.• Sludge prior to digestion undergoes unstable vivianite formation.

Fig. 1 .
Fig. 1.Simplified diagram of the Viikinmäki (A) and Seine Aval (B) wastewater treatment plants, with sampling points shown in green and iron dosing points in purple.

Fig. 2 .
Fig. 2. Daily loads (kg/d) of VIK (A) and SAV (B) using the average values of the 10 sampling weeks.The loads presented are total iron (Fe), total ferrous iron (Fe 2+ ), total phosphorus (P), soluble phosphorus phosphate (P-PO 4 ), and soluble sulfate (SO 4 ).Mass balance values (total iron and total phosphorus) are presented in red, iron dosing loads in purple, and the utilities' data effluent load values in orange.

Fig. 3 .
Fig. 3. Box plots of Viikinmäki (left) and Seine Aval (right) show the total iron, total ferrous iron, soluble phosphorus phosphates, and soluble sulfate concentrations at all sampling locations.The legend shown on the top left graph applies to all the graphs.

Fig. 4 .
Fig. 4. Molar concentrations at VIK (left) and SAV (right) using the average values of the 10 sampling weeks.
Sludge blankets were assumed to be around 30 % of the total height of the clarifiers.b The solids were measured as TSS for INF, PA, AN, AR, RAS and as TS for MS, DT, PS, PSF, PDI, PDE, SDI, SDE. a