PhreeqcUsers Discussion Forum

Beginners => PHREEQC basics => Topic started by: djb14128 on December 05, 2019, 03:35:35 PM

Title: Convergence problems in IPhreeqc (in excel)
Post by: djb14128 on December 05, 2019, 03:35:35 PM
Hi All,

I am not sure why I am having these error messages and how can I overcome these problems. Many thanks in advance.

I keep getting these error messages in the output sheet:


WARNING: Maximum iterations exceeded, 150

WARNING: Maximum iterations exceeded, 150

WARNING: The program has failed to converge to a numerical solution.

The following equations were not satisfied:
ERROR:                 H(1) has not converged. Total: 9.052579e-002

ERROR: Is non-carbonate alkalinity greater than total alkalinity?

ERROR:                 C(4) has not converged. Total: 1.036987e-001

ERROR:                   Ca has not converged. Total: 2.428835e-002

ERROR:                   Cl has not converged. Total: 1.378193e+000

ERROR:                    K has not converged. Total: 7.028287e-001

ERROR:                   Mg has not converged. Total: 3.080078e-003

ERROR:                N(-3) has not converged. Total: 1.375983e+002

ERROR:                   Na has not converged. Total: 2.547147e+000

ERROR:                 S(6) has not converged. Total: 3.897550e-004

ERROR:                   Mu Ionic strength has not converged.

ERROR:               A(H2O) Activity of water has not converged.


Title: Re: Convergence problems in IPhreeqc (in excel)
Post by: dlparkhurst on December 05, 2019, 08:30:16 PM
You have units of g/L and N(-3) concentration of 1700 g, or 1.7 kg per liter, or >100 moles N per liter. PHREEQC cannot deal with concentrations this high.

Also note that you have defined both Alkalinity and C(4), in which case, PHREEQC will adjust the pH to try to accommodate both analytical data.

Try to simplify your input to isolate the problem. Usually, when you have problems, you can eliminate selected output and concentrate on the output file.
Title: Re: Convergence problems in IPhreeqc (in excel)
Post by: djb14128 on December 05, 2019, 08:44:17 PM
Hi David,

Thanks for replying back. What do you mean by "Try to simplify your input to isolate the problem. Usually, when you have problems, you can eliminate selected output and concentrate on the output file"?

Many Thanks.


Title: Re: Convergence problems in IPhreeqc (in excel)
Post by: djb14128 on December 05, 2019, 08:51:43 PM
Hi,

Now I have this problem here:

ERROR: Solute mass exceeds solution mass in conversion from /kgs to /kgw.                        
Mass of water is negative.                        
ERROR: Program terminating due to input errors.                        

After making the changes. Many thanks.
Title: Re: Convergence problems in IPhreeqc (in excel)
Post by: dlparkhurst on December 05, 2019, 09:36:28 PM
Are you sure you units are correct for an aqueous solution? The error indicates that the sum of the solutes is more than the mass of the solution, which probably means you have very high concentrations, either by design or by mistake.

All I meant was that if you post a file that fails, please make it as simple as possible while maintaining the error.
Title: Re: Convergence problems in IPhreeqc (in excel)
Post by: djb14128 on December 06, 2019, 05:24:59 PM
Hi,

But I need to work with very high concentrations. Is there a way to overcome this?

Many thanks.
Title: Re: Convergence problems in IPhreeqc (in excel)
Post by: djb14128 on December 06, 2019, 05:51:59 PM
The mass of water is 2.20 kg but the total mass of the solution (solvent+solutes) is 3 kg. I'm not sure how to tell Iphreeqc that I have only 0.8 kg of solutes. I'm also not sure how to remove solutes in Iphreeqc. Many thanks.
Title: Re: Convergence problems in IPhreeqc (in excel)
Post by: dlparkhurst on December 06, 2019, 06:45:50 PM
You are using g/L as your concentration unit. To convert to mol/kgw, PHREEQC uses the density (1 by default) to calculate g/kgs, then subtracts the sum of the solutes from a kilogram of solution to find the amount of water. This value is negative in your case. Finally, PHREEQC would calculate mol/kgw and scale the solution to 2.2 kg of water.

If you use mol/kgw as your input unit, there is no conversion. Still, PHREEQC, even with the Pitzer approach, is limited to say about 10 mol/kgw. With ion association, limits are more like 1 mol/kgw. So, either you are making a mistake on the concentrations of your solutes, or you are beyond the limits of PHREEQC's aqueous models.