Adaptive Time Step Support
Created by: ghost
General Changes
- A
TimeStep
manager class has been added to CUPyDO. - Some bug fixes in the algorithms (BGS, IQN-ILS and IQN-MVJ).
- The
Algorithm
andInterpolator
classes have been separated into multiple files for a better readability of the code. - Interface functions take a time step
dt
as input, instead of the current simulation time. - Adjoint-related arrays are created only when adjoint computation is enabled.
- Removal of some depreciated parameters.
Time Step Changes
- At each time step, CUPyDO performs FSI iterations until convergence or until the maximum number of iterations is reached. If the FSI did not reach the residual tolerance, the current step is restarted with
dt/2
and so on. Otherwise, the time step succeeded and the simulation continues with an increaseddt
. The maximumdt
is the one provided by the user. - At each FSI iteration, the fluid and solid solver
run(...)
return the state of their computation (True
orFalse
). In the second case, the FSI time step is restarted with a smallerdt
as usual. - In the case of steady coupling, CUPyDO raises an exception if either the solid or fluid solvers
run(...)
returnFalse
. - If a time step did not succeed, the stored information (
V
,W
orinvJ
) in the IQN-ILS and IQN-MVJ classes are erased for a fresh restart and one BGS iteration is performed before switching-back to IQN-ILS or IQN-MVJ coupling. - Some unsteady solvers (such as SU2) do not seem supporting adaptive time step. In such case, the solver raises an exception when
dt
is changed (i.e. when the solution did not match the convergence criterion). - Failed time steps are recorded in the
FSIhistory.ascii
file.
Battery Changes
It looks like some test cases from the battery were not converging. In the former version of CUPyDO, the simulation continued even when convergence was not reached... Now the convergence is ensured before continuing. This means that the new final result may be different from the reference value (while being correct in theory). I updated those test cases to match the new results https://github.com/ulgltas/CUPyDO/issues/27#issuecomment-1615825840.
- PFEM does support adaptive time step so only the reference results have been updated.
- SU2 does not support adaptive time step so the input parameters (tolerance and maximum number of iterations) have been changed for ensuring convergence. Since SU2 test cases are extremely sensitive, the final result are significantly different.