Click here to donate to keep PhreeqcUsers open
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Forum Home
Login
Register
PhreeqcUsers Discussion Forum
»
Processes
»
Reactive transport modelling
»
Reactive transport modelling: convergence problem
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Reactive transport modelling: convergence problem (Read 1682 times)
sharmilan
Top Contributor
Posts: 40
Reactive transport modelling: convergence problem
«
on:
October 20, 2020, 12:55:12 PM »
Dear Phreeqc exporters,
I am a PhD student working on reactive transport modelling of concrete due to exposure to the atmosphere. I am using the IPhreeqc.dll library for Matlab. I have two problems with a chemical equilibrium model (PHREEQC)
1) my chemical equilibrium model is crashed with an error message (Numerical method failed with this set of convergence parameters) at a particular time step.
could anyone explain where is a problem in input data and how to resolve this convergence problem?
2) we can get output the value of absorbed species on surface and species in the diffuse layer (EDL) as only in Mol of the element. therefore, I could not include this mol of the element through REACTIVE keyword for the next time step because already I am including ions witch is from transport calculation. So, Phreeqc does not work when I am including element and ions together in the REACTIVE keyword.
could anyone have any idea to include Mol of the element of the absorbed species on the surface and in EDL layer from the previous time step to current time step for maintaining the total element of the system? (i am not using modified keyword because there is huge changes in the surface site and surface area due to moisture transport, therefore, to avoid surface charge problem, I am using SURFACE keyword in every time step and deduct OH mol which is added through the surface site)
here I am attching the input file.
Thank you,
Sharmilan S.
Logged
dlparkhurst
Global Moderator
Posts: 3805
Re: Reactive transport modelling: convergence problem
«
Reply #1 on:
October 20, 2020, 04:48:27 PM »
I don't really understand what you are trying to do. It looks like you are trying to add a solution and surface through the REACTION data block. If you are transporting dissolved constituents, then the solution composition normally would be defined by the results of transport (using SOLUTION_MODIFY), and the surface would be the composition of the surface after the last reaction calculation, which is accessible with "USE surface n".
REACTION does not account for the charge that you have defined for each species. It only considers the moles of elements in the formulas. So, there is no way to account for any charge imbalances in a solution or surface with REACTION.
Note that a partial pressure is needed for GAS_PHASE, so a negative value does not make sense.
Don't you think you should simplify your problem? Say a couple elements, one surface until you have some idea whether your approach will work?
Also, consider whether PhreeqcRM would be a better choice than IPhreeqc. It is designed to be the reaction model for coupling transport and reaction simulators.
Logged
sharmilan
Top Contributor
Posts: 40
Re: Reactive transport modelling: convergence problem
«
Reply #2 on:
October 20, 2020, 11:32:01 PM »
Thank you for a quick response.
First of all, here I am explaining our reactive transport model.
I am using our own transport equation (which is written in Matlab coding and the totally different governing equation from the equation which is used in phreeqc) for transporting ions in solution and gases in the void. And, at the end of transport calculation, The transported ions and gases are coupled with phreeqc for determining chemical equilibrium between gas, solution and Phases in each time step.
IPhreeqcRM.dll library (phreeqcrm-3.6.2-15100) is used through Matlab calling function only for chemical equilibrium between gas, solution, Equilibrium phase and Solid solution in each time step (not for transport calculation).
At end of phreeqc calculation in each time step, ion and gas concentration (value got through Selected output keyword) are used for the next transport calculation.
For the above reactive transport concept,
For the current chemical equilibrium step, I have to add transported ions and gases (form transport calculation) and update Surface complexation, Equbrium phase and the solid solution with the output value of the previous chemical equilibrium step (value got through Selected output keyword).
For this process, I think, there are two methods to include transported ions and gases, and update current Surface complexation, Equbrium phase and the solid solution by using the value from the previous chemical equilibrium step.
1) Transported ions, and the Selected output value of surface and EDL elements are added through REACTION keyword. And, The Value of Equilibrium phase and Solid solution of the previous step are used for the current step through EQUILIBRIUM_PHASES and SOLID_SOLUTIONS keywords respectively. And, transported gas is updated through GAS_PHASE keywords. (Input file of this method was attached in my previous mail)
2) The Second method, previously DUMP file is used to update through the MODIFY keyword of each SOLUTION, GAS_PHASE, EQUILIBRIUM_PHASES and SOLID_SOLUTIONS with the value of transported ions and gas, and Value of Equilibrium phase and Solid solution of the previous chemical equilibrium step.
you advised to include transported ions by using SOLUTION_MODIFY keyword, and I have already tried that method, but there is a problem because when I am including ion in solution, the ion strength is too high in solution. So, phreeqc not allow to run the system. therefore I added transported ions through REACTION keyword to avoid ion stength problem (but you mentioned that charge imbalances did not account in this method).
So, could you advise me, for my reactive transport model, how can I include transported ions and gases, and previous step surface complexation and Equilibrium phase and Solid solution for the current chemical equilibrium step?
Thank you
Sharmilan S.
Logged
dlparkhurst
Global Moderator
Posts: 3805
Re: Reactive transport modelling: convergence problem
«
Reply #3 on:
October 21, 2020, 01:26:09 AM »
OK, so you are using PhreeqcRM, and not IPhreeqc.dll as you said earlier. Note that PhreeqcRM contains IPhreeqc, and it is possible to get the IPhreeqc instances from a PhreeqcRM instance to run IPhreeqc methods.
You can get solution concentrations for all the cells of your transport model with the method GetConcentrations (total element concentrations) or GetSpeciesConcentrations (concentrations of all aqueous species), rather than transferring them through SELECTED_OUTPUT. You can redefine the solutions of each cell after transport with SetConcentrations or SpeciesConcentrations2Module.
You will have to use SELECTED_OUTPUT to get moles of gas components in the GAS_PHASEs, but you can get the list of gas components with GetGasComponenets from which you can format a selected output data block. You will need to use GAS_PHASE_MODIFY for each cell to update the GAS_PHASE moles after transport. I suppose it might be possible to add the gas components as a REACTION if you redefined GAS_PHASEs to have no moles of gas components, but it seems clearer (and possibly more numerically stable) to redefine the GAS_PHASEs directly.
I do not see why you are redefining SURFACEs, EQUILIBRIUM_PHASES, and SOLID_SOLUTIONS. The current state of these reactants are retained in the PhreeqcRM instance following reaction calculations and are still defined at the beginning of the next reaction calculation. RUN_CELLS (PhreeqcRM) will use the current definitions when geochemical reactions are calculated. (The same would be true for IPhreeqc, if that is what you are using.)
I'm going to stop here. I am not sure we are both thinking along the same lines.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
PhreeqcUsers Discussion Forum
»
Processes
»
Reactive transport modelling
»
Reactive transport modelling: convergence problem