Raffael_MitrouRaffael_Mitrou Member Posts: 34

Hello there,

I am having severe problems with convergence and my time stepping settings (under "run simulation").

Case description:

I am doing a transient VOF 2-phase simulation (phase1=nitrogen, phase2=liquid). The special thing about my simulation is that I have a filling process (liquid enters through inlet into tank with v=0.1m/s) in the beginning for a few seconds (e.g. 10) and then the liquid enters through an interface into a porous zone where it gets soaked, which takes 2-3 hours. The porous zone and the tank are initially completely filled with nitrogen at p=40mbar.

In the following, you can see my case scheme with its BCs:

For the inlet to close after some seconds (e.g. 10s) I set up an Event to change the BC type from velocity-inlet to wall.

Time Stepping:

At first, I tried to go with fixed time steps, but I think this can't work out since it would take far too much time with such small time steps (e.g. 0.0001s) to ideally represent several hours (2-3h) in reality.

Recently, I set up the adaptive time-stepping method like so:


The simulation took about 12 hours but then suddenly stopped (I don't know why???) and showed this:

"Error: Floating point exception."

For the residuals, I set all the absolute criteria to 1e-06.

Following attached the convergence after some time and when I recently checked it.

Subsequently, I wanted to open Post, but it was empty (not showing my geometry/mesh). What could be the reason?

When I wanted to open Solutions I got this error message (see attached):

Anyone had these issues before?

Attached there is also:

  • a screenshot of the geometry/mesh &
  • the output of the console box.

Maybe someone has an idea why the simulation never converges having a look at the console messages?

I would really appreciate any type of help since this is part of my master thesis and I have still a lot of work to do!

Kind regards,




  • KremellaKremella Admin Posts: 2,326


    Instead of attaching your screenshots, please embed them into your post. Simple copy and paste should work. Ansys employees are unable to download files on this forum.

    Since you are running a Transient VoF case, you don't have to set your absolute convergence criteria to 1e-6. A convergence of 1e-3 or 1e-4 every single time-step should give you a good start. Also, are you able to converge each time-step by running just 20 iterations per time-steps? If this is not the case, you might have to increase the number of iterations per time-step.

    Regarding time-step - try using the implicit formulation. You might be able to march faster in time with larger time-steps. Based on the time-step size of 1e-4, what is your current CFL?

    Regarding the divergence, are you monitoring your solutions using additional plots? If so, do they show an anomalous behavior? It is probably a convergence issue you are facing. Please see my comments on convergence criteria and converging every single time-step.

    I hope these comments help.


  • Raffael_MitrouRaffael_Mitrou Member Posts: 34

    Here are the screenshots:



    adaptive time-stepping settings:


    Error message:

    Console (2 Screenshots):

  • Raffael_MitrouRaffael_Mitrou Member Posts: 34

    @Kremella Hello Karthik and thank you for your quick response and the tips!

    • A very helpful tip! I will first try 1e-04 for the absolute convergence criteria. If it works, I will go with 1e-03.
    • Actually, I set the Max. Iterations/Time Step to be 120 as you can see in the screenshot above. Maybe you overlooked that!?
    • What do you mean by the implicit formulation of the time step? How can I define this? CFL is default and set to 2 (see screenshot above).
    • I use to have one monitor for my contour of phases (that's what I mainly want as a video/animation) and one monitor for the residuals. Since I don't have a continuous flow with an output, I can't monitor mass imbalances, if it is that you are referring to. Are there other parameters I should monitor to check convergence?

    Thanks again! Kind regards!


  • RobRob UKForum Coordinator Posts: 8,371

    If you're forcing liquid into the domain the gas has to go somewhere. Either it compresses or there has to be an outlet: to a point the solver error (poor convergence) will lose some mass, but that may then lead to the divergence you're seeing.

    Re the mesh, have a look at dynamic adaption and VOF predefined criteria in the 2020R2 or 2021R1 versions. That may allow a coarser mesh overall but the solver can then refine the interface.

  • Raffael_MitrouRaffael_Mitrou Member Posts: 34

    PS: Here are my general settings as well as the VOF settings:

    I've already chosen the transient model if that is what you referred to @Kremella ?

  • DrAmineDrAmine GermanyForum Coordinator Posts: 6,642

    Limit the time step size in the adaptive panel so that it does not jump / Better to monitor number of iterations per time step and time step used every time step.

    Moreover Are you sure about your porous zone parameters? Do you think that phase slip is not important here? Which version are you using?

  • Raffael_MitrouRaffael_Mitrou Member Posts: 34

    @Rob I looked both options up and they seem to be quite usefull. @DrAmine Since I use ANSYS 2019R3 I may not be able to use those options, right?

    • VOF predefined criteria (Domain > Adapt > Refine / Coarsen... with VOF activated): Here is what I found (also for other interested users)...

    And my Adaption controls box:

    Instead of the "Predefined Criteria" button, there is only a "Cell Registers" button (see above screenshot) available in my ANSYS version.

    • dynamic adaption:

    Is it possible to use this option with ANSYS 2019 R3?

    I also initialized prior to looking up the settings.


    • "Limit the time step size in the adaptive panel so that it does not jump" --> How can I do that? I set a min. and a max. time step size that seemed reasonable to me. What do you mean by "jump"?
    • "Better to monitor number of iterations per time step and time step used every time step." --> Do I set this monitor like so: Solution > Monitors > Report Files & select report definition: iters-per-timestep?

  • Raffael_MitrouRaffael_Mitrou Member Posts: 34


    • My porous zone parameters (resistance factors) are taken from previous works, so they are kind of "half guess values"? I surely have to adapt them later on...
    • What is the concept of phase slip? I haven't heard of that before.
    • I am using ANSYS 2019 R3.
  • DrAmineDrAmine GermanyForum Coordinator Posts: 6,642

    Please start them with no porous zone.

    You reduce maximum time size to 1 ms for example and use conservative time step change factors. Think about using barotropic gas material.

    Phase slip is slip velocity between phases.

  • Raffael_MitrouRaffael_Mitrou Member Posts: 34


    o How can I start without porous zone? I defined it in the Zone Condition of the corresponding zone and activated "porous model" and "laminar" there.

    o Referring to the time step change factors I found this:

    “Variable time stepping is not ideally suited to second order time formulation because the second order formulation does not take into account the time step size variation. However, by keeping the minimum time step change factor in the range 0.5–0.8 and the maximum time step change factor in the range 1.2–1.5 it can be used without severely affecting the second order time accuracy.”

    --> Therefore I chose min 0.5 and max 1.5. Is that considered conservative?

    o Where can I set the Phase Slip? Any recommendations?

  • DrAmineDrAmine GermanyForum Coordinator Posts: 6,642

    You just deactivate the porous option from Cell Zone Conditions.

    Within the actual version rely on second order time discretization and adaptive time stepping.

    Phase Slip is relative velocity between phases: VOF model does not account for that. Forget about this point for now.

    First thing you need to try is to disable porous function and run with constant time step size to ensure that everything is running smooth. Second step you add porous option (here we need to talk again). Third step is to optimize setup.

    Better to switch to a newer version which adds more stability features for VOF calculation

  • Raffael_MitrouRaffael_Mitrou Member Posts: 34

    @DrAmine I tried a few things out and now my simulation is running and completed. I think that we can skip your advice of deactivating porous media, right?

    I simulated 100 seconds (physical time) and created an animation of the electrolyte volume fraction.

    Following two screenshots of the electrolyte volume fraction at t=50s and t=100s:

    So the thing is that from the point seen at t=50s I would imagine the liquid to be soaked into the porous zone and I want to simulate this wetting process until t=160min. Also it seems that the liquid is disappearing. I will be monitoring the inlet surface at next to see if there is flow in the upper y direction by any chance. Do you have any other ideas about that?

    Another problem: the calculation time is too long for try and error since my deadline is coming closer. Any ideas how I can reduce calculation time?

    o Max. Iterations/time step is already low at 20.

    o Maybe I can increase max. time step size in the adaptive time stepping settings from 10s to maybe 60s or so?

    o Absolute criteria (residuals) also quite high (for all parameters): 1e-02

    o Maybe my mesh is too fine in the right zone (tank) since my focus is rather on the long-term wetting processes in the porous zone (left zone)!?

    o Solution methods: I have set everything to 2nd order except for the transient formulation which was first order. Shall I change it to 2nd as well?

    o For my porous zone ("cell") I have the following settings. The Viscous Resistance and Inertial Resistance factors were taken from another work as first guess values. Any ideas how or to what extent I can change them? Or doing try and error until I find my simulation to be similar to my reference process? --> In this case I again need to reduce my calc. time...

  • RobRob UKForum Coordinator Posts: 8,371

    Check the resistance coefficients, they're quite high. As for changing them, there's a section in the manual outlining the various methods to calculate the values based on what you know about the material.

  • Raffael_MitrouRaffael_Mitrou Member Posts: 34

    @Rob Could too high values for the resistance coefficients cause the electrolyte volume to decrease?

    My expectations: The electrolyte volume should increase until the inlet is closed (at t=2.4s) and should then be constant.

    I monitored the volume-averaged electrolyte volume (see screenshot):

    In the beginning, the electrolyte volume increases which is correct. However, it then seems as if there was a leakage in my simulation as the electrolyte disappears / amount of volume decreases. The following screenshot shows the volume fraction of electrolyte (red color) against the nitrogen (blue color).

    Do you have any ideas why this is happening?


    For the absolute criteria, I set 1e-02.

    Thanks in advance.

    Kind regards!

  • Raffael_MitrouRaffael_Mitrou Member Posts: 34

    @DrAmine @Rob do you have any ideas related to my problems previously explained?

    PS: I changed to fixed time steps.

  • RobRob UKForum Coordinator Posts: 8,371

    Porous coefficient can effect stability but you'd see that in the residuals. What separates the zone that's filling with the neighbouring zone?

  • Raffael_MitrouRaffael_Mitrou Member Posts: 34


    What exactly would I see in the residuals? Do you mean I would see an increasing convergence tendency?

    In the BC settings I defined interface_1 and interface_2 and from there I defined an interface under Mesh Interfaces selecting the two interfaces.

    Is it possible that there is a problem with orphan cells because the mesh is too different at the interface?

    I read about this topic in: Donor Search Fails Due to Orphan Cells

    Here a picture of my meshing near the interface:

    The red arrow pointing to where the interface is.

    My idea is as follows:

    I thought about coarsening the mesh at the right (where it gets filled) and refining it at the left, such that the size difference near the interface get smaller (to avoid orphan cells).

    Is that a valid idea?

    I am getting frustrated because I cannot solve this problem for weeks now...


  • Raffael_MitrouRaffael_Mitrou Member Posts: 34

    PS: My porous media settings:

    I checked my Viscous Resistance (1/K) values as well as my inertial resistance (C2) values and they have already been correct.

    I assumed a particle diameter of 8μm and a porosity of 0.4 yielding the above values.

    What should I specify for the Relative Viscosity?

    For a porosity of 0.4 and I get these values:

    Brinkman: 3.586

    Einstein: 2.5

    Breugem: 0

    Which model is best to choose here? I picked Breugem because its the latest publication.

  • RobRob UKForum Coordinator Posts: 8,371

    Orphan cells are in overset only, hopefully you're not using that. If the region to the left of the interface is the porous zone then you will get some leakage as the medial will restrict flow and not stop it. There's also no need for the interface if you use multibody parts: a conformal mesh is generally better. Nothing wrong with using mesh interface where it's needed, but in this case it's not.

  • Raffael_MitrouRaffael_Mitrou Member Posts: 34

    What is meant by overset? I am not sure if I do use that, to be honest...

    Yes, the region left of the interface is the porous zone. Could you please explain why I don't need the interface here?

    Do you mean to form a new part in DM (like in the following example)?


Sign In or Register to comment.