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.:
$RELOAD 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”)
$RELOAD 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:
#PROCESS $PCS_TYPE LIQUID_FLOW $PRIMARY_VARIABLE PRESSURE1 $RELOAD 1 1 #PROCESS $PCS_TYPE HEAT_TRANSPORT $PRIMARY_VARIABLE TEMPERATURE1 $RELOAD 1 1 #STOP
The restart files have names which are combinations of:
The ascii-file format inside the files looks somehow like this
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:
(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.