[SOLVED] Failed to find a solution for the initial parameter

Please login with a confirmed email address before reporting spam

Hello All,

I am trying to simulate laminar fluid flow and heat transfer throught a small part. I am using a stationary study with a parametric sweep (changing the heat rate parameter). I have an initial pressure condition on the inlet and also a heat source on one side of the model. First I started by simulating only the fluid flow and had no issues, when I went back and added heat transfer in solids and fluids I now have the following error when I try to compute:

"Failed to find a solution for the initial parameter. In Heat transfer: Divergence of the linear iterations. Returned solution is not converged. Not all parameter steps returned."

The computations appears to keep getting stuck at 22% with the GMRES not converging.

I am new to comsol, so I am not sure how exactly to figure out where I am going wrong. Any suggestions are greatly appreciated.

Thanks, Odette

UPDATE: I found this message in the Log: "Convergence criteria of the segregated solver are met but not all conditions for group Heat transfer are fulfilled.", so I am assuming there is something where with the conditions I set up for the Heat Transfer. However, I have looked and I do not see anything that is missing or wrong. Is there a way I can further isolate what the error is?


8 Replies Last Post 2 nov 2023, 12:14 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 6 months ago 23 ott 2023, 04:15 GMT-4

Is it possible for you to share the model? Much easier that way to get an answer. My first guess would be that you have insufficient boundary conditions for heat transfer. A list of things I would try (in no particular order): - Can you achieve the effect of the heat source in another way, say a heat flux? Does it work at all with any other boundary conditions? - Can you find a similar model in the COMSOL application files? Typically very helpful in replicating expected/desired behaviour when you have a reference to compare to. - Have you tried reducing the heat source? e.g. instead of 10^10 W/m^3 to 1. Load ramping might prove useful here (https://www.comsol.com/blogs/load-ramping-nonlinear-problems) - Does the problem work in reverse? e.g. Solve HT without the flow - Is the mesh fine enough near the heat source? If your material properties depend in a non-linear fashion on temperature that could be the cause of your issues. This list is non-exhaustive, but I find that not giving up is essential to tackling COMSOL issues.

Is it possible for you to share the model? Much easier that way to get an answer. My first guess would be that you have insufficient boundary conditions for heat transfer. A list of things I would try (in no particular order): - Can you achieve the effect of the heat source in another way, say a heat flux? Does it work at all with any other boundary conditions? - Can you find a similar model in the COMSOL application files? Typically very helpful in replicating expected/desired behaviour when you have a reference to compare to. - Have you tried reducing the heat source? e.g. instead of 10^10 W/m^3 to 1. Load ramping might prove useful here (https://www.comsol.com/blogs/load-ramping-nonlinear-problems) - Does the problem work in reverse? e.g. Solve HT without the flow - Is the mesh fine enough near the heat source? If your material properties depend in a non-linear fashion on temperature that could be the cause of your issues. This list is non-exhaustive, but I find that not giving up is essential to tackling COMSOL issues.

Please login with a confirmed email address before reporting spam

Posted: 6 months ago 23 ott 2023, 17:29 GMT-4
Updated: 6 months ago 23 ott 2023, 18:06 GMT-4

Thank you so much for your response Igor!

Unfortunately, I cannot share the file. So far I have tried changing Heat Source to Heat Flux. And updated my mesh carefully. Both times I got the same error as before.

I will continue to try your suggestions and let you know how it goes. If you or anyone else have more suggestions, let me know!

Thank you so much for your response Igor! Unfortunately, I cannot share the file. So far I have tried changing Heat Source to Heat Flux. And updated my mesh carefully. Both times I got the same error as before. I will continue to try your suggestions and let you know how it goes. If you or anyone else have more suggestions, let me know!

Please login with a confirmed email address before reporting spam

Posted: 6 months ago 23 ott 2023, 18:02 GMT-4
Updated: 6 months ago 23 ott 2023, 18:17 GMT-4

Just tried changing the solver from GMRES to PARDISO and got the following error: "The relative residual (1.7) is greater than the relative tolerance."

Because of the shorter computation time, I have kept it at PARDISO for now. I increased the relative tolerance to 0.01 and changed dependent variable scaling from automatic to manual (1) as suggested in another discussion, and am running the computation now. Is there anything else I should do? Or should I switch back to GMRES?

Just tried changing the solver from GMRES to PARDISO and got the following error: "The relative residual (1.7) is greater than the relative tolerance." Because of the shorter computation time, I have kept it at PARDISO for now. I increased the relative tolerance to 0.01 and changed dependent variable scaling from automatic to manual (1) as suggested in another discussion, and am running the computation now. Is there anything else I should do? Or should I switch back to GMRES?

Please login with a confirmed email address before reporting spam

Posted: 6 months ago 24 ott 2023, 12:00 GMT-4
Updated: 6 months ago 24 ott 2023, 12:00 GMT-4

If your material properties depend in a non-linear fashion on temperature that could be the cause of your issues.

Possibly a stupid question, but how would I determine this?

> If your material properties depend in a non-linear fashion on temperature that could be the cause of your issues. Possibly a stupid question, but how would I determine this?

Please login with a confirmed email address before reporting spam

Posted: 6 months ago 25 ott 2023, 03:41 GMT-4
Updated: 6 months ago 25 ott 2023, 03:46 GMT-4

On the left, the materials dropdown menu should show what materials you assigned to the domains. Click on one of your materials (for e.g. "Air" or "Water" if you used the predefined COMSOL materials). Once you click there, you will find thermal conductivity, density and other physical properties. You will maybe see some of them expressed as k(T), where the thermal conductivity is a function of temperature (see attached picture). Nonetheless, on second thought, I do not think this is your issue. It is hard for me to say what the exact issue is, so I suggest simplifying your problem further until you find what it is. What I mean by that is: - If you have a 3D geometry go to a 2D representation and try solving it that way. - If you have a complex CAD-file, the above still holds, try sketching a simpler geometry. - Remove the heat source, and try assigning a simple temperature boundary condition at your inlet, does the model work? - Try comparing your model to this COMSOL example: https://www.comsol.com/model/heat-sink-8574. It has fluid flow and heat transfer, the physics you need. Where is the difference? (I wager the temperature in your model is not constrained) In my experience, COMSOL suggests suitable solver settings most of the time, and typically a model set-up issue (e.g. wrong/missing boundary conditions, mesh issues) is the cause. Let me know how it goes.

On the left, the materials dropdown menu should show what materials you assigned to the domains. Click on one of your materials (for e.g. "Air" or "Water" if you used the predefined COMSOL materials). Once you click there, you will find thermal conductivity, density and other physical properties. You will maybe see some of them expressed as k(T), where the thermal conductivity is a function of temperature (see attached picture). Nonetheless, on second thought, I do not think this is your issue. It is hard for me to say what the exact issue is, so I suggest simplifying your problem further until you find what it is. What I mean by that is: - If you have a 3D geometry go to a 2D representation and try solving it that way. - If you have a complex CAD-file, the above still holds, try sketching a simpler geometry. - Remove the heat source, and try assigning a simple temperature boundary condition at your inlet, does the model work? - Try comparing your model to this COMSOL example: https://www.comsol.com/model/heat-sink-8574. It has fluid flow and heat transfer, the physics you need. Where is the difference? (I wager the temperature in your model is not constrained) In my experience, COMSOL suggests suitable solver settings most of the time, and typically a model set-up issue (e.g. wrong/missing boundary conditions, mesh issues) is the cause. Let me know how it goes.


Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 6 months ago 25 ott 2023, 10:05 GMT-4
Updated: 6 months ago 25 ott 2023, 16:17 GMT-4

Odette,

I agree with Igor that it would be very difficult to help you efficiently without being able to see how you set up your model. With that said, I can venture one more possibility, and that's that your model may not be internally consistent. An error one can make is to set up boundary conditions that are not consistent with the initial values inside the domains (especially in transient models), or not consistent among themselves. The software can only do so much to try and reconcile conflicting information. Transitioning from one value to the other via ramping functions such as smoothed Heaviside functions, either in space or in time, is often the recommended approach to deal with this.

Note that if the reason you can't share your mph file on this Discussion Forum is that the file is too big to upload, then you should clear all meshes and clear all solutions from it. This will reduce the file size dramatically and make it possible to upload.

Best,

Jeff

-------------------
Jeff Hiller
Odette, I agree with Igor that it would be very difficult to help you efficiently without being able to see how you set up your model. With that said, I can venture one more possibility, and that's that your model may not be internally consistent. An error one can make is to set up boundary conditions that are not consistent with the initial values inside the domains (especially in transient models), or not consistent among themselves. The software can only do so much to try and reconcile conflicting information. Transitioning from one value to the other via ramping functions such as smoothed Heaviside functions, either in space or in time, is often the recommended approach to deal with this. Note that if the reason you can't share your mph file on this Discussion Forum is that the file is too big to upload, then you should clear all meshes and clear all solutions from it. This will reduce the file size dramatically and make it possible to upload. Best, Jeff

Please login with a confirmed email address before reporting spam

Posted: 6 months ago 2 nov 2023, 11:10 GMT-4
Updated: 6 months ago 2 nov 2023, 12:36 GMT-4

Thank you so much to Igor and Jeff for your detailed and informative replies.

It seems that for my problem a stationary study would never be able to converge. Once I switched to a time depedent study and simplified my geometry a bit it did work.

Something weird did happen on my last study results though. When I run the study with one pressure value and one heat rate, the results show temperature flowing through the whole part. However, when I added two parameter sweeps (one for heat rate, one for pressure), apart from the heat source the entire part stays at the initial heat rate value. I am confused because the only thing I changed was the parameter sweeps. Does anyone know what happened?

The initial values: 1 W, 90 psi

Parameter sweep 1: 3kW, 6kW, 9kW, 12, kW, 15 kW Parameter sweep 2: 50 psi, 60 psi, 70 psi, 80 psi, 90 psi, 100 psi

Thanks, Odette

Thank you so much to Igor and Jeff for your detailed and informative replies. It seems that for my problem a stationary study would never be able to converge. Once I switched to a time depedent study and simplified my geometry a bit it did work. Something weird did happen on my last study results though. When I run the study with one pressure value and one heat rate, the results show temperature flowing through the whole part. However, when I added two parameter sweeps (one for heat rate, one for pressure), apart from the heat source the entire part stays at the initial heat rate value. I am confused because the only thing I changed was the parameter sweeps. Does anyone know what happened? The initial values: 1 W, 90 psi Parameter sweep 1: 3kW, 6kW, 9kW, 12, kW, 15 kW Parameter sweep 2: 50 psi, 60 psi, 70 psi, 80 psi, 90 psi, 100 psi Thanks, Odette

Please login with a confirmed email address before reporting spam

Posted: 6 months ago 2 nov 2023, 12:14 GMT-4
Updated: 6 months ago 3 nov 2023, 11:10 GMT-4

Update: got it to work! Thanks again Igor and Jeff

Update: got it to work! Thanks again Igor and Jeff

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

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.