Frank Bok Posted July 15 Share Posted July 15 Hello, I tried to model a small speciation (but including Pitzer due to high salinity). SpecE8 stopped with the error message: Quote -- Internal error: calc_hmw: Ionic strength is out of range SpecE8 abandoning calculation. Largest residual(s): Resid Resid/Totmol Cbasis --------------------------------------------------------- PO4--- 1.758e+05 1 3.734e-09 --------------------------------------------------------- I already tried to include the "as P" in the input file, but it does not help. Swapping H2PO4- for PO4--- makes the calculation run, but then I got quit a different total P concentration compared to relaculation the given PO4--- concentraiton to molal scale. Can you please give me a hint? Many thanks in advance and best regards, Frank Example_speciation.sp8 THEREDA_2023a_GWB.tdat Quote Link to comment Share on other sites More sharing options...
Jia Wang Posted July 16 Share Posted July 16 Hello Frank, Thank you for attaching your file. I am not quite sure what you are comparing here. Could you clarify the discrepancy and show the math on what's not adding up for you? Best regards, Jia Wang Aqueous Solutions LLC Quote Link to comment Share on other sites More sharing options...
Frank Bok Posted July 17 Author Share Posted July 17 Dear Jia, many thanks for your reply. The actual problem is the abbording calculation. Swapping manually to H2PO4- did help me here, but I would like to avoid this problem in the future (as I plan some multiple automated calculations (thousands in a run) and I would like top avoid this happens. Is there a way? Concerning the discrepancy in the P content, this is maybe due to the density when comparing mol/L (input unit) with mol/kgw (output unit). I am sorry for missing this in the first place! Many thanks and best regards, Frank Quote Link to comment Share on other sites More sharing options...
Jia Wang Posted July 17 Share Posted July 17 Hello Frank, Thank you for the clarification. I believe the reason why the program had difficulty without the swap is because the concentration of PO4--- is very small in comparison to other phosphorus species given the condition of your fluid. It is not really possible to guarantee that the same settings will work for thousands of samples. For this particular case though, and perhaps if your other fluids are from a similar system, you can exchange the position of PO4--- and H2PO4-- in your thermodynamic database. This way, H2PO4-- now becomes your Basis species and PO4--- will be a secondary species. You can write your scripts or make calculations in GSS in such a way that you can specify the concentration of Phosphorus with H2PO4--- without the need to perform a swap in your Basis. Hope this helps, Jia Quote Link to comment Share on other sites More sharing options...
Frank Bok Posted July 18 Author Share Posted July 18 Dear Jia, many thanks for the recommendations. I will talk with my THEREDA colleagues to change the P basis species from PO4--- to H2PO4-. This should help. Many thanks and best regards, Frank Quote Link to comment Share on other sites More sharing options...
Jia Wang Posted July 18 Share Posted July 18 You're welcome Frank. I forgot to mention that you can easily exchange the places of PO4--- and H2PO4-- using TEdit. You can view an example on here or find details in the GWB Essentials Guide, section 9.2.8.3 Exchange species positions. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.