Fluids

Fluids

How to know the calculation has converged ?

    • Walaa
      Subscriber

       I am simulation an open channel junction is transit state; I chooses the following ;

      time step size = .01

      number of time steps = 100

      Max iteration/ time step = 100

      I just choose theses numbers, i don't know if that right. How I know the residuals have converged ?

      and should i choose "at the end of iteration or at the end of time step"

      I don't know if the calculation goes well ?!!

    • Satyajeet Padhi
      Ansys Employee

      For a transient simulation, the number of iterations per time steps indicate how many times the flow equations will be solved per time step before moving on to the next time step. Generally this number is 20. You may increase or decrease this number depending on your application. In the residuals plot, you will notice a saw-tooth pattern, which indicates the iterations per time step. The residual curve will start from a high at 1st iteration, keep dropping if everything is fine until 20th iteration. This completes the first time step and then the residual will rise again and drop for the next 20 iterations and so on. 

      Along with the residuals, I recommend having some monitor points in the domain where you can monitor the flow. For example, you can create a monitor point along the axis of the channel sufficiently far away from the entrance and monitor axial velocity there. For transient flows, you would obtain either of the following two:

      1. Steady State Solution: The flow variables such as velocity flatten out (not change) after some time.

      2. Periodic solution: The flow variables fluctuate with a repeating pattern.

      It is recommended to begin with or initialize your flow field with a steady state solution, if possible. This way you are providing the best possible initial conditions for the model. If not, then the initial few time steps may not converge completely. You can then use a smaller time step in this case for the first few iterations. The time step size should be small enough to resolve time-dependent features. It should not be too large, else the transient changes will not be captured. However, using a very small time step will slow down the simulation significantly. The Courant number is used to estimate a time step. It is the product of characteristic flow velocity and time step divided by the cell size. This gives the number of mesh elements the fluid passes through in one time step. You can use values in the range of 1-10, but in some cases higher values are acceptable. You can experiment with some numbers to appreciate the significance of setting the right Courant number and time step size. 

       

      But most importantly, the accuracy of any CFD simulation will depend on the boundary conditions and the initial conditions. If these two inputs are physically correct along with a nice mesh, you would obtain a nice converged solution. 

       

       

       

       

       

    • Raef.Kobeissi
      Subscriber

      Convergence is not always a simple thing to confirm. Obviously residual errors could give a hint but not always. In some steady-state simulation, you need to check the change in forces with every iteration. This is one example. Another example is when your simulation never reaches the desired residual error and here you should ask whether your simulation might be transient in nature?. In Fluent the main indicators are the residual errors for the turbulence equations, the momentum and continuity equations.

      Regards

    • seeta gunti
      Ansys Employee

      For open channel, time step size of 0.1 is bit coarse. May I know how can you calculate the time step size? You need to calculate the time step based on your cell velocity and minimum cell size. As Satyap mentioned, you need to run the steady case and initialize the data as initial guess to transient case. I would recommend to reduce the time step size and continue the run. Your residuals may come down.

      Apart from the residuals, you can add few monitors at the interested regions which will help us to know more about the health of the case whether it is running in right direction or not. 

       

    • SaurabhD
      Subscriber

      Hello Raef, 

      Thank you for adding to the convergence criteria. Could you please explain how would to you see the change in forces in steady state simulation? 

      Is there any literature available on the Ansys Learning hub regarding Convergence?

       

      Thank You!

    • DrAmine
      Ansys Employee
      Monitoring forces or coefficient if they Converge and do not Change considerably any more.
    • Amoghavsomayaji
      Subscriber
      The simulation stops after performing few iterations.It says floating point error.I am using a UDF. I tried to print the values of velocity and other things. I realised that velocity is becoming 0 (even though my initial,boundry conditions are not like that).I tried the methods for solution,stabilization suggested by many.It didnt work. How do I know what is wrong?nn
    • Karthik R
      Administrator
      Hello There could be many issues going on there.
      Please check the mesh quality.
      What are you attempting to solve? What are your boundary conditions?
      How did you set-up the model?
      Also, please create a new post for each different question. This will give it best visibility.
      Thanks.
      Karthik
    • Amoghavsomayaji
      Subscriber
      I will follow that from next time.
      I am trying to model a trickle bed reactor.I am using 2D rectangle geometry.So mesh quality is good.I am considering 2 vapour phases, 1 liquid entering the trcikle bed(1solid).For boundry condition I have given velocity at inlet and pressure outlet. For source term I am calculating fetting fraction,capillary pressure in my UDF.I am using UDF for finding porosity too. I am using Eulerian model
Viewing 8 reply threads
  • You must be logged in to reply to this topic.