Issue with outputting correct timestep in viscoelastic model

Hello all,

I am running an isotropic Maxwell viscoelastic model with a single fault where I impose a kinematic rupture at t=0 and wish to observe postseismic surface deformation after the event. My model has dt = 0.25 days and I’ve set each each object’s output field timestep = 1.0 day.

When I run this model, the set of output files have an irregular timestep, going from 0 to 1 to 2 days as desired but occasionally having a timestep of 1.25 days, going from 12 to 13.25 days for example.

I’ve confirmed with the pylith_parameters.json file that the timestep is supposed to be 1.0 days, below is a snippet from my cfg file where I prescribe it.

[pylithapp.problem.interfaces.fault.output]
output_freq = time_step
time_step = 1.0 * day
writer.filename = trans_e1_3d/fault.vtk
writer.time_format = %06.3f
writer.time_constant = 1.0 * day

Thanks in advance for any help in fixing this issue,
-Jacob Dorsett

edit: on the time_step and writer.time_constant lines, I don’t have spaces between the values in my code, but I added that so they appear formatted correctly here.

You are encountering the effects of roundoff error. Use time_step = 0.9999*day as we do in the examples.

Hey Brad, thanks for the quick reply. This fixed the issue.