Community header

Forum

Slower model run and no convergence for CG method error

Niraj Bal Tamang, modified 2 Years ago.

Slower model run and no convergence for CG method error

Advanced Augur Posts: 35 Join Date: 4/26/21 Recent Posts
I ran a morphodynamic model in parallel and i got this error before the model stopped running "** ERROR  :  no convergence for CG method, nr of iterations, eps :           1001      0.000864" . The estimated total time of model run was also greater (4.5 days) than previous models (1.8days) and the processing time was also too slow than previous models. Before the model crashed, it took a long list of iterations saying "** INFO   :  Solver converged in            1  iterations". Previously, i reduced the initial and maximum timestep and it worked. But this time, it crashed even after i am using low values (0.5s for initial timestep and 2s for maximum timestep).  Can you please help me on solving this?
thumbnail
Victor Chavarrias, modified 2 Years ago.

RE: Slower model run and no convergence for CG method error

Famous Fortune teller Posts: 98 Join Date: 4/24/20 Recent Posts
Hi, 

A convergence error usually occurs when the bed level has evolved into something unreallistic. The messages informing that the convergence occured in 1 iteration suggest that the time step is very small, i.e., the simulation stalls. This is also in line with the fact that the estimated time increased significantly. In these messages the fact that you run in parallel is not relevant as most probably the same would occur in sequential. 

I would try to confirm that the bed has indeed evolved into something absurd, causing the flow solver to stall and not converge. Do you have output for seeing this? 

Second would be to assess what the problem may be for unrealistic morphodynamic development. Does the problem appear at the start of the run? Or does it take time to happen? If it happens at the beginning of the run, the problem may be with the initial condition. Are you allowing time for the hydrodynamic component to spin-up using <MorStt> flag in the mor-file? Is this time sufficiently long such that the flow is steady before morphodynamic development starts? If the flow is steady, is the flow field sufficiently smooth? or are there sudden bed elevation changes? If the problem occurs after a while, that it happen after a sudden change in hydrodynamic forcing?

Note that the initial time step should not matter, as there should be enough time for hydrodynamic field to adapt. Second, the maximum time step should also not matter if this is large compared to the time step as limited by the CFL criterion. Stability of the bed level equations usually require a time step much larger than that for the flow, so it should also not matter.

Hope it helps to find the issue.
Niraj Bal Tamang, modified 2 Years ago.

RE: Slower model run and no convergence for CG method error

Advanced Augur Posts: 35 Join Date: 4/26/21 Recent Posts
Thanks a lot. I checked the .mor file and realized that I changed the Morfac to 5 from 1. I have set it back to 1 and put the model in the queue. All the settings were same previously when it was working well. The MorStt was set to 720 (default). I will see if the model works with current settings and look into other parameters then.  
thumbnail
Victor Chavarrias, modified 2 Years ago.

RE: Slower model run and no convergence for CG method error

Famous Fortune teller Posts: 98 Join Date: 4/24/20 Recent Posts
Note that 720 as default has little meaning. It depends on your simulation whether this is enough or not and the value is in <Tunit>. Check how much time is needed for your case to have steady flow prior to start morphodynamics. 
Niraj Bal Tamang, modified 2 Years ago.

RE: Slower model run and no convergence for CG method error

Advanced Augur Posts: 35 Join Date: 4/26/21 Recent Posts
Thanks. I checked the output file and it does aggrade unexpectedly after sometime which might have cause the model misbehavior. The iterations are upto 12 every time for each parallel sessions. I am new to this so can you please tell me how can i check the time required for the steady flow prior to morphodynamics as the error is occurring after running for some time within the first hour of data time simulation. 
thumbnail
Victor Chavarrias, modified 2 Years ago.

RE: Slower model run and no convergence for CG method error

Famous Fortune teller Posts: 98 Join Date: 4/24/20 Recent Posts
You can compute theoretically an approximation of the time $T$ it takes for a perturbation in the flow to travel your domain as $T=L/c$ where $L$ is the length of your domain and $c=u-\sqrt(gh)$ is the slowest one-dimensional flow celerity, where $u$ is the magnitude of the flow velocity, $g$ is the acceleration due to gravity, and $h$ is the flow depth. In the order of 10 times the time scale perturbations and their reflections at boundaries should have dissipated sufficiently. Still, the simplest is to check the solution at observation stations and see how much time it takes to stabilize. 
Niraj Bal Tamang, modified 2 Years ago.

RE: Slower model run and no convergence for CG method error

Advanced Augur Posts: 35 Join Date: 4/26/21 Recent Posts
Thank you. The length of my river reach is 6km with average depth of 0.3m and minimum of 2m/s velocity from the hydrodynamic run. If i use the above relation, then it would give nearly 5 hours of MorStt time. I realized that the model is giving problem right at the beginning of the morphodynamic process. Instead, I increased the MorStt value from 720 to 1800, just to provide more time for initiation of the morphodynamic development. The solver was converging in 12 iterations before the MorStt time. As soon as the MorStt time started, the solver couldn't go above 4 iterations and started taking too long to process and eventually crashed. I was wondering if it would be a good idea to assign such a high MorStt value as I am running the model for 45 timesteps of hourly data. Or am I missing any step in the calculation?  When I checked the .dia files of the individual partition, it is showing Sediment erosion shortage at NM....280.Fraction:...1 Mass available..Mass to be eroded. I guess my sediment feed was too less for the morphodynamic development. Right?