Set initial conditions using the solution from a previous analysis on the same geometry and mesh.

Create and view the geometry: a square with a circular subdomain.

Include the geometry in a PDE model, set boundary and initial conditions, and specify coefficients.

Solve the problem for times 0 through 1/2 in steps of 0.01.

Plot the solution for times 0.02, 0.04, 0.1, and 0.5.

Now, resume the analysis and solve the problem for times from 1/2 to 1. Use the previously obtained solution for time 1/2 as an initial condition. Since 1/2 is the last element in `tlist`

, you do not need to specify the solution time index. By default, `setInitialConditions`

uses the last solution index.

ans =
NodalInitialConditions with properties:
InitialValue: [7289x1 double]
InitialDerivative: []

Solve the problem for times 1/2 through 1 in steps of 0.01.

Plot the solution for times 0.5, 0.7, 0.9, and 1.

To use the previously obtained solution for a particular solution time instead of the last one, specify the solution time index as a third parameter of `setInitialConditions`

. For example, use the solution at time 0.2, which is the 21st element in `tlist`

.

ans =
NodalInitialConditions with properties:
InitialValue: [7289x1 double]
InitialDerivative: []

Solve the problem for times 0.2 through 1 in steps of 0.01.