Page 1 of 1

coupled heat and cfd

Posted: 11 Oct 2016, 18:34
by mark smith
Hi All,
I'm doing a coupled CFD+thermal simulation and I'm having some problems with convergence for which there really shouldn't be any problems?

My fluids properties are not temperature dependent (big assumption) so irrespective of the temperature distribution in the fluid the density and viscosity do not change.
I solve navier stokes with nonlinear system max iterations of 100 and linear system max iterations of 1000, the solver converges then the temperature solver does its stuff, on subsequent coupled iterations the navier-stokes solver takes a similar number of iterations to solve as it did originally even though the flow field is not modified by the temperature distribution, I feel I must be missing something important as I would have presumed that the problem would be fully solved very quickly after the first converged navier-stokes iteration?

If I set non-linear system max iterations to 1 in both solvers then it just keeps doing coupled system iterations and only very slowly converges.
Thanks in advance
Regards
Mark

Re: coupled heat and cfd

Posted: 13 Oct 2016, 07:25
by annier
Hi Mark,
-Just to note that "Do you have any things such as relationship between length and time scales?"
-Try changing linear and non-linear solver settings as guided in the Elmer Solver Manual.

Yours Sincerely,
Anil Kunwar

Re: coupled heat and cfd

Posted: 14 Oct 2016, 15:05
by RaJa
Hi Mark,

I made some cfd + heat simulations only a few days ago and had similar problems. After some testing I have solved the problem by setting a few solver specific options for both solvers (heat + navier-stokes):

Code: Select all

  Nonlinear System Newton After Iterations = 100
  Nonlinear System Newton After Tolerance = 1.0e-5
  Nonlinear System Relaxation Factor = 0.7
  Linear System Solver = Iterative
  Linear System Iterative Method = BiCGStabl
  Linear System Max Iterations = 500
  Linear System Convergence Tolerance = 1.0e-10
  Linear System Preconditioning = ILU2
  Linear System ILUT Tolerance = 1.0e-3
  Linear System Abort Not Converged = True
  Linear System Residual Output = 20
That way, both solvers converged nicely and the solution was consitent with COMSOL.

Regards,
Rainer

Re: coupled heat and cfd

Posted: 17 Oct 2016, 12:26
by mark smith
Hi Rainer,
Thanks for the suggestions, I'll give them a go when I'm in front of my workstation tomorrow and report back.
Regards
Mark

Re: coupled heat and cfd

Posted: 18 Oct 2016, 11:31
by RaJa
Your welcome, just keep in mind that mesh size and your general time and length scales play an important role. It also makes a big difference if you are looking at steady-state or time-dependent solutions.

Re: coupled heat and cfd

Posted: 18 Oct 2016, 15:59
by mark smith
My Problem is one I have solved in Comsol using MUMPS, I have exported the mesh from Comsol so I am doing the identical problem, Comsol solves without problem but I'm having problems in Elmer tuning the solver settings ;-( It would be good if the solver manual gave some better hints on how to adjust the settings under certain circumstances which lead to non-convergence, My guess is that commercial software automatically adjusts the setting during the solve to aid convergence if possible?
Does someone have a Navier-Stokes solver setting using MUMPS that they could share so I can check if I'm using it correctly?
Regards
Mark

Re: coupled heat and cfd

Posted: 19 Oct 2016, 08:49
by RaJa
Hi,

I have never used the MUMPS in comsol as it is a direct solver. I usually solve my stuff with iterative solvers and prefer the BiCGStab in combination with ILUT preconditioning. I started with ELMER and have only recent access to Comsol. So I use the settings that proved to work in Elmer. Iterative solvers are often faster than direct approaches. However, the require a careful setup as they are not as robust.

Does Elmer solve the problem, but slower? Or does it not converge at all?

My impression is that Comsol comes with some nice default solver settings for certain kind of problems. However, sometimes you do not know what Comsol is using as in many cases the default settings work well. As I do not know the direct solver capabilities of ELMER, I would try the following:
  • Run your problem in COMSOL using MUMPS
    Run your Problem in COMSOL using an iterative approach
    Run your problem in ELMER using an iterative approach
In every case, your results should be the same. Afterwards increase your mesh density and check your results again. If you have a stable solution then mesh density should not influence it (which is always a nice sanity check).

Regards,
Rainer

Re: coupled heat and cfd

Posted: 21 Oct 2016, 17:22
by serge_13
Dear Mark,
Can you show me your *.sif - file ?

Wbr,
Serge.

Re: coupled heat and cfd

Posted: 21 Oct 2016, 18:41
by mark smith
Hi Serge,
Attached is my sif file.
My thinking for the coupling is as follows: The fluid has constant properties so the N-S solver can iterate till it converges, then the heat solver can calculate the temperature field to convergence, the next coupled iteration should converge straight away as the flow field is totally independent of the temperature and as the flow shouldn't change the temperature distribution should also be converged, but unfortunately this doesn't happen & lots of coupled iterations take place which I can't understand ;-(
I ramp up the inlet velocity in a scanning simulation to try and get it to solve ( I don't have to do this in Comsol which seems to adapt the solver parameters so it can find a solution with the inlet velocity as per my last time step) but in Elmer it only solves to the 2nd time step than bombs out.

In Comsol I use MUMPS in Elmer I have tried both MUMPS and the iterative solver in the N-S section of the sif with the same results.

My hopes are that I can't see a silly error as I've been looking at it for so long that I'm going senile ;-)

Thanks in advance.
Best regards
Mark

Re: coupled heat and cfd

Posted: 25 Oct 2016, 11:36
by serge_13
Dear Mark !

Try to change *.sif and to resolve the simplified tasks:

1-st variant. Try to decrease N-S iterations to transformate the situation to resolve hydrodynamical task and heat transfer task in parallel steps. It may be that your hydrodynamical part degrades earlier before heat transfer. So you may check the degradation of the flow solution on first steps.

2-d variant. Try to transform your calculation as transient (not steady as now !!!), because you may have the divergent solution because of the grid is raw. Then the task may be naturelly transient.

3-d variant. Try to transform the task with null heat transfer. In this case you may adjust the temperatures. The whole solution must be convergent.

See You later,
Serge.