Starting a model with previously a generated head field
This post describes how to use two methods for setting initial head conditions from previous simulations. The first method, Initial head from output file, assigns an initial head value to all nodes in the current domain by reading it from a previously generated output file. This method is particularly useful when you want to avoid starting a simulation from scratch after a crash or when using results from a prior simulation to initialize a transient model. The second method, Restart file for heads, uses the prefixo.hen file, which contains the head for all nodes across all domains after a simulation’s successful completion. This allows the model to restart from the exact conditions saved in the file.
There are several reasons why you may wish to start a model using the results from a previous simulation; such as recovering from a crash, or using the results of a model spin up as an initial condition for a transient simulation. This post presents two methods for how to use a previously generated head field as an initial condition.
Note: when using the following commands, the 3D mesh used to generate the head field must be identical to the mesh of the model it is being applied to.
Initial head from output file
All nodes in the currently active domain (i.e. porous media, surface, etc.) are assigned an initial head value which is read from a previously generated output file with the name prefixo.head_domain.suffix, where suffix is a 4-digit number identifying the output file. Since it is applied to the current domain type you can use, for example, prefixo.head_pm.0003 for the porous media and prefixo.head_olf.0003 for the surface domain. This can be useful, for example, when a run crashes (since you don’t have to start simulation from scratch) or if you want to use separate solutions of groundwater and surface flow to start a coupled surface-subsurface simulation.
The *.000X files are generated from the output times…end command.
Restart file for heads
This command uses the prefixo.hen file which is written at the successful completion of a simulation and stores the head for all nodes in all domains. This means that the command Restart file for heads only needs to be issued once in grok and the heads from the prefixo.hen will be assigned to all active domains. It is recommended that this file be renamed to avoid accidentally overwriting it and changing the restart conditions for a later run.
Note: when using Restart file for heads it is assumed that the same domains would be active in both domains. For example, the prefixo.hen file from a simulation without an OLF domain would not be suitable for a new simulation which does have an active OLF domain.
Auto save on
Auto save on isn’t an initial head command, but rather it is a useful command to generate files that can be used as initial head fields in the event that a model crashes. Specifically, this command reads a wall clock time interval in seconds with which restart files for head and concentration will be automatically recorded/updated in the prefixo_head.asv and prefixo_conc.asv files. The last time saved can be found in the prefixo.lst file.
The prefixo_head.asv can be used in place of prefixo.hen with the Restart file for heads command.
Notes:
When using the *.hen, *.asv, and *.000X files as initial conditions, it is important to consider whether the initial time of your simulation needs to be updated to reflect the time of the initial condition being used.
Similar commands exist for solute transport initial conditions, such as Initial concentration from output file and restart file for concentrations.