5.2.3.1. IC Based Restart

This example shows how to restart a problem in Aria using Results Output from a previous simulation. It builds on the example case built up in the Sierra 100 tutorial.

5.2.3.1.1. Problem Files

The files required for this example can be downloaded here, or found at $TESTS/aria_rtest/example/training/fileRestart (where TESTS=/projects/sierra/tests in a CEE environment, or your Sierra test distribution otherwise).

Note

In the present examples, the start_time and end_time are arbitrarily set as aprepro variables. In practice, these will be determined by external factors e.g. timeouts on HPC queues.

5.2.3.1.2. Input Deck Modification

File-based restart can be incorporated in multiple ways, depending on the use case

Using File Directly

This is the simplest use case, where a field from an external file is directly copied into a DOF field. Limitations of this approach include

  • The meshes must be identical.

  • Only a single time-plane can be applied.

  • The IC is applied to the entire domain; a specific part cannot be given.

Using an IO Region

While Using File Directly provides a less verbose syntax for file-based restart, it is not always sufficient. Using an IO Region relaxes these restrictions, at the expense of requiring a slightly more verbose syntax. Cases where this is necessary include when

  • The property must be interpolated from one mesh to another or in time.

  • The IC must be applied on only a subset of the mesh.

  • Properties are defined on differing topologies (e.g. an element field).

Using Transfer

The main limitation of Using an IO Region is that the transfers are setup with default properties that cannot be changed. Using transfer provides the highest level of control on how the IC is applied, but requires the most verbose syntax.

Setup for these options are discussed in the remainder of this section.

Using File Directly

To use the results of a previous simulation directly, one must first modify the existing finite element model block to read in these results instead of the mesh file.

Note

The implication of this is that the mesh must be the same as the previous simulation. This requirement is relaxed when Using an IO Region.

$---------------------------------------------------
$   Specify mesh name and settings
$---------------------------------------------------
# Scope: Sierra
Begin Finite Element Model FEModel
  Database Name = heat_cond.e # instead of mesh.g

  ...
End   Finite Element Model FEModel

Additionally, the original ICs are replaced with Ic Read_File commands referencing the respective quantities in the restart results.

$---------------------------------------------------
$           Specify initial conditions
$---------------------------------------------------
# Scope: Sierra > Procedure > Aria Region
Ic Read_File Temperature = T # Temperature field name in output file
Ic Read_File Voltage = V     # Voltage field name in output file

By default, the last time in the file will be used. This behavior can be overridden by specifying a time to be used. Note that this will only take the nearest time to the requested one. If interpolation in time is required, consider Using an IO Region. See Ic Read_File for a more detailed description of its functionality.

Using an IO Region

To apply this strategy, the previous results are first read in and used in an IO Region. This requires both loading in the results to a finite element model block

$---------------------------------------------------
$   Specify mesh name and settings
$---------------------------------------------------
# Scope: Sierra
Begin Finite Element Model FEModel
  ...
End   Finite Element Model FEModel

Begin Finite Element Model reinitModel
  Database Name = heat_cond.e
End   Finite Element Model reinitModel

and using it in an IO Region

$---------------------------------------------------
$   Setup reinitialization region
$---------------------------------------------------
# Scope: Sierra > Procedure
Begin Input_Output Region reinitRegion
  Use Finite Element Model reinitModel
End   Input_Output Region reinitRegion

Similar to above, the original ICs are then replaced with the respective Ic Input_Output_Region commands

$---------------------------------------------------
$           Specify initial conditions
$---------------------------------------------------
# Scope: Sierra > Procedure > Aria Region
IC Input_Output_Region on all_blocks Temperature = T
IC Input_Output_Region on all_blocks Voltage = V

Note

If more than one IO Region is present in the simulation, one must be explicitly selected in the IC Input_Output_Region line.

Using Transfer

The Ic Input_Output_Region automatically creates the transfers required to initialize a given problem. As a result, it must make some implicit decisions about how these transfers are setup (e.g. extrapolation treatment). At the expense of making the input deck more verbose, these settings can be controlled explicitly by creating the transfers yourself. Similar to above, one must first read the results into an IO region via a finite element block

# Scope: Sierra
Begin Finite Element Model reinitModel
  Database Name = heat_cond.e
End   Finite Element Model reinitModel
# Scope: Sierra > Procedure
Begin Input_Output Region reinitRegion
  Use Finite Element Model reinitModel
End   Input_Output Region reinitRegion

Unlike above, the IC lines are remove and not changed. In their place, transfer(s) are defined to control how the information is applied to the IC. See Transfer for more information on how to set up transfers.

$---------------------------------------------------
$   Setup IC transfers
$---------------------------------------------------
# Scope: Sierra > Procedure
Begin Transfer icTransfer
  Interpolate Volume Nodes From reinitRegion To AriaRegion

  Send Field T State none To Solution->Temperature State old
  Send Field V State none To Solution->Voltage State old

  #User-specified settings for transfer
  Nodes Outside Region = Truncate
  ...
End   Transfer icTransfer

These transfer(s) are then called at initialization of the restarted simulation by calling them in the Initialization block

# Scope: Sierra > Procedure
Begin Solution Control Description
  #Define initialize block and use it in system
  begin initialize init
    advance reinitRegion
    advance AriaRegion
    transfer icTransfer
  end   initialize init

  ...

  Begin System Main
    use initialize init

    ...
  End   System Main
End   Solution Control Description

Warning

Since each region will initialize its DOFs within the initialize block, the IC transfer must occur AFTER to overwrite the default DOF field.