Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Ivar, could you please say something about the solver error?

Please login with a confirmed email address before reporting spam

Hi,
I would like to model friction stir welding process. I used general heat transfer module and incompressible navier stokes module together. I do not have any problem with the heat transfer module, when I solve seperately, the heat transfer model gives reasonable results. But when I add the navier stokes model I get an error. NaN or failed to find.....(I can give later on detailed error message)

I checked all the boundary conditions, all of them are consistent with the real world. I added some pressure boundary conditions to ease the numerical calculations.

I think the problematic thing is the way I define the viscosity. The viscosity is a function of flow stress and strain rate. And again the flow stress is a function of temperature and strain rate. So the viscosity changes with the strain rate and temperature.

I ticked higly nonlinear problem alternative, I ticked complex number alternative, I tried several different solvers. But I could not manage to avoid this error.

I looked up for the error code in the manuals. I realized that this error occurs because of the viscosity equation. This equation has first derivatives of velocity components. In the manuals it says either change the expression or the initial values of the velocity components. I did change the initial values, but I got the same result. I also have to use the viscosity expression. What can you recommend? What can I do to eliminate this error.

Ivar, could you please say something?

I want to continue to have fun comsoling...but it is hard to do it now.:)

Atilla.


6 Replies Last Post 16 ago 2012, 08:36 GMT-4
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 4 lug 2012, 03:40 GMT-4
Hi

I'm not sure i can say much more, you have already proposed the evident items,
You might arrive into a slight dead-lock when you loop the dependencies to far,
I have read somewhere that by defining an intermedate dependent variable, one might improve convergence.

Have you tried to solve with a less dependent looping (replace the outer stress link by a constant ?
And if you mix NS and HT, be sure you have both heat conduction and transport going on (if applicable) elseyu have the conjugated physics, that normally is rpe-cooked (if this applies to your case)

--
Good luck
Ivar
Hi I'm not sure i can say much more, you have already proposed the evident items, You might arrive into a slight dead-lock when you loop the dependencies to far, I have read somewhere that by defining an intermedate dependent variable, one might improve convergence. Have you tried to solve with a less dependent looping (replace the outer stress link by a constant ? And if you mix NS and HT, be sure you have both heat conduction and transport going on (if applicable) elseyu have the conjugated physics, that normally is rpe-cooked (if this applies to your case) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 4 lug 2012, 05:52 GMT-4
Ivar,

Thank you very much for your reply.

Can you give any hints about the "less dependent looping (replace the outer stress link by a constant"?

How can I do this?

Atilla
Ivar, Thank you very much for your reply. Can you give any hints about the "less dependent looping (replace the outer stress link by a constant"? How can I do this? Atilla

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29 lug 2012, 06:48 GMT-4
Hi Ivar,

As you proposed before, I am trying to improve the convergence for this problem.

I want to make a less dependent loop for the variables u,v and w which are the non-newtonian flow velocity components.

As I explained before the user defined viscosity is a function of temperature and velocity components.

I defined for the outer boundaries my_u=intop1(u)/intop1(1), my_v=intop1(u)/intop1(1) and my_w=intop1(u)/intop1(1) using the integration coupling variables.

And I also define the eta_alu which is the viscosity changing with the temperature and velocity components in the subdomain expressions.

To have a less dependent loop, I have to exclude the velocity components for the boundaries and define my_u, my_v and my_w instead of dependent variables u,v and w. But how can I do this practically, there must be a simple way to do this.

Thanks

Atilla

Hi Ivar, As you proposed before, I am trying to improve the convergence for this problem. I want to make a less dependent loop for the variables u,v and w which are the non-newtonian flow velocity components. As I explained before the user defined viscosity is a function of temperature and velocity components. I defined for the outer boundaries my_u=intop1(u)/intop1(1), my_v=intop1(u)/intop1(1) and my_w=intop1(u)/intop1(1) using the integration coupling variables. And I also define the eta_alu which is the viscosity changing with the temperature and velocity components in the subdomain expressions. To have a less dependent loop, I have to exclude the velocity components for the boundaries and define my_u, my_v and my_w instead of dependent variables u,v and w. But how can I do this practically, there must be a simple way to do this. Thanks Atilla

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29 lug 2012, 11:08 GMT-4
Hi

It's not obvious to give ideas without the model, but anyhow I'm far from my COMSOL WS these days.

One thing in V4 your my_u = intop1(u)/intop1(1) is the same as an my_u=aveop1(u), but nothing wrong in your way, it was the "old" 3.5 way anyhow.

What you might do is to use a segregated solver and adapt the variables solved for, and their respective order, solve forst for u,v,w, either then use my_u, my_v ... for your looping, or the u,v,w then solve for T and whatever and loop around. But again it's not necesarily the best way, depending on your mode,l a fully couple could work better. There is no predefined rule here, on must try it out.

--
Good luck
Ivar
Hi It's not obvious to give ideas without the model, but anyhow I'm far from my COMSOL WS these days. One thing in V4 your my_u = intop1(u)/intop1(1) is the same as an my_u=aveop1(u), but nothing wrong in your way, it was the "old" 3.5 way anyhow. What you might do is to use a segregated solver and adapt the variables solved for, and their respective order, solve forst for u,v,w, either then use my_u, my_v ... for your looping, or the u,v,w then solve for T and whatever and loop around. But again it's not necesarily the best way, depending on your mode,l a fully couple could work better. There is no predefined rule here, on must try it out. -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29 lug 2012, 15:14 GMT-4
Thank you Ivar,

I will try the segregated solver.

Atilla
Thank you Ivar, I will try the segregated solver. Atilla

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 16 ago 2012, 08:36 GMT-4
Ivar,

I found another solution to that divergence problem. I could improve the convergence by a convergenge parameter in the following way:

I defined the viscosity eta_convergence=eta(shear rate, temperature)^(1/eta_convergence)

This viscosity value is ramped up using the convergence parameter eta_convergence going from 10 to 1.

For more detail one can have a look at

www.comsol.com/papers/8746/

Atilla
Ivar, I found another solution to that divergence problem. I could improve the convergence by a convergenge parameter in the following way: I defined the viscosity eta_convergence=eta(shear rate, temperature)^(1/eta_convergence) This viscosity value is ramped up using the convergence parameter eta_convergence going from 10 to 1. For more detail one can have a look at http://www.comsol.com/papers/8746/ Atilla

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.