Loading Initial State¶
Overview¶
Loading Initial State is a powerful feature that enables flexible and efficient simulation workflows. A common use case is to begin with a low-resolution simulation to capture the overall flow behavior at reduced computational cost, then use the resulting state as the starting point for a higher-resolution simulation. This approach preserves the developed flow field while significantly reducing total runtime.
Initial State can also be used to control particle configurations. For example, a particle arrangement saved in a checkpoint file can be loaded into a different simulation to reproduce a specific starting distribution or to continue studying particle behavior under new conditions.
By allowing previously computed states to seed new simulations, Initial State supports faster iteration, scenario reuse, and more advanced study design.
Getting Started¶
To use the Initial State check point mapping capability, first define where the source is located on the computer and how to reference it. Under Simulation Parameters / Initial State / State Mode / External Load, scroll down to State Map and select Edit (
).
The following window should appear:
Check Point Mapping Window¶
Where is the checkpoint data?¶
○ Local - Copy data during export: If the source data are located on the computer you are currently using, you may use this option. When you export the case, the source data will be copied into the new case. This helps to make the case more self-contained.
○ Local - Refer to data: If the source data are located on the computer you are currently using, you may use this option. It’s the same as the previous option, but no source data are copied into the new case when you run/export the simulation. This is more efficient, but makes the simulation less self-contained. If you change or delete the source data at some point, this simulation will no longer run.
○ Remote - Refer to data: If you are preparing a simulation to run on a remote resource, you will need to use this option. The absolute path to the source data on the remote resource will be required.
Path to TimeX.XXXX Directory¶
The source data are chosen by selecting a checkpoint TimeX.XXXX directory in source case. These directories live under a case at out\Checkpoint\TimeX.XXXXX. Select the time you want to use for mapping. If the case data are local, you will be able to use the … button to select the data location.
Type Source Target Load Table¶
The remainder of the form shows how the source data will be mapped onto the current case. If you choose one of the Local data source options, you will see the available data names in the Source column. The Target column shows the available target names from the current case. The Load column allows you to turn on/off data mapping for the displayed fields.
Loading Initial State from Another Case¶
This tutorial will demonstrate how to load initial state from another case with a different resolution. We will run a simple simulation for five seconds, change its resolution, then run the simulation for another five seconds.
Create a directory structure on your computer to contain this tutorial:
initial-state-test/
90/
100/
Create a Base Line Case¶
Create a new case using the Agitated System
File > New from template > Agitated System
Set ResolutionLX = 90
Set Max Run Time = 5
Save the msb file to
initial-state-test/90/sim.msbClick Run. Choose the directory:
initial-state-test/90/Run the case and wait for it to complete
Create a Case with Changed Resolution¶
Go back to the pre processor and save a copy of the original case to:
initial-state-test/100/sim.msbSet ResolutionLX = 100
Set Max Run Time = 5
Set the Initial State Option = ExternalLoad
Set the Initial State Path = (Browse to the
initial-state-test/90/out/Checkpoint/directory and pick the most recent checkpoint directory)Save the msb file to
initial-state-test/100/sim.msbClick Run. Choose the directory
initial-state-test/100/Run the case and wait for it to complete
Tip
If you need to move the case directory to run on a different machine, be sure to include the initialState/ directory along with your input files.
Results¶
The case structure should look roughly as follows:
initial-state-test/
90/
out/
sim.msb
input.xml, etc
100/
initialState/ <-- Initial state copied from original case. Be sure to copy this directory along with the input files if you need to run the case on another machine
out/
sim.msb
input.xml, etc
You can look at the output of the 100 case in M-Star Post and see that the fluid field near time zero was interpolated from the original case. Also note that the particles field state is not loaded from the original case checkpoint. The initial state loading functionality only loads fluid state and scalar fields.