Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Matrix has zero on diagonal

Please login with a confirmed email address before reporting spam

I have to solve a lid driven cavity (laminar flow) + melting problem (heat transfer in fluids and solids with moving mesh). I was able to successfully implement this in 2D.

I have now shifted to a 3D model, still solving the same physics. I get an distinct ( i haven't encountered this previously) error message which I’m unable to understand :
Failed to find a solution for the initial parameter.
Matrix has zero on diagonal for the SSOR update submatrix in the Vanka algorithm.
Returned solution is not converged.

In the Comsol reference manual, explanation for matrix equation for vanka algorithm is attached in the picture

Is the diagonal element (Sj) = 0? This S corresponds to the average values of the velocity vectors?
My initial condition is set to zero.

I have also attached my model file.

Kindly help


3 Replies Last Post 4 mag 2016, 09:11 GMT-4
Jim Freels mechanical side of nuclear engineering, multiphysics analysis, COMSOL specialist

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 3 mag 2016, 21:05 GMT-4
Try the coarsest mesh you can devise with a direct solver, and see if you still get the error. If so, you may have a BC implemented wrong or missing.
Try the coarsest mesh you can devise with a direct solver, and see if you still get the error. If so, you may have a BC implemented wrong or missing.

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 4 mag 2016, 02:55 GMT-4
Dear James,
I'm extremely thankful for your reply.
Further, i would like to know , on what basis would you deduce that?


Try the coarsest mesh you can devise with a direct solver, and see if you still get the error. If so, you may have a BC implemented wrong or missing.


I tried your advise two ways: with and without direct solvers.
For direct solvers with a coarse mesh i get the error message :
Failed to find a solution for the initial parameter.
Maximum number of segregated iterations reached.
Returned solution is not converged.

For direct solver with a fine mesh i get the error message with a convergence plot for the segregated solver attached in the picture:
There was an error message from the linear solver.
The relative error (7.3e+002) is greater than the relative tolerance.

for the default solver settings with a finer mesh i get the same error message with a convergence plot for the segregated solver attached in the picture:

Failed to find a solution for the initial parameter.
Maximum number of segregated iterations reached.
Returned solution is not converged.

What to diagnose from this?

regards
Parth swaroop

Dear James, I'm extremely thankful for your reply. Further, i would like to know , on what basis would you deduce that? [QUOTE] Try the coarsest mesh you can devise with a direct solver, and see if you still get the error. If so, you may have a BC implemented wrong or missing. [/QUOTE] I tried your advise two ways: with and without direct solvers. For direct solvers with a coarse mesh i get the error message : Failed to find a solution for the initial parameter. Maximum number of segregated iterations reached. Returned solution is not converged. For direct solver with a fine mesh i get the error message with a convergence plot for the segregated solver attached in the picture: There was an error message from the linear solver. The relative error (7.3e+002) is greater than the relative tolerance. for the default solver settings with a finer mesh i get the same error message with a convergence plot for the segregated solver attached in the picture: Failed to find a solution for the initial parameter. Maximum number of segregated iterations reached. Returned solution is not converged. What to diagnose from this? regards Parth swaroop


Jim Freels mechanical side of nuclear engineering, multiphysics analysis, COMSOL specialist

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 4 mag 2016, 09:11 GMT-4
The problem you are solving is very common test problem in academic communities for CFD. My guess is perhaps you are doing this for part of your education. So, I do not need to do this for you. You need to learn how to do this for yourself.

My only advice is that you need to first make the problem very easy to solve, with the least level of the driver that is forcing the problem. For the cavity problems, it is usually the temperature difference between the walls. Make that small, make the mesh very coarse. Get a solution to converge for the simplest form of your problem first. Then start increasing the forcing term, refining the mesh, making the problem tougher to solve.

This is how you need to learn to solve most any problem numerically. This is basic stuff.
The problem you are solving is very common test problem in academic communities for CFD. My guess is perhaps you are doing this for part of your education. So, I do not need to do this for you. You need to learn how to do this for yourself. My only advice is that you need to first make the problem very easy to solve, with the least level of the driver that is forcing the problem. For the cavity problems, it is usually the temperature difference between the walls. Make that small, make the mesh very coarse. Get a solution to converge for the simplest form of your problem first. Then start increasing the forcing term, refining the mesh, making the problem tougher to solve. This is how you need to learn to solve most any problem numerically. This is basic stuff.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.