CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Transient simulations: how to tell its converged (I've read the FAQ & user guides!) (https://www.cfd-online.com/Forums/cfx/114497-transient-simulations-how-tell-its-converged-ive-read-faq-user-guides.html)

JuPa March 12, 2013 04:59

Transient simulations: how to tell its converged (I've read the FAQ & user guides!)
 
3 Attachment(s)
Hello,

I have a transient problem. In my problem a plate is heated from below, which heats up the liquid column above it (please see the picture). The large temperature difference between T1 and T2 causes unsteady, buoyant natural convection.


In steady state I know what parameters to look out for to ensure convergence (correct me if I am wrong):
- You must give enough iterations to allow the residuals must fall acceptably low (for single precision no more than 1e-6). I understand you can get effects such as psuedo-steady state.
- Imbalances must be less than 1%, and ideally less than 0.01%.
- You must set monitor points inside your domain to monitor points of interest such as temperature and velocity. If these level out it suggests a steady state.
- You must do a mesh sensitivity study and tailor your mesh.


I know my problem is transient as:
- I've run the simulation in steady state with a specified physical timestep (the timestep was first estimated, and then reduced or increased depending on residual behaviour).
- Steady state imbalances are not acceptable.
- Monitoring key variables such as temperature and velocity in my domain suggest the problem is transient.
- Logically I expect the physical problem to be transient.


I am homing in to the solution in the following way:
Run 1. Do a steady state pure conduction case first (as in go into expert parameters and switch fluid modelling off).
Run 2. Using the results from Run 1. I initialise and do a steady state buoyant simulation using an upwind advection scheme.
Run 3. Using the the results from Run 2. I initialise and do another steady state simulation using a high resolution advection scheme. The residuals and imbalances do not fall.
Run 4. Using the results from Run 3. I initialise and do a transient simulation using a high resolution advection scheme and a second order transient scheme (backward Euler). The residuals do fall and the imbalances do reduce acceptably low.


A picture of the transient residuals are attached. A picture of some velocity vectors are also attached. Hopefully you can get a feel for the problem.


After reading the FAQ, Ansys User Guides, and searching the forum it is still not clear what criteria must be met to ensure a transient simulation has converged! I know there is something called "Transient Statistics" in CFX, however I don't know how these are used to determine convergence.

Any input will be appreciated!

A few further notes:
- A mesh sensitivity study has NOT been conducted yet - it will be the next step (to compare transient results on Mesh 1 vs Mesh 2 vs Mesh 3 etc).
- I've set the problem to be 2D (extruded one cell thick). In reality the domain is a 3D cylinder (and that will be the next step). I want to understand the problem in 2 dimensions before I move onto 3 dimensions.

Thank you

flotus1 March 12, 2013 05:12

To me, your results look like a turbulent flow simulated with a DNS-solver at insufficient spatial and temporal resolution.
Did you try to simulate your case with a turbulence model activated?

JuPa March 12, 2013 05:16

Thanks for your reply.

I am doing a turbulent simulation using a 2 equation model (K Omega SST) as I type this reply. This is obviously cheaper than doing a DNS simulation. However DNS may be done in the future.

But I would still like to know how to tell if a transient simulation has converged. Do you know what is meant by transient statistics?

flotus1 March 12, 2013 06:05

The transient statistics can be used for data sampling, e.g. time-averaging of variables.

JuPa March 12, 2013 06:08

Hi flotus1,

How valid are time averaged results of a problem which is very transient? Also how do you view time averaged results?

ghorrocks March 12, 2013 06:13

What Rayleigh number is the flow? That is what will tell you whether the flow is turbulent or not.

This flow is almost certainly 3D transient. Your 2D model is of little use other than to check the setup works, it will have little similarity to the 3D case and you cannot infer any 3D results from it.

The answer to your question (how do I tell it is converged?) is a sensitivity study. Do a baseline simulation, then change the parameter of interest (convergence tolerance, imbalance, time step size, mesh size) and see if the change is less than a tolerance you are happy to live with in parameters you care about. You will find these sensitivity studies are a little iterative - the mesh size affects the time step size affects the convergence - so you might need to do a few goes at it as you home in on a set of parameters which give an accurate solution.

flotus1 March 12, 2013 06:23

The data sampling has to be activated before starting the simulation.
I actually dont know how this is done in CFX, but the manual surely does.
From my experience with data sampling in Fluent, I anticipate this feature to be quite buggy, so dont get disappointed too fast.

Quote:

How valid are time averaged results of a problem which is very transient
Since there are several types of unsteadyness, the question cannot be answered in general.
For transient results that are statistically steady (time-constant mean value), time-averaging makes sense.
In your case, since you are using time-averaged equations (RANS) in an unsteady manner, time-averaging as a post-processing step is, lets say disputable.
Someone correct me if I'm wrong, but the concept of using URANS-methods for solving turbulent flow with steady boundary conditions is of questionable validity.

ghorrocks March 12, 2013 06:27

Well, lets determine whether the simulation is laminar or turbulent before you go too far. What is the Rayleigh number? Dos the literature say this Ra number should be laminar or turbulent for this configuration?

JuPa March 12, 2013 06:34

Quote:

Originally Posted by flotus1 (Post 413378)
The data sampling has to be activated before starting the simulation.
I actually dont know how this is done in CFX, but the manual surely does.

If I am not mistaken in CFX output control you just need to select transient statistics, and select which variables you want to monitor.


Quote:

Originally Posted by ghorrocks (Post 413383)
Well, lets determine whether the simulation is laminar or turbulent before you go too far. What is the Rayleigh number? Dos the literature say this Ra number should be laminar or turbulent for this configuration?

Thanks for your reply. Based on a quick "back of the envelope" calculation the Rayleigh number is in the order of 9 E +7 (90000000).

Incropera and Dewitt suggest a laminar regime between 10^4 and 10^7. And a turbulent regime between 10^7 and 10^11.

The reason I'm doing a 2D simulation is purely because I have done some heat transfer calculations estimating the surface temperatures which are based on some empirical correlations (which agree to within 10% of data). I don't expect CFD and my calculations to agree bang on, but I don't expect them to disagree by a huge amount either.

You mentioned a "baseline simulation". I'm sorry it's the first time I've heard this term - what is it?

I appreciate the mesh resolution will have an effect on the Courant number and hence the timestep.

oj.bulmer March 12, 2013 08:47

If I may ask, why choose a 2D case over axisymemtric; given the latter is more relevant to the cylindrical tank? You should be careful here since buoyant convection flows may be unphysically sensitive to turbulence in case of 2D/axisymmetric cases. Some literature search may help here. Though, given Ra no., is it fair to say the solution is partly transitional? Finally, if you have nicely converged mesh independent 2D solution, just later to realize that 3D would yield completely different results, the maneuver has little relevance with your final objective.

Your plots don't indicate anything about the imbalances. Plot of 3 timesteps (including coefficient loop values) should shed some light on convergence of each timestep more clearly, rather than 100 upwards timesteps as you show now. Convergence of every timestep is essential and will bring more credibility to your time-averaged results.

Baseline simulation would be your first simulation that you find reasonable with best judgement. From there, sensetivity analysis will hep you understand effect of mesh size and timestep on your solution. How did you estimate timestep here? The ideal timestep is a reasonable one that achieves the trade off between convergence target and the running time. You may start with convergence target of 1e-4 and conservation target of 0.01 and then estimate the ideal timestep by sensetivity analysis. Howevever, adaptive timestepping is easiest way to do this. But you must be careful with the convergence targets since too tight values will result in too conservative timesteps in adaptive timestepping. But the final convergence targets will depend on the hardware and time available to you for simulation.

Convergence criteria would be decided by whether your solution is steady at the end, periodic or chaotic. I presume the upper wall disposes off the heat from liquid. it is tricky though, since initially the temperture gradients will be huge, and as fluid keeps circulating, the temperatures are less non-uniform. You can monitor the total heat integrated over the volume. When this value flattens, or shows oscillations with small magnitude around a mean value, there is your approximate indication of convergence, and equilibrium of heat going in and out and its effect on convection etc. You then can take time average values of portion of time for which this heat is flat/definitively periodic.

But obviously, more experienced folks may suggest a better way to judge the convergence.

OJ

JuPa March 12, 2013 09:02

Quote:

Originally Posted by oj.bulmer (Post 413436)
If I may ask, why choose a 2D case over axisymemtric; given the latter is more relevant to the cylindrical tank? You should be careful here since buoyant convection flows may be unphysically sensitive to turbulence in case of 2D/axisymmetric cases. Some literature search may help here. Though, given Ra no., is it fair to say the solution is partly transitional?

Hi OJ! The solution is physically non-symmetrical. At this stage I want to see what's going on in the planer dimensions. I.e. 2D axisymmetric will give a worse prediction compared to a regular 2D simulation (assuming one is interested in the physics in the planer direction).

Quote:

Originally Posted by oj.bulmer (Post 413436)
Your plots don't indicate anything about the imbalances. Plot of 3 timesteps (including coefficient loop values) should shed some light on convergence of each timestep more clearly, rather than 100 upwards timesteps as you show now. Convergence of every timestep is essential and will bring more credibility to your time-averaged results.

Sure thing - in many respects CFX should have the "Monitor coefficient loop convergence" set to "on" by default when doing transient simulations.

Quote:

Originally Posted by oj.bulmer (Post 413436)
Baseline simulation would be your first simulation that you find reasonable with best judgement. From there, sensetivity analysis will hep you understand effect of mesh size and timestep on your solution. How did you estimate timestep here? The ideal timestep is a reasonable one that achieves the trade off between convergence target and the running time. You may start with convergence target of 1e-4 and conservation target of 0.01 and then estimate the ideal timestep by sensetivity analysis. Howevever, adaptive timestepping is easiest way to do this. But you must be careful with the convergence targets since too tight values will result in too conservative timesteps in adaptive timestepping. But the final convergence targets will depend on the hardware and time available to you for simulation.

Convergence criteria would be decided by whether your solution is steady at the end, periodic or chaotic. I presume the upper wall disposes off the heat from liquid. it is tricky though, since initially the temperture gradients will be huge, and as fluid keeps circulating, the temperatures are less non-uniform. You can monitor the total heat integrated over the volume. When this value flattens, or shows oscillations with small magnitude around a mean value, there is your approximate indication of convergence, and equilibrium of heat going in and out and its effect on convection etc. You then can take time average values of portion of time for which this heat is flat/definitively periodic.

I'll do a few more simulations based on the advice here, and I'll let you know how I get on.

BasilVarghese March 27, 2020 05:21

Time step
 
Is it possible to give time step size as 500, no. of time steps=20,no.of iterations per time step =50
While doing natural convection in heat sink, where this heat sink is enclosed in a domain

ghorrocks March 27, 2020 17:24

You can set those values to anything you like. But whether it is a good idea (or will converge efficiently) is another matter. The general recommendation is adaptive time steps homing in on 3-5 coeff loops per iteration, with 10 max its per time step and no minimum.

Also, in future, for a new question start a new thread.


All times are GMT -4. The time now is 13:39.