Hydrothermal carbonization (HTC) of dairy waste: effect of temperature and initial acidity on the composition and quality of solid and liquid products

Background: Hydrothermal carbonization (HTC) of dairy processing waste was performed to investigate the effect of temperature and initial pH on the yield and composition of the solid (hydrochar) and liquor produced. All hydrochars met the EU requirements of organo-mineral solid fertilizers defined in the Fertilizing Products Regulation in terms of phosphorus (P) and mineral content. Methods: Laboratory scale HTC was performed using pressurized reactors, and the products (solid and liquid) were collected, stored and analyzed for elemental composition and nutrient content using Inductively coupled plasma optical emission spectroscopy (ICP-OES), ultraviolet-visible spectrophotometry (UV-Vis) and other analytic techniques. Results: Maximum hydrochar yield (60.67%) was observed at T=180°C and pH=2.25, whereas the maximum P-recovery was 80.38% at T=220°C and pH=4.6. The heavy metal content of the hydrochars was mostly compliant with EU limitations, except for Ni at T=220°C and pH=8.32. Meanwhile, further study of Chromium (Cr) species is essential to assess the fertilizer quality of the hydrochars. For the liquid product, the increase in temperature beyond 200°C, coupled with an increase in initial acidity (pH=2.25) drove P into the liquor. Simultaneously, increasing HTC temperature and acidity increased the concentration of NO 3 - and NH 4 + in the liquid products to a maximum of 278 and 148 mg/L, respectively, at T=180°C and pH=4.6. Furthermore, no direct relation between final pH of liquor and NH 4 + concentration was observed. Conclusions: HTC allows for the production of hydrochar as a potential fertilizer material that requires further processing. Adjusting HTC conditions enhanced P-recovery in the hydrochar, while retrieving higher nitrate concentrations in the liquid product. Optimizing HTC for the production of qualified hydrochars requires further treatment of Cr content, studying the availability of P in the products and enhancing the hydrochar yield for economic feasibility.


Introduction
The increase in human population, alongside the continuously changing lifestyle and dietary habits of humans, is leading to the rise of serious concerns over the ability to balance between sustaining human needs and conserving the environment (Shete & Shinkar, 2013b).In particular, the management of agricultural and industrial waste has elevated into a priority for several countries as studies are expecting an increase of 50% expansion in global food production by the year 2050 (Luqman & Al-Ansari, 2021).This expansion will not come cheap, as the risks for satisfying such growth include resource depletion, environmental imbalance, and waste disposal (Atallah et al., 2020).The latter presents one of the rising challenges for most agricultural and industrial sectors, including the dairy sector.
The dairy sector is experiencing significant expansion, where the production of milk is expected to reach 977 million tonnes by the year 2025, with an increase of 177 million tonnes from the production recorded in 2019 (Kozłowski et al., 2019).The European Union preserves the top spot as the largest milk producer in the world, with an aggregate 160 million tonnes of milk produced in 2018 (EDA, 2018).The expansion in milk production is followed by an increase in dairy waste resulting from the different processing streams and additives, which has become one of the major sources of industrial waste in Europe (Carvalho et al., 2013).Dairy waste presents major challenges for environmental stability, the first of which is the effect of traditional disposal methods on natural sources of water and land.In Ireland, the major route for dairy waste disposal is land spreading, whereas a significant quantity (24%) of the waste is removed by licenced contractors (Carvalho et al., 2013).Therefore, the need for treating dairy waste has become a necessity to avoid its potential risks.Applications such land spreading of dairy waste have been minimized due to their serious effects on land and marine resources due to the high level of pollutants and the potential leaching of elements and eutrophication (Tikariha & Sahu, 2014).Other common treatments of dairy waste include physical, biological, chemical and thermochemical operations.Physical separation of grease and oil traps, along with biological nutrient removal are considered conventional treatment techniques (Shete & Shinkar, 2013a).Meanwhile, chemical and thermochemical treatment of dairy waste have gained more interest in recent years for their ability to reduce suspended solids and pollutant concentrations (Loloei et al., 2014).
In addition to that, the treatment of dairy waste presents an opportunity to achieve a successful economic and environmental cycle.Dairy processing waste (DPW) was recognized as a potential feedstock of STRUBIAS (struvite, biochar, or incineration ashes) products, which are capable of fertilizer applications and soil amendments (Shi et al., 2021a).Ashekuzzaman et al. (2019) revealed that lime treated dissolved air floatation (DAF) dairy sludge possessed a significant nutrient content, in addition to heavy metal content that was below EU limitations.The average Nitrogen (N): Phosphorus (P): Potassium (K) content of dairy sludge was 19.5:65.9:3.9 g/kg respectively (Ashekuzzaman et al., 2019).Similarly, the amount of nitrogen in other types of dairy waste was found to be significant, ranging between 14 to 830 mg/L in another study (Chokshi et al., 2016).
Thus, the treatment of dairy waste not only solves the environmental risks of the dairy industry, but also presents an opportunity for producing valuable products for agricultural applications.
Previous experiments for the treatment of dairy waste have been conducted on laboratory and pilot scales.Hydrothermal carbonization (HTC) presents a promising technique for thermochemical treatment of dairy waste to produce valuable products.Wu et al. (2018) performed HTC of dairy manure at different values of temperature, residence time and biomass/water ratio.The results showed that HTC improved

Amendments from Version 2
Corresponding to the reviewers' comments and suggestions, the new version of the manuscript includes a brief description of the current approaches in dealing with dairy waste in the introduction section.Also, a design of experiment (DOE) model is introduced in the experimental section by the aid of the Box-Benhken model, in addition to specification of the type of acid used to adjust the pH.Characteristics of the dairy waste feedstock, including the carbon content data, are added to the results section.The effect of temperature and pH on the production of secondary char is explained in the results section, and a comparison between P-recovery rates from HTC with other thermochemical techniques is also added to the discussion section.Finally, a mass balance on P during HTC is added to provide a better understanding of the recovery rates during HTC.Some important terminology is clarified, such as the definition of P-recovery, the notion of improving fertilizer quality of hydrochars and the definition of optimal conditions for Precovery.The link between the characteristics of the liquid product and the optimality of P-recovery from the hydrochar is also discussed thoroughly in the results & discussion section.
Any further responses from the reviewers can be found at the end of the article the elemental composition of dairy manure and its energy potential, and it facilitated the recovery of valuable nutrients such as N, P and K (Wu et al., 2018).Similarly, Marin-Batista et al. (2020) suggested HTC as a method for improving the energy content of biomass derived from dairy waste (Marin-Batista et al., 2020). Finally, Atallah et al. (2020) performed HTC on dairy sludge with different experimental conditions, and their results confirm that HTC elevates the carbon properties in hydrochar and increases the structural and chemical stability of the solid (Atallah et al., 2020).
Based on the above, the following paper investigates the HTC of dairy waste and the effects of different operating parameters on the quality and composition of the solid and liquid products, with particular emphasis on the fertilizer potential of the solid hydrochar.To our knowledge, no previous assessment of hydrochar as a potential fertilizer was performed in reference to EU Regulation 1069/2009.

Feedstock
Dairy sludge was collected from a wastewater treatment plant near Limerick, Ireland.The samples were specifically collected from the post-DAF section, where a combination of several filtered dairy waste streams is present.The moisture content of the sludge was measured using the oven dry method (CEN/TS 15414-1:2010) (15414-1:2010, 2010), and it was found to be 79%.No water addition is required as the high moisture content present in the sludge allows for water to act both as a reactant and a catalyst for HTC reactions.The carbon and nitrogen contents were measured using a LECO 828 CHN Analyzer calibrated with Ethylenediaminetetraacetic acid (EDTA), and the data was used to calculate the HHV according to the following empirical equation (Merckel et al., 2019):

Hydrothermal carbonization
Hydrothermal carbonization of dairy sludge was performed using PARR 5523 -Catalogue no.4500 (100 mL in volume) reactor in the University of Limerick, Ireland.Dairy waste samples were introduced into the reactor vessel through a glass liner.The reactor was tightly sealed to allow for autogenous pressure build-up inside, while the temperature and stirring speed of the mixer were controlled through Honeywell© 900 PID controller software.The reaction temperature was varied between 180°C and 220°C to account for the effect of temperature, while the stirring speed of the mixture was set at 180 rpm.The reaction time for all runs was fixed at two hours, with the starting point assumed to be the time at which the set point temperature is reached.

Sample labelling
To account for the effects of temperature and pH on the outcome, every HTC run was labelled to address the varying conditions.The reaction temperature was changed across three different values (180, 200, 220°C), while the initial pH was varied across three different values (8.32, 4.6, 2.25) by using concentrated H 2 SO 4 , through a method adopted and modified from previous configurations (Ghanim et al., 2017).Therefore, the product labels were designed according to the following order "Product-Temperature-pH," where "Product" can either be a hydrochar (HC) or a liquor (L)."Temperature" was replaced by the values of the reaction temperature, and "pH" referred to the initial pH of the introduced sample.
Based on the above configuration, the reactions performed were a total of 9 performed in duplicate.

Product separation
Upon the termination of the reaction, the wet product was subject to separation through Vacuum Filtration using Whatman© Grade 52 filter paper.The outcome was a solid carbonaceous material called "hydrochar" and a dark brown liquid called "liquor."The wet hydrochar was then dried in a Mason Technology Universal oven UN30 at 105°C for 24 hours, while the liquor was stored in the fridge at 5°C for further analysis.

Design of Experiment (DOE)
To perform a design of experiment, early experimental trials were introduced to Minitab© and the Box-Behnken design was used to assess the effect of three main parameters (temperature, residence time and pH) on the hydrochar yield (HY) of HTC runs.The minimum and maximum values for each parameter are specified based on the upper and lower limits for HTC operating conditions.For instance, HTC occurs between 160 and 240℃, a pH ranging between 2-12.The residence time range was defined from 30-120 minutes to avoid extensive laboratory operation.The effect of each parameter, along with the interactive effects of the parameters are studied below.

Characterization and analysis
Hydrochar yield.The hydrochar and liquor underwent a series of tests for assessing the quality of the HTC reaction and its products.The hydrochar yield was calculated according to the following equation: g dry mass of hydrochar ( ) HY 100 g dry mass of feedstock ( ) Ash content.The ash content of the sludge and their derived hydrochars was measured according to CEN/TS 15403 by the aid of a furnace, where dry solid samples were introduced, and the temperature was raised to 550°C and kept constant for 60 minutes.Understanding the change in ash content is an indicator of the fuel quality of the hydro chars and the extent of the reactions occurring.

P-analysis.
Total phosphorus (TP) content in the dairy sludge and hydrochars was measured using an Agilent 5100 synchronous vertical dual view inductively coupled plasma optical emission spectrometer (Agilent 5100 ICP-OES).The recovery of P in hydrochar was calculated according to the following equation: In addition to P, the concentration of minerals such as Calcium (Ca), Iron (Fe), Magnesium (Mg) and Sodium (Na) and heavy metals such as Cadmium (Cd), Chromium (Cr), Cobalt (Co), Manganese (Mn), Nickel (Ni) and Zinc (Zn) were also measured using ICP-OES to assess the fertilizer quality of the hydrochar as a potential STRUBIAS product.
Liquid product.P content, as well as ammonia (NH 4 + -N) and nitrate (NO 3 -) contents in the HTC liquor were measured by UV spectrophotometry using a Hach© DR3900 spectrophotometer.Details of the method are provided in the Extended data (Khalaf, 2022a).The final pH of the HC liquors was measured using a calibrated EU 6+ pH meter, with all measurements performed in duplicate.

Feedstock Properties
The properties of the initial dairy sludge feedstock are presented in Table 1.From this data, it is observed that the sludge possesses low carbon content, high ash content and significantly high Fe content.This is mainly due to the addition of chemical coagulants, which mostly consist of iron salts for the precipitation of P and other elements.In terms of P, the initial P content of the dairy sludge was 5.7% by weight, which is already above the specified limit for EU fertilizers.The N:P:K ratio of the sludge was 4.9:5.7:1.7, which is similar to values reported in literature (Ashekuzzaman et al., 2019).

Proximate Analysis.
According to the results in Table 1, the C content in dairy sludge decreases after HTC, and with the increase in temperature.This can be explained by the production of organic acids, sugars and carbon-based gases, which eventually reduce the carbon content of the solid phase.Meanwhile, the decrease in initial pH enhances further reduction in carbon content, which can also be related to the same decomposition reactions.In general, the C content of dairy waste was less than other types of industrial wastes (Oliveira et al., 2013), which can be explained by the high amounts of iron and other metal content introduced during chemical coagulation.
The higher heating value of the dairy sludge was around 9 MJ/kg, and upon HTC, it increased to 10 MJ/kg at 180℃ and pH=8.32, after which it decreased as the temperature increased.This finding shows that hydrochars produced from the HTC of dairy sludge are not adequate for fuel applications, which has been reported previously in literature (Lucian et al., 2018).

DOE
The results of the DOE are presented in the figures below.
As shown in Figure 1, the effect of temperature on hydrochar yield is almost linearly negative, whereas for pH, the effect is not linear, with a peak hydrochar yield recorded at slightly acidic conditions (pH~4.5).Meanwhile, the effect of residence time on hydrochar yield was not deterministic, as shown in Figure 2, where at different temperatures, the effect of residence time was different.For this reason, the residence time of the experimental runs was fixed at 120 min.

Hydrochar yield
The hydrochar yields reported on a dry basis are presented in 3 for the different initial reaction conditions (Khalaf, 2022b).Additional data on hydrochar yield calculations are present in Table S1 in the Extended data (Khalaf, 2022a).As shown in the figure below, the maximum hydrochar yield was recorded at T=180℃ and pH=2.25 reaching up to 60.26%, which is slightly lower than the normal values of hydrochar yield recorded for similar material in literature (Huezo et al., 2021).

Effect of temperature.
Reaction temperature is considered to be the dominant parameter influencing the extent of reactions occurring through HTC (Khan et al., 2021).In general, there is an inverse relation between temperature and hydrochar yield, i.e., an increase in temperature leads to a decrease in hydrochar yield.This is because the increase in temperature provides additional energy for further hydrolysis and cleavage of bonds in the structures of the feedstock (Nizamuddin et al., 2017).The effect of temperature on hydrochar yield is consistent for a variety of HTC feedstock.According to Sun et al. (2010), the recovery of solid from HTC products was highest at temperatures below 200°C, whereas an increase of temperature to 200-250°C led to a significant increase in liquid yield (Sun et al., 2010).The decrease in hydrochar yield beyond 200°C is attributed to increased dehydration reactions.This leads to further decomposition of sugars into organic acids and phenolic derivatives comprising the liquid product (Olasupo et al., 2020).For this reason, specifying a range of optimal operating temperatures is an important step in optimizing the hydrochar yield.
The experimental results from this study show that the increase in HTC temperature led to a decrease in hydrochar yield for all initial conditions of acidity.At pH=8.32, the increase in HTC temperature from 180°C to 220°C led to a reduction    et al., 2015).
Effect of initial pH.The effect of initial pH on hydrochar yield is not fully understood.In general, acids are considered to be catalysts which enhance hydrothermal decomposition reactions during HTC (Flora et al., 2013).
The results of the experiments showed that the effect of initial acidity varied at different reaction temperature, which may reflect the dominant role of reaction temperature during hydrothermal carbonization, as presented in Figure 3.At T=180°C, the increase in initial acidity led to an increase in hydrochar yield with a maximum of 60.27% at pH=2.25.Similarly, at elevated temperatures, the increase in initial acidity led to a significant increase in hydrochar yield with maximum yields obtained at pH=2.25 at T=200°C and 220°C, respectively.In general, it can be observed that an increase in acidic conditions led to a significant increase in hydrochar yield.
The effect of acidic activity on hydrochar yield is not consistent in literature.et al., 2011).
The reason behind these contradictory findings could lie in the varying extents of decomposition for different HTC experiments.For instance, acidic conditions enhance hydrolysis of initial compounds such as cellulose and hemicellulose into sugars, furans and other phenolic compounds.The re-polymerization and aromatization of these compounds leads to the production of the complex carbon structure known as "secondary hydrochar" (Volpe et al., 2021) Previous studies demonstrated that secondary char production is enhanced by acid addition, which can explain the increase in hydrochar yield recorded in this study at pH=2.25 despite operating at a moderate temperature (Volpe et al., 2021).The effect of temperature on the production of secondary char is competitive with the decomposition reactions.This was explained by Evcil et al. (2020) during HTC of wood samples, where they observed an increase in secondary char production at acidic conditions and higher temperatures combined with a decrease in total hydrochar mass yield (Evcil et al., 2020).
However, if the re-polymerization is inhibited or overcome by side reactions, these products will add to the present liquid complex known as the "HTC liquor", thus yielding more liquid product.The effect of acidity on the final re-polymerization and aromatization step for dairy-based hydrochars is yet to be completely identified.

Ash content
Ash is composed of the inorganic remains that are left over after the combustion of the material (Hashan et al., 2013).
Understanding the ash content of hydrochar provides insight into the mineral composition of the solid product, in addition to the fuel quality of the product.The ash content of the initial dairy processing sludge was 48.83%, which is high in comparison to that in other types of feedstock such as orange peel, which was around 13.5% (Burguete et al., 2016).Kwapinska & Leahy (2017) investigated the properties of sludge collected from milk processing plants in Ireland and reported that the typical ash content was 36.41%(Kwapinska & Leahy, 2017).The high ash content in the dairy processing sludge is due to the addition of ferric coagulants such as FeCl 3 and FeSO 4 in the wastewater treatment plant reduce the Chemical Oxygen Demand (COD) and Biochemical Oxygen Demand (BOD) levels in dairy wastewater (Davarnejad et al., 2018).This explanation is supported by the high Fe concentration (114422 mg/kg) present in the dairy waste used for HTC experiments.
The ash content of the hydrochars increased following HTC with a minimum increase of 30%, as shown in Figure 4.This result confirms the findings of Garlapalli et al. (2016) regarding the increase in ash content of hydrochars formed from digestate at temperatures above 180°C.The authors contributed the increase in ash content to the formation of oxides, which tend to resist melting and remain in the ash (Garlapalli et al., 2016).The increase in temperature influenced an increase in the ash content in hydrochars with different initial pH.For instance, at pH=8.32, the increase in temperature from 180°C to 220°C led to an increase in ash content from 63.92% to 69.76%.This observation confirms the suggestion of Mäkelä et al. (2015) on the significant positive effect of temperature on hydrochar ash content (Mäkelä et al., 2015).Similar results were reported by Lin et al. (2015), where the ash content of hydrochars increased from 54.81% to 63.78% as the HTC temperature increased from 180°C to 270°C (Lin et al., 2015).Meanwhile, the effect of initial pH on ash content could be studied by assessing the fractionation of the initial ash in HTC products.In the absence of acid addition, the percentage of ash content in hydrochar fluctuated between 53.99% and 68.77%.However, as initial pH decreased, the percentage of initial ash content retained in the hydrochar increased significantly to reach 89.54% at T=180°C and pH=2.25.These results suggested that the hydrochars produced from dairy waste possess low fuel quality due to their high mineral content.
Phosphorus recovery EU regulation.One of the approaches for measuring the potential of hydrochar as a fertilizer component is its phosphorus content.According to Product Function Category (PFC) 1 (B).(I)specified in Annex I in EU Regulation 1069/2009, a solid organo-mineral fertilizer consisting of multiple nutrients must contain at least 2% by mass of total P (OJEU, 2019).
Results of the ICP measurement showed that the initial dairy waste contains 5.71% of P on a dry basis.Even though this concentration is above the minimum EU regulation requirement, HTC was used to improve the quality of the dairy waste by producing hydrochar.As shown in Figure 5, the P content in all hydrochars was higher than the initial P content in dairy waste, which demonstrates the ability of HTC to increase the nutrient concentration of dairy sludge.In addition, the increase in temperature led to an increase in the concentration of P for all conditions except at pH=2.25, where the increase in temperature led to a reduction in P content from 7.49% at T=180°C to 6.78% at T=220°C.These results confirmed the observations of Shi et al. (2019) regarding the positive effect of temperature on the concentration of P in hydrochar.
The study also suggested that high concentrations of acid addition can drive phosphorus into the liquid product, which explains the reduction of P percentage at initial pH of 2.25 (Shi et al., 2019).This suggestion was confirmed in this paper, where an increase in temperature led to a reduction in P-concentration in the liquid product.In terms of EU regulations, the P percentage in all hydrochars was higher than the regulation limit, with a maximum P percentage=9.14%at T=220°C and pH=4.6.Thus, the produced hydrochars qualify for solid organo-mineral fertilizer application in terms of P content.

P-recovery.
The recovery of phosphorus in hydrochar has been emphasized by several previous studies focusing on the immobilization of P-species through HTC (Dai et al., 2015).
In general, the definition of P-recovery may vary, yet in this paper, it refers to the amount of initial P that was retained in hydrochar.Data for P-recovery calculations are present in Table S2 in the Extended data (Khalaf, 2022a).The P mass balance for the calculations of total P-recovery is presented in Table 1.Previous studies showed that the recovery of P in hydrochars was found to be around or above 80% (Meng et al., 2019).As shown in Figure 6, this study found that the P-recovery in hydrochar produced from HTC of dairy waste was between 53% and 80% with maximum P-recovery of 80.23% observed at T=220°C and pH=4.6.This further showed that HTC favoured the concentration of P in the hydrochar, which concurs with the previous findings of Heilmann et al. (2014), where up to 90% of the total P was recovered in the hydrochar resulting from the HTC of different animal manures (Heilmann et al., 2014).Similarly, Huang & Tang (2016) investigated the recovery of P from activated sludge and anaerobically digested sludge, and the results showed that 89.3% and 95.5% of P was recovered in the hydrochar produced from each feedstock, respectively (Huang & Tang, 2016).The P-recovery rates from other techniques such as pyrolysis and incineration were also found to be in the range of 80-90%, as reported in recent studies (Santos et al., 2021;Zhu et al., 2022).However, taking into account the need for a pre-drying step and the high operating temperatures for pyrolysis and incineration, the similar P-recovery rates achieved by HTC at lower operating temperatures reveal an advantage of HTC.
Therefore, in terms of recovered P, the hydrochar produced at T=220℃ and pH=4.6 presents the most viable option.However, total P alone is not sufficient for defining the efficiency of P-recovery for fertilizer application, which requires further studies on the available P pools in the hydrochar.Further processing for recovering P from the hydrochar include acid extraction, which shows high recovery rates but reproduces the problem of heavy metal recovery.On the other hand, alkaline extraction can produce relatively high P-recovery from hydrochar while reducing the amounts of heavy metals recovered (Liu et al., 2021).
Effect of temperature and initial pH.Similar to its effect on hydrochar yield, temperature plays a significant role in influencing the recovery of P in hydrochar.In the absence of acid addition, the P-recovery in hydrochar was almost consistent and fluctuated between 70% and 72%.However, the effect of temperature became more significant with pH reduction through acid addition.At a pH=4.6, the increase in temperature from 180°C to 220°C led to an increase in P-recovery from 69% to 80%.Similarly, and more significantly, at pH=2.25, the same increase in temperature produced a 42.58% increase in P-recovery.These results showed that the effect of temperature alone on P-recovery was not significant; however, in the presence of acid addition, the recovery of P from hydrochar increased significantly as temperature was increased.To explain the effect of temperature, Ekpo et al. (2016) suggested that the precipitation of P with metals such as Ca, Mg and Fe leads to the accumulation of P in the hydrochar (Ekpo et al., 2016).The increase in temperature increases the concentration of metal ions available for P-precipitation, which explains the increase in P-recovery at higher temperatures.To assess the effect of initial pH, the results were analyzed by fixing the temperature and varying the initial pH.At moderate temperatures (T=180°C), P-recovery in the hydrochar showed a significant reduction as initial pH decreased from 8.32 to 2.25.However, at higher temperatures, the effect of initial pH on P-recovery was reversed, where an increase in initial acidity enhanced P-recovery, with a maximum observed at pH=4.6.The data suggests that at moderate acidity the effect of temperature is dominant allowing for more precipitation of P in the hydrochar.The effect of initial pH on P-recovery in the hydrochar was investigated by Zheng et al. (2020).As the initial pH increased from 3 to 7, the total P enrichment increased from 81.42% to 89.78%, after which it decreased to 85.2% at pH=13 (Zheng et al., 2020).Similar results were reported by McIntosh et al. (2022), where the increase in the initial pH of sewage sludge HTC from 2 to 7 led to an increase in P-recovery from 92.8% to 98.4%, respectively.However, an increase in initial pH from 7 to 12 at fixed conditions of temperature led to a decrease in P-recovery from 98.4% to 88.7% (McIntosh et al., 2022).
Heavy metals EU limits.Another significant indicator for assessing the fertilizer potential of hydrochar is the concentration of heavy metals, which can limit the application of hydrochars.Heavy metals are defined as the metals and metalloids possessing densities higher than 5g/cm 3 , and the most common heavy metals in the fertilizer sector include Arsenic (As), Cadmium (Cd), Chromium (Cr), Copper (Cu), Nickel (Ni), Lead (Pb) & Zinc (Zn) (Cui et al., 2021).
The concentrations of heavy metals in the collected dairy waste and hydrochars are shown in Table 4 along with the concentration limits defined by PFC 1 (B).(I) in EU Regulation 1069 for solid organo-mineral fertilizers (OJEU, 2019).
The results show that the heavy metal concentrations of the initial dairy processing waste were below the limit of contamination specified by the EU Regulation for all heavy metals.Similarly, all of the hydrochars showed concentrations that were below the maximum allowed limits for all heavy metals except for Ni at T=220°C and pH=8.32,which recorded a concentration of 60 mg/kg, slightly above the allowed limit of 50 mg/kg.The total concentration of Chromium (Cr) was also studied, and it was observed that HTC concentrates Cr in hydrochars, which can present a source of environmental pollution (Ghanim et al., 2022).However, assessing the actual implication of Cr concentration in hydrochars compared to EU regulations can be done by Cr speciation.The most abundant heavy metal was Zn (136-230 mg/kg), while As and Cd were below limits of detection for all hydrochars, thus abiding by the requirements for solid organo-mineral fertilizers.
In all hydrochars, the concentration of heavy metals was generally higher than the original feedstock, which shows that the major destination for heavy metals was hydrochar.The percentage of heavy metals that were retained in hydrochars were not lower than 60% for all heavy metals except Pb, which had an average recovery below 50% in the hydrochar.Data on the heavy metal fractions retrieved in the hydrochars are provided in Table S4 in the Extended data (Khalaf, 2022a).It was observed that HTC concentrates heavy metals in the hydrochar, which could affect its qualification as a solid organo-mineral fertilizer.However, further validation of the fertilizer quality of the hydrochars can be performed by assessing the concentration of toxic substances such as hexavalent chromium to have a detailed vision of the heavy metal content in the hydrochars.Therefore, it is difficult to assess the optimal conditions for producing hydrochar with the best fertilizer quality, yet according to the heavy metal composition, the hydrochar produced at T=200°C and pH = 4.6 possesses the lowest heavy metal concentrations.This reduces the operating costs for further processing compared to the other hydrochars with higher heavy metal content.

Effect of Parameters.
The effect of temperature and initial pH on heavy metal concentrations was studied according to the results presented in Table 2.
In the absence of acid addition (pH=8.32), the concentrations of all heavy metals except Cr experienced an overall increase with an increase in HTC temperature.Similar results were found by Breulmann et al. (2017) during the HTC of sludge.
As temperature increased from 180°C to 200°C, the concentration of Pb increased from 34 to 40 mg/kg, along with an increase in the concentrations of Zn, Mn, Cr, Cd and As (Breulmann et al., 2017).This suggests that the effect of temperature on HTC reactions increases the ability for adsorbing heavy metals by increasing the porosity of hydrochars (Jaruwat et al., 2018).
Upon acid addition, the effect of temperature differed depending on the metal species.At pH=4.6, the increase in temperature resulted in an increase in the concentration of all heavy metals, which confirmed the previous findings of Zhai et al. (2016) regarding the effect of acidic media on the accumulation of heavy metals in hydrochar (Zhai et al., 2016).However, as the initial pH was reduced to 2.25, the effect of temperature was reversed for Mn, Zn, Pb, and Co, whereas Ni and Cr maintained the same trend of concentration increase with temperature.One of the suggested explanations for the effect of acidity on heavy metals can be the enhancement of competitive ion exchange due to the increase in H + ions with acid addition (Inglezakis et al., 2003). Breulmann et al., (2017) studied the effect of initial pH, and their results revealed that acid addition showed different effects on different heavy metals.For Zn, Cr and Cu, the increase in initial acidity reduced the concentration of heavy metals in hydrochar, while an opposite effect was observed on Ni, Pb and Mn upon the decrease in initial pH (Breulmann et al., 2017).

Liquid product analysis
Final pH.Measuring the final pH of HTC liquor provides an insight into the severity of the reactions occurring during HTC by hinting to the composition of the liquid product (Borrero-López et al., 2020).Lower values of final pH are usually connected to the production of organic acids such as acetic, citric, lactic and formic acids from the decomposition of sugars and furfurals (Lu et al., 2013).
As shown in Table 3, the conditions of liquors produced at different reaction conditions were fluctuating between slightly acidic and neutral.The minimum final pH (5.38) was recorded at T=180°C and initial pH of 2.25, whereas the maximum final pH (7.88) was observed at T=200°C and an initial pH of 4.6.In general, the final pH of the different liquors did not show any significant deviation from the normal range of pH presented in literature.Reza et al. (2015) revealed that the pH of the liquid product resulting from the HTC of wheat straw at different initial conditions of acidity ranged between 3-10 (Reza et al., 2015).
In the absence of acid addition, the pH of the final liquor was lower than that of the initial feedstock for all experiments.Furthermore, the increase in reaction temperature from 180 to 220°C led to an increase in the final pH of the resulting liquor from 5.72 to 7.12, respectively.This reduction in acidity seems to contradict the increasing production of organic acids at elevated temperatures, yet two explanations for the increase in final pH are suggested.The first explanation links the increase in final pH to the production of ammonium products which have a basic chemistry.Ammonia products are the final products of protein hydrolysis, especially that the average concentration of protein in dairy wastewater is estimated to be around 388 mg/L (Kurup et al., 2019).According to Wang et al. (2019), successive degradation of amino acids produces ammonia alkaline groups at high temperature, and these groups are concentrated in the liquid product, thus increasing the basicity of HTC liquor (Wang et al., 2019).
To address this possibility, the concentrations of NH 4 + -N in the liquors were measured through spectrophotometry.In the absence of acid addition (pH=8.32), the concentration of ammonia increased with an increase in reaction temperature, yet this increase was not directly parallel to the increase in final pH.At moderate acidic conditions (pH=4.6), the final pH of the liquors was almost neutral at different reaction temperatures, and the concentration of ammonia was significantly higher than that in the absence of acid addition.Yet, the pattern relating the concentration of ammonia with the final pH was not consistent.Finally, at severe acidic conditions (pH=2.25), the final pH of the liquors became slightly acidic, which is normal due to the presence of higher concentrations in the reaction.Meanwhile, the concentrations of ammonia were similar to those recorded at moderate initial acidity, with similar inconsistency between the concentrations and the final pH of the liquor.
The results show that ammonia products indeed played a major role in increasing the final pH of HTC liquor, especially under acidic initial conditions, which enhance the release of ammonia from biomass (Inoue et al., 1997).However, the lack of direct correlation between the increase in final pH and the ammonia concentration in the liquor suggests that several different factors influence the increase in final pH.Similar observations were reported by Dai et al. (2017) during the HTC of cattle manure at different conditions of initial acidity.Their results showed that no direct correlation was found between the  -N concentration and the final pH of aqueous products (Dai et al., 2017).
Another explanation for the increasing pH of the liquid product comes from the facilitation of dehydration reactions at elevated temperatures, which increases the water in the liquid product, thus diluting its acidic composition (Ghaziaskar et al., 2019).

Total phosphorous concentration.
The concentration of total phosphorous (TP) in the Hydrochar (HC) liquors produced at varying initial conditions was measured.The results showed that at different conditions of initial pH, the concentration of TP decreased with an increase in reaction temperature, which can be explained by the simultaneous increase in P-recovery in the hydrochar as shown earlier in Figure 5. Since higher temperatures favor P-precipitation in the solid product, the concentration of P in the liquid product was expected to decrease.This was observed by Cui et al. (2021) during the HTC of wetland biomass, where an increase in HTC temperature from 200 to 260°C led to a significant and gradual decrease in P concentration in the liquid product from 492.73 mg/L to 36.7 mg/L, respectively (Cui et al., 2021).These findings support the results of our study, where the decrease in initial pH from 8.32 to 2.25 led to a significant increase in TP concentration in liquor at all reaction temperatures, as shown in Table 3.The extraction of P into HTC liquor at different conditions of initial pH was investigated by Shettigondahalli Ekanthalu et al. (2021), and their results confirmed the significant increase of P recovery in the liquor following the addition of inorganic acid (Shettigondahalli Ekanthalu et al., 2021).Similar observations were reported by Shi et al. (2021b) regarding the influence of acidic media on the release of P to HTC liquor (Shi et al., 2021a).This increase can be explained by the increase in the production of the liquid, which drives a portion of the phosphorus into the liquor.The increase in average liquor yield from 76% to 82% as pH decreases from 8.32 to 2.25 supported this suggestion.
Nitrate and ammonium concentration.In addition to estimating the fertilizer quality, assessing nitrogen content in HTC products provides insight into the extent of decomposition reactions occurring.According to literature, the dominant N-species in bio-oil are NH 4 + -N and NO 3 -N, along with minor presence of NO 2  -N and CN -N (Kruse et al., 2016).The results of the spectrophotometric analysis are presented in Table 5 and  Figure 8.It was clear that the concentration of nitrate was higher than that of ammonium for almost all liquors produced, which is in agreement with the findings of previous investigations (Shrestha et al., 2021).The effects of initial conditions on inorganic N content were also investigated.The effect of temperature on inorganic nitrogen content varied at different conditions of initial acidity.In the absence of acid addition, an increase in temperature from 180°C to 220°C increased the N-content in liquor, with a peak concentration of 355.76 mg/L at T=200°C.Furthermore, the increase in temperature expanded the gap between NO 3 -and NH 4 + concentrations, where an increase in temperature from 180°C to 200°C led to an increase in NO 3 -concentration from 170 to 300 mg/L, accompanied with a decrease in NH 4 + concentration from 82 to 56 mg/L.This effect was reversed as the temperature was increased to 220°C.Following acid addition, the effect of temperature became more significant.At pH=4.6, the increase in temperature induced a large decrease in ammonia concentration, whereas the concentration of nitrate decreased slightly.However, at pH=2.25, ammonia concentration increased from 100 to 193 mg/L when the temperature was increased from T=180°C to T=200°C, followed by a large decrease to 39 mg/L at T=220°C.
The results reflected previous suggestions on the possible pathways of nitrogen during HTC.The increase in inorganic N content upon mild increase in temperature can be attributed to two major routes, the first of which is the breaking of solid nitrogen structures upon temperature increase, which drives the nitrogen into aqueous compounds.However, the elevation of HTC temperature to 240°C favours cracking of nitrogen into light gas, which will eventually decrease N content in the liquid product (Xiao et al., 2019) The second route explaining the increase in inorganic nitrogen content in HTC liquor was proposed by Xiao et al. (2019), which is the hydrolysis of Protein-N into inorganic N upon mild increase in HTC temperature (Xiao et al., 2019).Furthermore, the results confirm previous findings regarding the effect of temperature on the speciation of inorganic N in HTC liquors.Fu et al. (2022) reported a significant decrease in NH 4 + upon an increase in temperature, yet the decrease in NO 3 -concentrations was not significant (Fu et al., 2022).Similar results were reported by Alhnidi et al. (2020) during the HTC of cattle manure (Alhnidi et al., 2020).Therefore, it can be deduced that HTC enhanced the concentration of inorganic N in the liquid product, which eventually avoids the polluting effect of nitrate concentration (Peña-Haro et al., 2010) in hydrochar as a potential fertilizer.
It is worth noting that the highest concentration of nitrates and ammonia combined was found to be 425.93mg/L at T=180°C and pH=4.6, which was similar to the optimum conditions observed in literature (Shrestha et al., 2021).The significance of this results lies in retrieving nitrates in the liquid product, which allows the hydrochar to have less nitrate concentrations, thus appealing to the limitations of governing bodies like the Drinking Water Directive, which aims at controlling nitrate concentrations in groundwater bodies (Peña-Haro et al., 2010).
Optimal conditions.Assessing the optimum conditions for HTC stems from the target outcome.Since hydrochar is the main HTC product that has the potential to qualify as a STRUBIAS material (Wenxuan's paper), the first layer of optimality focuses on the hydrochar yield.The best hydrochar yield was produced at T=180℃ and pH=2.25.The second layer of optimality lies in the P-recovery from HTC.The experimental results showed that the optimal P-recovery was at T=220℃ and pH=4.6.Finally, based on the results of the liquid product analysis, the highest nitrate concentrations retrieved in the liquor was at T=200℃ and pH=4.6.

Conclusions
In this paper, hydrothermal carbonization of sludge from a dairy processing factory was performed in order to produce materials which could be valorised as fertilizer components.The effects of temperature and initial pH on the composition and quality of the products were investigated.It was found that increasing temperature enhances the production of hydrochar with increased fertilizer potential in terms of P-content, mineral and heavy metal content with the exception of Cr, which requires further studying.Defining the optimal conditions for the fertilizer quality of the produced hydrochar requires further investigation, yet the highest P-recovery and highest hydrochar yields were recorded after initial acid addition.Also, temperature and increased acidity enhanced the concentration of inorganic nitrogen and phosphorus in HTC liquor.The energy content of the produced hydrochars was found to be low compared to other products of thermochemical treatments, which hints to the low fuel quality of the produced hydrochars.Finally, no direct correlation between final pH of liquors and corresponding NH 4 + concentration was observed.

Extended data
Zenodo: Extended Data for Manuscript titled "Hydrothermal Carbonization (HTC) of Dairy Waste: Effect of Temperature and Initial Acidity on the composition and quality of solid and liquid products" https://doi.org/10.5281/zenodo.6584574(Khalaf, 2022b).

Elena Díaz
Universidad Autonoma de Madrid, Madrid, Community of Madrid, Spain The quality of the revised manuscript has significantly improved.However, I include some some specific aspects/questions/mistakes to be considered by the authors.Page 11: "The effect of temperature and initial pH on heavy metal concentrations was studied according to the results presented in Table 2"; I think that Table 2 has to be changed by Table 4.

○
Page 12: "As shown in Table 3, the conditions of liquors produced at different reaction conditions were fluctuating between slightly acidic and neutral."I think that Table 3 has to be changed by Table 5.
Table 5 and Figure 8 include the same information.I consider that Figure 8 can be removed.

○
Page 11: The authors should explain why a lower specific area improves the adsorption of heavy metals.

○
The data in the tables should be accompanied by their corresponding error.

Dimitris Kalderis
Hellenic Mediterranean University, Chania, Greece The submitted manuscript describes the HTC of dairy waste and the analysis of the products, focusing on P and N recovery.The text is well-structured and the characterization strategy is appropriate for the objectives of the work.The results are clearly written and compared with existing literature.HTC of dairy waste is less studied compared to the HTC of lignocellulosic biomasses, therefore it has increased significance, especially for European countries with high dairy production.I recommend indexing of the manuscript after the following comments are taken into consideration: 1.The authors should add (preferably in the Introduction) that the presence of phytotoxic organic substances (such as furfurals and organic acids) in the hydrochars prevent the widespread use of the product in agriculture.Therefore, it is not only a matter of nutrients, but methodologies should be developed to eliminate toxic phytotoxic substances from hydrochars.The authors can use the following publications to support this https://doi.org/10.1016/j.chemosphere.2022.134357 1 https://doi.org/10.1007/s11356-021-12517-5 2 2. How did the authors adjust the pH value of the feedstock before HTC? Please add this info in the methods section.
3. If a full analysis of the dairy sludge composition is available it should be added in the Methodsfeedstock section.

Elena Díaz
Universidad Autonoma de Madrid, Madrid, Community of Madrid, Spain The manuscript describes the hydrothermal carbonization of dairy sludges evaluating the effect of temperature (180 -220 ºC) and initial pH (2.25 -8.32) on hydrochar yield, fate of P, N and metals in order to obtain a producer with value as fertilizer.The following comments address some specific aspects/questions to be considered by the authors.Abstract: The aim of the work is to obtain a solid fertilizer, then the composition of the liquid product is not essential in the abstract.

○
Why do the authors say that "HTC improved the nutrient content of dairy waste"?Is the nutrient content concentrated in the solid product?More specific information should appear in the abstract.

○
Methods: It will be convenient to include all the characteristics of the feedstock in this section (moisture, C content, pH, main elements concentration (for example Fe)), even the N:P:K ratio.

○
There is no information of the reagents (organic / inorganic acid) used to adjust the initial pH.It is necessary to know if the reagent can modify the content of ash or C of the hydrochar.Information on final pH should be indicated in this section.
○ Equation 1: HC instead of HY.Equation used to calculate liquid yield is required.

○
Results and discussion: I do not find information on C content.A minimum C content is essential for the HTC to make sense.
○ I recommend including a title in the y axis of the figures instead of a general title.

○
Why is the effect of temperature less significant at pH 4.6?The formation of secondary hydrochar in function of temperature and pH should be discussed in the manuscript.

○
Table 1 includes the same information as Figure 2 (ash content).The authors should use only one figure or one table to collect the data.Can the authors define "ash fraction in HC"?

○
In what sense does the HTC improve the quality of the residue as fertilizer?Author should explain in depth this affirmation. ○

Figure 1 .
Figure 1.Factorial Plot for main parameter effect on Hydrochar Yield.

Figure 2 .
Figure 2. Effect of residence time on Hydrochar Yield.
Our results are compatible with the findings ofGhanim et al. (2017)  in their HTC experiments on poultry litter.The increase in initial acidity from pH=7 to pH=2 led to an increase in hydrochar yield from 23.91% to 38.13%(Ghanim et al., 2017).Similar findings were reported byWang et al. (2017) during HTC of sewage sludge, where the decrease in initial pH from 11 to 3 led to an increase in hydrochar yield from 61.14% to a maximum of 68.39%(Wang et al., 2017).However, other studies report an opposite effect of initial pH on hydrochar yield.Liu et al. (2020) investigated the effect of feed-water pH on the properties of hydrochar produced from sewage sludge, and the results show that an increase of initial pH from 2 to 12 led to a slight and variable increase in hydrochar yield from 52.27% to a maximum of 57.37% at pH=9, after which the yield drops to 53% at pH=12(Liu et al., 2020).Similarly,Mumme et al. (2011)  reported an increase in hydrochar yield from the HTC of digested maize silage when the initial pH was increased from 3 to 7 (Mumme

Figure 6 .
Figure 6.P-recovery from hydrochars at different conditions of temperature and pH.
Similar observations were reported byFu et al. (2022) during the HTC of livestock manure, where HTC was responsible for enriching hydrochar with heavy metals.The authors explained this phenomenon from two perspectives, the first of which is the low mobility of heavy metals, while the second explanation stems from the porous structure of hydrochar, which enhances the adsorption of heavy metals(Fu et al., 2022).The adsorption of heavy metals by the hydrochars is also enhanced by the lower specific surface area of the hydrochars, which ranges between 2.7-4.2m 2 /g (Masoumi et al., 2021), compared to biochars and ashes(Dieguez-Alonso et al., 2018).

References 1 .
Karatas O, Khataee A, Kalderis D: Recent progress on the phytotoxic effects of hydrochars and toxicity reduction approaches.Chemosphere.2022; 298: 134357 PubMed Abstract | Publisher Full Text 2. Fan G, Tong F, Zhang W, Shi G, et al.: The effect of organic solvent washing on the structure of hydrochar-based dissolved organic matters and its potential environmental toxicity.Environ Sci Pollut Res Int.2021; 28 (21): 26584-26594 PubMed Abstract | Publisher Full TextIs the work clearly and accurately presented and does it cite the current literature?YesIs the study design appropriate and does the work have academic merit?YesAre sufficient details of methods and analysis provided to allow replication by others?YesIf applicable, is the statistical analysis and its interpretation appropriate?Yes Are all the source data underlying the results available to ensure full reproducibility?YesAre the conclusions drawn adequately supported by the results?YesCompeting Interests: No competing interests were disclosed.Reviewer Expertise: Hydrochar, hydrothermal carbonization, biomass, biochar I confirm that I have read this submission and believe that I have an appropriate level of expertise to confirm that it is of an acceptable scientific standard.Reviewer Report 21 June 2023 https://doi.org/10.21956/openreseurope.16166.r32468© 2023 Díaz E. This is an open access peer review report distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Table S1 :
Hydrochar Yield and final pH calculations

have read this submission and believe that I have an appropriate level of expertise to confirm that it is of an acceptable scientific standard. Version 2
No competing interests were disclosed.Reviewer Expertise: 1. Environmental technologies focused on the wastewatertreatment by means of advanced catalytic and biological processes and wasterecovery; 2. Preparation and application of carbonmaterials from biomass wastes for water treatment and in waste-to-energyconversion and biomass pretreatment for bioenergy; 3. Hydrothermal carbonization of biomass wastes coupling to anaerobic digestion to carry out the valorization of these wastes from a material (synthesis of biocarbon, soil improvers, nutrient recovery, synthesis-of fertilizers) and energetic (solid biofuel, biogas, biohydrogen) point of view.
○ Competing Interests: I confirm that I https://doi.org/10.21956/openreseurope.16166.r31931© 2023 Kalderis D. This is an open access peer review report distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.