## Abstract

Nutrient recovery from wastewater is an effective strategy to prevent eutrophication and provide value for the treatment process. Human urine is a small but highly nutrient-rich stream in the total flux of domestic wastewater from which struvite (MgNH_{4}PO_{4.6}H_{2}O) could be recovered and used as a fertiliser. Consequently, synthetic urine was used in most struvite precipitation studies, due to biohazard issues in real human urine. A modelling approach was developed to formulate synthetic urine recipes based on elemental urine composition, using matrix solving strategy to select and quantify chemical salts for synthetic urine preparation. The model also included mass balance, chemical speciation, and equilibrium dissociation expression for solution thermodynamics predictions in the formulated urine. In this study, synthetic solutions of fresh and stored urine were assessed with this model using Engineering Equation Solver (EES) software to calculate the quantity of salts, pH, ionic strength, and struvite saturation index. Simulation results in EES were successfully verified using PHREEQC simulations, while model validation comprised the examination of urine composition with their reported recipes.

## HIGHLIGHTS

A systematic mathematical procedure can determine synthetic urine solution formulation.

Solution thermodynamic simulations predicted pH and struvite saturation in urine cases.

Advantages of a batch model in EES to estimate synthetic urine recipe is presented.

Mathematical verification of developed model in EES tested against PHREEQC software.

## INTRODUCTION

Many ecosystems are under significant pressure, in part from increased inputs of nutrients into surface waters, which degrade water quality and lead to eutrophication (Jiang *et al.* 2014; Wijnen *et al.* 2015; Wan *et al.* 2017). Strong concentrations of nutrients, especially nitrogen and phosphorus, are closely associated with anthropogenic activities (Howarth 2008). They include increasing effluent discharge from wastewater treatment plants (WWTPs) following population growth, and the input of agricultural and urban runoff (Dwight *et al.* 2002; Hale *et al.* 2015). There is no doubt that humans have also influenced water quality in positive ways by implementing various management strategies. (Zhou *et al.* 2020) These strategies often contain methods that directly reduce the inputs of nutrients from point (Novick *et al.* 2015) and nonpoint sources (Jamaica Bay Watershed Protection Plan Advisory Committee 2007). The control of nutrients, present in wastewater is a priority issue to protect surface waters from the consequences of eutrophication.

In many regions around the world, wastewater treatment is inadequate to reduce the inputs of nutrients, and phosphorus is discharged to the environment causing eutrophication (Corcoran 2010). There is a strong push towards recovering phosphorus from waste streams instead of losing it to the environment in an uncontrolled manner (Krähenbühl *et al.* 2016). Agriculture requires phosphorus in large amounts, and the resources for synthetic phosphorus fertilizers are limited (Scholz *et al.* 2013). One very promising approach is the separation of wastewater streams and their specific treatment in decentralised reactors (Harada *et al.* 2006; Udert & Wächter 2012). Urine is of particular interest because it contains about 60% of human-excreted phosphorus (Larsen *et al.* 2015), which could be used in fertilizers (Rodrigues *et al.* 2019).

*et al.*2008; Gangadharan

*et al.*2021; Tan

*et al.*2021). Struvite has received the most attention (Etter

*et al.*2011) with regard to decentralised fertilizer production as it can be made in simple, manually operated reactors and only requires a source of magnesium reagent (Ali & Schneider 2006). Struvite precipitation from source-separated urine has the potential to recover more than 90% of the phosphate and some ammonia by adding a suitable magnesium source (Udert & Wächter 2012; Xu

*et al.*2017). Struvite formation occurs when magnesium, phosphate and ammonia react, according to the following stoichiometry (Schneider

*et al.*2013).

A challenge in the development of struvite precipitation from source-separated urine research is the direct utilisation of real urine for the studies. This method is unsuitable as it is unpleasant and there are problems such as odour and the presence of micropollutants (Nagy *et al.* 2019) and pathogens (Udert *et al.* 2006) in urine pose a health risk to the researchers. Moreover, urine composition varies significantly based on race, gender and age (Taylor & Curhan 2007). It is also affected by diet, exercise and time of day and shows diurnal variation (Siener & Hesse 2002), and therefore there is a great variation even amongst individuals and it is very important to consider the variety of urine formulation. To do so, replacing real urine with synthetic urine is a more suitable method as it imitates the quality of real urine and provides the benefit of the reproducibility and stability of the initial solution in struvite precipitation studies. The literature review confirmed that there is no reporting of synthetic urine recipes without any advice on how to select the salt to be mixed.

The main objective of this study is to propose a rigorous yet straightforward approach for the preparation of synthetic urine for struvite precipitation studies. This modelling approach enables researchers to prepare the solution, based on the elemental composition of the urine on which they intended to work. To achieve this aim, solution chemistry equations are linked to thermodynamic equilibria and mass balance. Eventually, the mass balance equations are modelled as matrix equations and programmed in Engineering Equation Solver (EES).

## METHODS

This work model implementation helps to better understand the relationship between the elemental composition of urine and the required recipe to prepare the synthetic urine solution using chemical salts. It models elemental mass balance, and chemical speciation and links it to thermodynamic equilibria to determine their feasibility in nutrient recovery. Aset of equations was developed in an EES batch model programme. This application was implemented as an alternative to more common software such as PHREEQC. However, the equations could be solved by using other solvers such as MATLAB, Maple, and Mathcad.

### Thermodynamic modelling

Solution thermodynamics was used in a predictive model for synthetic urine preparation and chemical speciation in struvite precipitation. This model is intended two achieve two goals:

Estimation of salt quantity added to water to synthetic urine preparation.

Assessment struvite precipitation behaviour when magnesium-containing compounds are added.

*)*in Equation (4) was estimated with

*Debye–Hückel with Davies*approximation in Equation (5). This model was chosen owing to the high ionic strength () in urine as suggested in related studies (Ronteltap

*et al.*2007). In this equation, activity coefficients can take three possible values :, or , depending on their respective charge: , , .

*A*is a temperature-dependent constant with a value of at 25 °C, while the solution ionic strength () can be found by the following equation.

*et al.*2013).

### Preparation of synthetic urine

Model simulation assumed that all the reactions are in equilibrium, and they estimated the concentrations of every considered salt by knowing the concentration of urine's key elements. Table 1 represents the base scenario to set the mass balance equations and describes the modelling approach. This table contains 8 chemical elements considered in synthetic urine formulation with their corresponding salt (Udert *et al.* 2006). Even though a chemical element can be dissociated in different ionic species, only some of them are shown. A variety of salts can be used in synthetic urine formation, this decision should aim to consider available chemical reagents in most research laboratories, and the least hazardous ones. Finally, it was found that the most straightforward strategy to select salts is by trying to add each element with only one salt except for sodium and chlorine that can be present in most salts.

. | Element . | Corresponding key ion . | Corresponding salt . |
---|---|---|---|

(1) | |||

(2) | |||

(3) | |||

(4) | |||

(5) | |||

(6) | |||

(7) | |||

(8) |

. | Element . | Corresponding key ion . | Corresponding salt . |
---|---|---|---|

(1) | |||

(2) | |||

(3) | |||

(4) | |||

(5) | |||

(6) | |||

(7) | |||

(8) |

### Quantity of salts estimation through matrices

Equations (9)–(16) can be calculated with the least complexity using matrix equations. In Matrix Equation (1), the moles of elements and the moles of salts are placed column vectors matrix, while the coefficients of the salts containing the elements are in the coefficient matrix. Re-arranging Matrix Equation (1) to a simpler diagonal Matrix Equation (2) shows that all elements except the principal diameter, chlorine, and sodium, are zero.

Matrix equation 1. | Matrix equation 2. |

Base scenario | Pseudo-diagonal form for base scenario |

<> |

Matrix equation 1. | Matrix equation 2. |

Base scenario | Pseudo-diagonal form for base scenario |

<> |

*X*represents the vector of the salts mole quantity. In this expression,

*A*is the Matrix of coefficients whose values are known, and it can be solved using Equation (18). Solving Equation (18) requires the estimation of the inverse of

*A*Matrix (), which is also equivalent to the transpose A matrix () divided by the determinant of this Matrix (). The determinant of A is a scalar value estimated from A Matrix. Additionally, this set of equations can only be solved if A Matrix is invertible, which means that the determinant different from zero.

Table 2 shows the solution of the matrix system using Equations (17) and (18), with the inclusion of the Singular Value Decomposition (SVD). The estimation of SVD is another way of representing a matrix as a series of linear approximations that expose its underlying meaning-structure, returning a vector of singular values which can indicate if the equation set is solvable. The SVD values are very close to each other, and it confirms the solvability of the proposed mathematical model.

In this study, the proposed mathematical procedure was validated with the information given by the VUNA handbook of urine treatment (Udert *et al.* 2006), which will be discussed in the next section. Validation of the proposed model was assessed considering different scenarios in which the urine elements, except sodium and chlorine, enter the solution from only one salt or more than one.

### Mathematical model validation with EES

The validation was examined using EES Academic Professional V10.644. A model comprised of (1) an equilibrium thermodynamics and (2) urine recipe calculator was developed and simulated using batch model in . The first component, which reflects Equations (2)–(7), was comprised of chemical speciation, charge balance, calculation of ionic concentration, ion activity to estimate pH, ionic strength, and struvite saturation. The equilibrium was introduced using the first five equilibrium reactions in Table 3. The second component was introduced as a set of equations, relating elemental balances and their source chemical salts.

. | Equilibrium . | (This work) . | (Minteq.v4 database in PHREEQC) . | |
---|---|---|---|---|

(1) | 14^{a} | 13.997 | ||

(2) | 9.24^{b} | 9.244 | ||

(3) | 7.21^{b} | (6) | (19.573) | |

(4) | 12.36^{b} | 12.375 | ||

(5) | 10.33^{b} | 10.329 |

. | Equilibrium . | (This work) . | (Minteq.v4 database in PHREEQC) . | |
---|---|---|---|---|

(1) | 14^{a} | 13.997 | ||

(2) | 9.24^{b} | 9.244 | ||

(3) | 7.21^{b} | (6) | (19.573) | |

(4) | 12.36^{b} | 12.375 | ||

(5) | 10.33^{b} | 10.329 |

*Notes:*^{a}Equilibrium constants were taken from Schneider *et al.* (2013)

^{b}Equilibrium constants were taken from Ronteltap *et al.* (2007).

### Mathematical model verification with PHREEQC

Numerical verification in the model was achieved by comparing prediction with PHREEQC Interactive 3.7.3–15,968 software package simulations, using the same input data and equilibrium constants. PHREEQC can estimate ionic speciation, (through charge balance), however, it contains up to 13 databases with diverse sets of equilibrium constants and reactions. This situation leads to obtaining different predictions depending on the chosen thermodynamic database even though the same input is applied (Natividad-Marin *et al.* 2023). For instance, Table 3 shows differences between the equilibrium constants used in this work (Ronteltap *et al.* 2007) and the ones found in Minteq.v4 PHREEQC database. The simulations in PHREEQC were developed by adding the following to the software Input File:

Same equilibrium reactions and constants as the code

Setting equilibrium constants () to very small values () to avoid calculation of other ionic species that were not considered in the EES programme (e.g., , , and )

Setting the activity coefficient () as one for uncharged species such as . This change was required to avoid the default estimation with cited in PHREEQC software guidelines, where is the solution's ionic strength

Activate the charge balance command to estimate solution

Inclusion of struvite solid phase and its constant solution product (

A database that was previously simplified by deleting some undesired equilibrium equations was used. This database was created from Minteq.v4 database.

In this study, information from the VUNA Handbook of Urine Treatment (Udert *et al.* 2006) was used as a starting point, because the characterisation of synthetic urine and the corresponding salts was provided in detail for both synthetic fresh and stored urine. Table 4 shows the elemental concentration used for thermodynamic simulations, and the list of corresponding ions to be during model validation in other sections.

Element . | Synthetic fresh urine [mol/L] . | Synthetic stored urine [mol/L] . | ||
---|---|---|---|---|

() | 0.0337 | () | 0.568 | |

() | 0.0242 | () | 0.0175 | |

() | 0.0563 | () | 0.0563 | |

() | 0.0162 | () | 0.0162 | |

() | 0.1101 | () | 0.118 | |

() | 0.0654 | () | 0.111 | |

() | 0.0039 | () | ^{a} | |

() | 0.0046 | () | ^{a} | |

() | () | 0.5198^{b} | ||

Additional ion cited in stored urine recipe: | (Acetate) | 0.125^{c} | ||

Additional ion cited in stored urine recipe: | () | 0.271^{c} |

Element . | Synthetic fresh urine [mol/L] . | Synthetic stored urine [mol/L] . | ||
---|---|---|---|---|

() | 0.0337 | () | 0.568 | |

() | 0.0242 | () | 0.0175 | |

() | 0.0563 | () | 0.0563 | |

() | 0.0162 | () | 0.0162 | |

() | 0.1101 | () | 0.118 | |

() | 0.0654 | () | 0.111 | |

() | 0.0039 | () | ^{a} | |

() | 0.0046 | () | ^{a} | |

() | () | 0.5198^{b} | ||

Additional ion cited in stored urine recipe: | (Acetate) | 0.125^{c} | ||

Additional ion cited in stored urine recipe: | () | 0.271^{c} |

*Note:* Ionic species cited as ‘corresponding ions per element’ by Udert *et al.* (2006) are presented within parenthesis. (–) indicates total carbon balance was not included in fresh urine calculations.

^{a}Magnesium and calcium were introduced in the simulation for synthetic stored urine as values close to zero in their absence.

^{b}Total carbon was estimated from salts containing this element using information given by the original source.

^{c}Acetate and carbonate were added in this table as a reference, but they were not used in this section simulations.

Element . | Corresponding ion . | Value [mol/L] . |
---|---|---|

0.125 | ||

0.568 | ||

0.0175 | ||

0.0563 | ||

0.0162 | ||

0.118 | ||

0.111 | ||

0.271 |

Element . | Corresponding ion . | Value [mol/L] . |
---|---|---|

0.125 | ||

0.568 | ||

0.0175 | ||

0.0563 | ||

0.0162 | ||

0.118 | ||

0.111 | ||

0.271 |

Salt . | Mass [g] and volume . | Value [mol] . |
---|---|---|

9.60 | 0.125 | |

(25% ) | 13 [mL] | 13 [mL] |

2.10 | 0.175 | |

4.20 | 0.0563 | |

2.30 | 0.0162 | |

3.60 | 0.0617 | |

21.4 | 0.271 |

Salt . | Mass [g] and volume . | Value [mol] . |
---|---|---|

9.60 | 0.125 | |

(25% ) | 13 [mL] | 13 [mL] |

2.10 | 0.175 | |

4.20 | 0.0563 | |

2.30 | 0.0162 | |

3.60 | 0.0617 | |

21.4 | 0.271 |

Component . | Value [mol] (Udert et al.)
. | Value [mol] (this work) . |
---|---|---|

Water | 1 L | 1 L |

0.0162 | 0.0162 | |

0.0175 | 0.0175 | |

0.0563 | 0.0563 | |

0.0616 | 0.0617 | |

0.125 | 0.125 | |

0.172 | 0.172 | |

0.271 | 0.271 | |

0.0162 | 0.0162 |

Component . | Value [mol] (Udert et al.)
. | Value [mol] (this work) . |
---|---|---|

Water | 1 L | 1 L |

0.0162 | 0.0162 | |

0.0175 | 0.0175 | |

0.0563 | 0.0563 | |

0.0616 | 0.0617 | |

0.125 | 0.125 | |

0.172 | 0.172 | |

0.271 | 0.271 | |

0.0162 | 0.0162 |

## RESULTS AND DISCUSSION

This section shows the validation of the proposed model implemented in EES the model, and it included verification with PHREEQC software. Simulation results are explained step by step.

### Comparison between EES and PHREEQC simulations

Agreement between simulations in and PHREEQC are satisfactory, and therefore the model was successfully verified. Table 5 shows ionic concentration predictions and key thermodynamic variables for two types of urine solutions. The inclusion of carbon elements for stored urine drastically changes the pH to values around 8, which is quite different than the values for fresh urine (6). The in the stored urine could also facilitate struvite precipitation. The stored urine ionic strength is much larger than the fresh urine due to the larger quantity of dissociated ions in the liquid. Even though, the thermodynamic components in this study have only five equilibrium equation, the and the ionic strength are like the ones reported in the original source:

Fresh urine = 6.2, stored urine = 8.87

Ionic strength in fresh urine = 0.183 , stored urine = 0.637

Urine type: . | Synthetic fresh urine . | Synthetic stored urine . | ||
---|---|---|---|---|

Ionic concentrations . | EES [mol/L] . | PHREEQC [mol/L] . | EES [mol/L] . | PHREEQC [mol/L] . |

()^{a} | ()^{a} | |||

()^{a} | ()^{a} | |||

General solution characteristics (predicted): | ||||

pH | 6.315 | 6.313 | 8.029 | 8.028 |

Ionic strength | 0.203[mol/L] | 0.203[mol/L] | 0.749 [mol/L] | 0.748 [mol/L] |

Struvite | −0.057 | −0.050 | −6.22 | −6.19 |

Urine type: . | Synthetic fresh urine . | Synthetic stored urine . | ||
---|---|---|---|---|

Ionic concentrations . | EES [mol/L] . | PHREEQC [mol/L] . | EES [mol/L] . | PHREEQC [mol/L] . |

()^{a} | ()^{a} | |||

()^{a} | ()^{a} | |||

General solution characteristics (predicted): | ||||

pH | 6.315 | 6.313 | 8.029 | 8.028 |

Ionic strength | 0.203[mol/L] | 0.203[mol/L] | 0.749 [mol/L] | 0.748 [mol/L] |

Struvite | −0.057 | −0.050 | −6.22 | −6.19 |

(–) indicates total carbon balance was not included in fresh urine calculations.

^{a}Magnesium and calcium were not included in elemental composition for stored urine, but they were introduced in each software by a number close to zero to estimate struvite saturation index.

Component . | Value [mol] (Udert et al. 2006)
. | Value [mol] (This work) . |
---|---|---|

0.0337 | 0.0337 | |

0.0242 | 0.0242 | |

0.0563 | 0.0563 | |

0.0162 | 0.0162 | |

0.0031 | 0.0031 | |

0.0057 | 0.0057 | |

0.0039 | 0.0039 | |

0.0046 | 0.0046 |

Component . | Value [mol] (Udert et al. 2006)
. | Value [mol] (This work) . |
---|---|---|

0.0337 | 0.0337 | |

0.0242 | 0.0242 | |

0.0563 | 0.0563 | |

0.0162 | 0.0162 | |

0.0031 | 0.0031 | |

0.0057 | 0.0057 | |

0.0039 | 0.0039 | |

0.0046 | 0.0046 |

### Preparation of synthetic fresh urine

Fresh urine, in the context of this work, means that none of the urea has been hydrolyzed, and carbonate will not have been released into the solution. Since the amount of carbon in fresh urine is not significant, Udert *et al.* ignored its presence in urine recipe and equilibrium estimations for (6.2) and ionic strength (0.183 mol/L). The total elemental concentration of species and their corresponding ions for synthetic urine cases are cited in Table 4. The mass of salts to prepare the synthetic fresh urine was also reported in the original reference and it is shown in Table 6, which will be used to validate predictions.

Salt . | Mass [g] . | Molar quantity [mol] . |
---|---|---|

1.80 | 0.0337 | |

2.90 | 0.0242 | |

4.20 | 0.0563 | |

2.30 | 0.0162 | |

0.183 | 0.0031 | |

0.230 | 0.0057 | |

0.370 | 0.0039 | |

0.510 | 0.0046 |

Salt . | Mass [g] . | Molar quantity [mol] . |
---|---|---|

1.80 | 0.0337 | |

2.90 | 0.0242 | |

4.20 | 0.0563 | |

2.30 | 0.0162 | |

0.183 | 0.0031 | |

0.230 | 0.0057 | |

0.370 | 0.0039 | |

0.510 | 0.0046 |

Estimation of the quantity of salts using the initial total elemental concentration as input data required the application of some strategies mentioned in section 2.2. It is preferred to select the salts in such a way that each element (corresponding ion) is supplied by only one salt with the exception of sodium and/or chloride ions. Following the abovementioned strategy, Matrix 3 and 4 can be formulated to estimate the quantity of salts, applying a set of elemental mass balances as cited in Equations (8)–(16).

Matrix equation 3. Solution matrix for fresh urine scenario | Matrix equation 4. Pseudo-diagonal form of the fresh urine scenario |

< > |

Matrix equation 3. Solution matrix for fresh urine scenario | Matrix equation 4. Pseudo-diagonal form of the fresh urine scenario |

< > |

In section 2.3, matrix Equation (4) was shown to be a solvable mathematical equation, and the solution is presented in Table 7. As expected, the values presented by the original reference (Udert *et al.* 2006) are the same as the estimated mass of salts.

### Preparation of synthetic stored urine

Stale urine will have extra and due to their release after ureolysis. Unlike fresh urine, the amount of calcium and magnesium ions in the stored urine is very small that it can be neglected. On the other hand, the amount of carbon in the form of carbonate ions is significant and should be considered. According to studies performed on stored urine, the presence of acetate ions in the composition of synthetic urine is certain. Udert *et al.* (2006) also considered the presence of this ion in their study and presented it as an element as it is shown in Table 8. In this section, the acetate is included in the mass balance as an element arbitrarily.

They reported the salts selected and the amount required from each to prepare synthetic stored urine as follows in Table 9.

Previous equations cited in this section were used to formulate Matrix Equation (5) as follows:

**Matrix equation 5.** Pseudo-diagonal form of the stored urine scenario

The coefficients in matrix array 5 are denoted as Matrix A. This equation can be solved if matrix A is inverse and in other words square. Therefore, by releasing the amount of sodium (bold row numbers in the previous matrix), the degree of freedom of the previous equation is reduced from one to zero. The new matrix of coefficients A2 becomes an inverse square matrix. This procedure is valid because the presence of additional sodium and/or calcium ions will not interfere with the struvite precipitation process and it is presented in Table 10.

The estimated values from the previous Matrix equation solution are shown in Table 11 and compared with the reported study.

## CONCLUSIONS

A modelling approach developed in this research was validated by quantifying salt mass for synthetic urine preparation. This work suggested that salts selection can be developed with a pseudo-diagonal matrix of coefficients derived from elemental mass balance equations. A matrix configuration where non-zero elements are visualised outside the matrix diagonal indicates that diverse elements are entering the solution from more than one salt. A practical strategy was proposed for selecting the salts in urine recipes, consisting that elements should come from just one salt when possible, with the exception of sodium and chlorine, while keeping a zero degree of freedom in the mathematical solving of a square pseudo-diagonal matrix. In the case of a matrix with a degree of freedom of more than zero, the matrix system can be solved by releasing sodium and/or chlorine from the set of equations without quality detriment in following struvite precipitation studies. Previous matrix equations were solved in EES, but this research also implemented this programme with a thermodynamic equilibrium section to predict fresh and stored urine source characteristics, such as pH, ionic strength, and struvite saturation index. Model predictions in EES were mathematically verified with PHREEQC simulations, considering the same input data and equilibrium information, giving high agreement. It is noteworthy, that EES can be used to estimate the amount of each salt for urine recipes and merged with an equilibrium thermodynamics model, while PHREEQC can only develop thermodynamic predictions given the elemental concentration and not salt recipe composition evaluations.

## ACKNOWLEDGEMENTS

S.S. acknowledges Murdoch University for providing Murdoch-supported International Tuition Fee Scholarship (ITFS) as well as a Murdoch Strategic Scholarship (MSS) to support her PhD study. L.N.-M.is thankful for the financial support provided by the College of Science and Engineering at James Cook University. Emeritus Professor Dr David L. Parkhurst from the United States Geological Survey (USGS) is also acknowledged for his valuable advice on equilibrium equations during PHREEQC software use.

## DATA AVAILABILITY STATEMENT

All relevant data are included in the paper or its Supplementary Information.

## CONFLICT OF INTEREST

The authors declare there is no conflict.