# 11.3. Automated Implicit/Explicit Hand-off

Explicit/Implicit hand off analyses are a common use case for Sierra/SM. For example, a component may be preloaded in an implicit quasistatic procedure; then, the preloaded component is subjected to an impact loading in an explicit dynamics procedure. Multi procedure analysis may be setup manually by defining multiple analysis regions, procedures, time controls, and transfer blocks. However, this manual process is time consuming and error prone.

The same functionality described above can be accomplished with the much simpler syntax below. The following example time block will perform an implicit to explicit hand off analysis.

    BEGIN SM PROCEDURE myProcedure
      BEGIN TIME CONTROL
        BEGIN TIME STEPPING BLOCK preload
          START TIME = 0.0
          BEGIN PARAMETERS FOR SM REGION myRegion
            NUMBER OF TIME STEPS = 5
            TIME INTEGRATION = implicit_statics
            ADVANCE ON SOLVER FAILURE = current_procedure
          END
        END
        BEGIN TIME STEPPING BLOCK impact
          START TIME = 0.1
          BEGIN PARAMETERS FOR SM REGION myRegion
            TIME INTEGRATION = explicit_dynamics
          END
        END
        termination time = 0.1001
      END
      BEGIN SM REGION myRegion
        ...Include region commands as normal here...
      END
    END

The automatic time period capability is triggered by using the `BEGIN SM PROCEDURE` and `BEGIN SM REGION` command lines rather than using `BEGIN PRESTO REGION` or `BEGIN ADAGIO REGION` procedures and regions. When these `SM` commands are used, the input deck is automatically run though a preprocessor to turn the single region multi time period input deck into an equivalent multi-procedure analysis. This preprocessed input deck is then automatically run by the sierra script. If the input deck originally has a name such as `plateImpact.i` the preprocessed input deck will be saved to `plateImpact.sm.i`. The modified input deck will also be echoed in the run log file.

The input deck preprocessing currently does the following operations to aid in setting up multiple region analysis.

- Time periods with `TIME_INTEGRATION` of `implicit_statics` will be converted into implicit adagio regions. Time periods with the `TIME_INTEGRATION` of `explicit_dynamics` will be converted into explicit presto regions. The appropriate begin and end times for each procedure and region will be automatically determined from the time period blocks defined in the `SM` region. Additionally, the appropriate transfer operations between the regions will be automatically defined. The analysis procedures may switch back and forth between time integration schemes as many times as needed.

- The optional `ADVANCE ON SOLVER FAILURE` command can be used within an implicit analysis to define the course of action if the solver fails. The `current_procedure` option will kill the current procedure and start the next procedure using the last converged state of the solution. If the `current_time_period` option is used, the simulation will continue to the next time stepping block of the same procedure (if present). Keep in mind that the next time stepping block should not have a `START TIME`, since it will likely conflict with the last converged time of the previous time stepping block. The default option is `no_advancement`, which will terminate the simulation upon solver failure.

- Boundary conditions will be appropriately placed in each region based on their active periods.

- Each solution procedure will define its own results, history, and restart files. Output database names for results, history, and restart files will be automatically prepended with time period names to be unique for each analysis region. This file name modification prevents the output from one region overwriting the output of a previous region. If in the above example a results output file in the `SM` region is given the name `myResult.e` the analysis will output two separate results files `preload_myResult.e` and `impact_myResult.e`.

- If solution termination is used to dynamically swap between time periods and procedures these swaps are setup to function correctly with the multi-procedure analysis during the preprocessing.

The `SM` region preprocessing assumes all solution procedures use the same mesh, blocks, and material definitions. Additionally, transfers are always setup to transfer all possible analysis state data from one solution procedure to the next. More complex multi-region analyses cases can always be setup manually. For such manual setups, the automatically generated preprocessed SM input deck may still provide a good initial starting point for setting up a more complex input deck.

## 11.3.1. Known Issues and Limitations

Only capabilities that can be used in both implicit and explicit runs may be present in the `SM` region. For example this precludes use of `SPH` particles as this element formulation is only available in explicit analyses.

Hand-offs using an `SM` region cannot be run coupled to another physics code through solution control. An example would be an arpeggio (aria/adagio) coupled analysis.