On Mon, Aug 8, 2016 at 3:08 AM, Korevaar, Martin <[email protected]> wrote: > > Dear Daniel, > > > > Thanks for looking into this. I sent you an MWE of my actual code to keep > things as simple as possible, apparently too simple. Indeed in my actual code > the variables are updated. Furthermore, I also implemented some adaptive > timestep. But that did not help much. Timesteps can only be a few seconds, or > otherwise no converging of the solution was possible. While I require few > days as timestep size, not seconds. I have added a MWE with my implementation > of an adaptive timestepsize. I also restart the timestep with a smaller > timestep when the solutions contain values below zeros as that seem to cause > instabilities that grow and cause errors like > > RuntimeError: Factor is exactly singular > > > > Maybe you can give me some more suggestions to increase the timestepsize and > still have converging solutions?
I didn't realize, but there are no diffusion terms in any of the equations so there is a CFL time step limit that you can never overcome. Having diffusion in the problem means that you can often ignore the CFL limit and sacrifice accuracy, but I don't think you can in this example. In fact, FiPy is not that well suited for this problem although it will probably work. Maybe including some diffusion in the problem would help have bigger time steps, but with the diffusion being quite small. Try it in the convection term equation and see if helps to stabilize things. Also check what the CFL time step limit is and print it out at each time step to see if the simulation breaks down when it is exceeded. -- Daniel Wheeler _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
