How to setup initial conditions with restart files ($RELOAD)?

One questions that will pop up after the models are getting more advanced is “How do I include e.g. my steady state results as an IC in a transient model?

The answer is: Use restart files! Such files can exist for each process and can

a) be prepared somehow externally (simple ASCII format)
b) be created by OGS automatically

The use of restart files is simple: Add $RELOAD to each process defintion in the pcs-file. Values are e.g.:

1 100

writes restart file every 100th time step and 1 1 would write the restart file every time step. Old restart file will be overwritten!


reads the restart file as initial condition (no “second number”)

3 100

reads the restart file as initial condition and writes every 100th time step. Again, old restart file will be overwritten! Attention:

While reading in restart files (i.e. case 2 and 3), one should use empty IC files, otherwise the content of the IC files “may” overwrite the restart values!

PCS file -example:

  1 1
  1 1

The restart files have names which are combinations of:



The ascii-file format inside the files looks somehow like this

1.007500000000000e+001 1.010000000000000e+001
1.009364908970105e+001 1.011844324940913e+001
1.011327971061652e+001 1.013785719634237e+001

The first line is related to node 0 of your finite element mesh, the second line to node1 and so on. However, you see two columns where you may have expected one. The reason is simple: the first column is the result of the previous time step. However, if you create a restart file manually for the very first time step as IC, then better copy your values in both columns like:

191.163546 191.163546
286.745319 286.745319
382.327092 382.327092

(doubled entries, because there is no rule yet which column belongs to time step 0.)

That’s how I understand it. Please leave a comment if you find something wrong, misguiding or unclear.