PhreeqcUsers Discussion Forum

Registrations currently disabled due to excessive spam. Please email phreeqcusers at gmail.com to request an account.
Welcome Guest
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Reactive transport modelling »
  • Warm starting / Using previous states as initial guess
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Warm starting / Using previous states as initial guess  (Read 7359 times)

klk

  • Contributor
  • Posts: 5
Warm starting / Using previous states as initial guess
« on: 09/10/25 14:11 »
Hello. I'm evaluating options for coupling a geochemical solver to a flow/transport framework. I'd like to know if it's possible to control IPhreeqc and/or PhreeqcRM so that we can reuse the geochemical state from a previous time step in a grid point as the initial guess for the geochemical calculation in the next time step, at the same grid point. If so, could you please provide some pointers (e.g., tutorial, specific API, etc.)?

Many thanks!
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4296
Re: Warm starting / Using previous states as initial guess
« Reply #1 on: 10/10/25 04:04 »
PhreeqcRM automatically uses the previous state unknowns (pH, pe, log activities of master variables for elements, and others) in a cell as the initial guess for the next reaction in the cell; so results from the previous RunCells are used as guesses for the next RunCells for each cell. Depending on the calculation PHREEQC and IPhreeqc also try to use results from previous calculations for initial guesses.

I'm not sure what you have in mind, but it is possible to save the state of all of the cells and reset to that state at a later point in the calculations by using the StateSave and StateApply methods of PhreeqcRM. This capability might be useful for a predictor-corrector numerical scheme.

It is also possible to dump the state of the calculations to a file with the DumpModule method of PhreeqcRM. With a little work, the state can be read as initial conditions to start a new simulation.



Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Processes »
  • Reactive transport modelling »
  • Warm starting / Using previous states as initial guess
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies
  • XHTML
  • RSS
  • WAP2