Divergence during solidification

  • Last Post 10 July 2019
zhengxuanwu posted this 03 July 2019

Dear Ansys Community,

Hi everyone, i am quite new with fluent and I am simulating a solidification process now, during which a phase change material(liquid phase at the beginning) is cooled down and solidificate. I used the solidification and melting model and the density and the conductivity of  phase change material were defined by UDF(changes with different temperature). The geometry and meshing can be seen in the pics. In which i used triangular mesh and set the size of the mesh to 4 mm.The whole model is about 1 meter long and 15cm wide.

The walls around the geomety were set to a certain temperature as boundary condition. And i chose the step size of 0.1s and started the simulation. At first it seemed to be right but after about 400 steps. The error occuers like shown in the pic(Error: floating point exception).

I tried that with adaptive step size it would not lead to divergence but the step size is then always far too small than i need.

Can anyone help me or give me some suggestions ?


Best Regards,



Order By: Standard | Newest | Votes
rwoolhou posted this 03 July 2019

If the time step is too big the solver will struggle: assuming the model converges at each time step have a look at the flow field. If the fluid velocity is high enough that the flow crosses one cell in one time step then the time step is too high. 

zhengxuanwu posted this 10 July 2019

Thanks for the reply. Reducing the time step do help the divergence. However, i also found out that the UDF properties has an influence on the divengence. Cuz when i turned the density to constant, it seems to be easier to get convergence.

Then i am confused, since my UDF is quite simple(density is linear dependent on the Temperature.) But the residuals shows that all the velocity start to oscillate and then appears the reversed flow. what could be the reason behind?

 Best Regards


abenhadj posted this 10 July 2019

Why using UDF if your density is only temperature dependent? 

Perhaps the density is not physical at all: can you check that first?

Best regards, Amine

zhengxuanwu posted this 10 July 2019

i ve also tried with polynomial to define the density and checked it after i initialize with several different temperature.

And the density after initialization makes physical sence since it fits with my experimental data(paraffin wax with density around 750kg*m-3).

can the solver be the reason. i use SIMPLE method currently.


rwoolhou posted this 10 July 2019

Also remember if you're changing the density with temperature in a closed domain where does the extra material come/go as the volume changes?