40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
  COMSOL elog  Not logged in ELOG logo
Message ID: 53     Entry time: Wed Jul 10 17:52:18 2013
Author: Koji 
Type: General 
Category: General 
Subject: How to force time steps for a time dependent simulation 

A common trap in COMSOL:

When you run a time series simulation, COMSOL tries to be "clever" by skipping some time steps
and returns you an interpolated result in order to accelerate the calculation.
But for certain types of applications, such as time series response analysis by applying periodic force/heat,
this "clever" adaptive algorithm messes up our calculation.

You can apply forced time steps by giving a specific option:
- In Model Builder, open your study. Then open your Solver
- Click "Time-Dependent Solver" in Model Builder
- You get bunch of options in Time-Dependent Solver pane.
  Open "Time Stepping".
- Change "Method" from "Generalized alpha" to "BDF".
- Change "Steps taken by solver" to "Strict"

Then, you should be OK.

This can be done by

model.sol('sol1').feature('t1').set('tstepsbdf', 'strict');

in COMSOL with MATLAB. (Of course sol1 and t1 should be changed appropriately.)

ELOG V3.1.3-