[CIG-SHORT] Residual not resetting and problems with adaptive time stepping.

Brad Aagaard baagaard at usgs.gov
Tue Feb 11 15:31:21 PST 2014


On 02/11/2014 03:17 PM, Jonathan Bedford wrote:
> Dear Pylith Community,
>
>     I have a couple of problems and I was wondering if you could please help me.
>    I am trying to model the linear maxwell viscoelastic response to an
> earthquake.  For this I want to use the implicit formulation with adaptive
> timestepping (see coseismic_and_visco.cfg & pylithapp.cfg for more details).
>
> Problem 1)  Pylith gives me equal timesteps that are equal to the 'max_dt' value
> that I specify in the cfg file.  I have tested various combinations of 'max_dt'
> and 'total_time' values, and the time step is always 'max_dt'.  I was expecting
> the time steps to vary in length.  Furthermore I set the 'adapt_skip' value to
> zero, which had no effect.  I have tried various 'total_time' and 'max_dt'
> combinations and I still cannot get the time steps to adapt.

The adaptive time stepping is based on the stability criterion. For a 
linear Maxwell material it is based on the Maxwell time (I believe it is 
0.1 times the Maxwell time), which is constant. This is why the time 
step is not changing. In the next year, we plan to use the PETSc TS 
features to allow much more sophisticated time stepping algorithms that 
will give try adaptive time stepping.

> Problem 2) For my model Pylith proceeds with the linear solver for each time
> step and solves according to the 'ksp_atol' and 'ksp_rtol' values that I specify
> in the .cfg file.  However, I noticed that the residuals are carried forward to
> the next time step.  When the solution eventually converges at time step n,
> pylith does not iterate on the n+1 time step, instead it says 'Linear solve
> converged due to CONVERGED_ATOL iterations 0' (see attached file
> 'terminal_output').  For the time steps that are not iterated upon the modelled
> displacements are zero.  In my pylithapp.cfg file I have included large
> tolerances and a small maximum iteration number, but this behaviour still occurs
> for smaller tolerances and larger maximum iterations.
>
> Any help would be greatly appreciated.  Attached is the terminal output
> ('terminal_output'), the .cfg files, and the solution at a set of surface points
> ('GPS_points.h5').

Your relative convergence tolerances are much too large. ksp_rtol=0.01 
means the residual, no matter how big it starts, only has to decrease by 
0.01 times for the convergence tolerance to be reached. The linear solve 
converges but the error is very large, so you are getting garbage. In 
later times step the solution diverges (look for DIVERGED_ITS). Try the 
settings in the examples and then slowly increase them if you don't need 
something as tight.

Also use

ksp_error_if_not_converged = true

so that you will get an error if the solution does not converge.

Regards,
Brad



> Thanks,
> Jon Bedford
>
> Section 3.1
> GFZ-Potsdam
>
>
>
>
> _______________________________________________
> CIG-SHORT mailing list
> CIG-SHORT at geodynamics.org
> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>



More information about the CIG-SHORT mailing list