CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

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

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 1 Post By JuPa
  • 1 Post By ghorrocks
  • 1 Post By ghorrocks

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 12, 2013, 04:59
Question Transient simulations: how to tell its converged (I've read the FAQ & user guides!)
  #1
Senior Member
 
JuPa's Avatar
 
Mr CFD
Join Date: Jun 2012
Location: Britain
Posts: 361
Rep Power: 11
JuPa is on a distinguished road
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
Attached Images
File Type: jpg Geometry.jpg (11.5 KB, 246 views)
File Type: jpg Residuals.jpg (56.4 KB, 412 views)
File Type: jpg Velocity vectors.jpg (26.8 KB, 298 views)
aero_head likes this.
JuPa is offline   Reply With Quote

Old   March 12, 2013, 05:12
Default
  #2
Senior Member
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 2,708
Rep Power: 38
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
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?
flotus1 is offline   Reply With Quote

Old   March 12, 2013, 05:16
Default
  #3
Senior Member
 
JuPa's Avatar
 
Mr CFD
Join Date: Jun 2012
Location: Britain
Posts: 361
Rep Power: 11
JuPa is on a distinguished road
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?
JuPa is offline   Reply With Quote

Old   March 12, 2013, 06:05
Default
  #4
Senior Member
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 2,708
Rep Power: 38
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
The transient statistics can be used for data sampling, e.g. time-averaging of variables.
flotus1 is offline   Reply With Quote

Old   March 12, 2013, 06:08
Default
  #5
Senior Member
 
JuPa's Avatar
 
Mr CFD
Join Date: Jun 2012
Location: Britain
Posts: 361
Rep Power: 11
JuPa is on a distinguished road
Hi flotus1,

How valid are time averaged results of a problem which is very transient? Also how do you view time averaged results?
JuPa is offline   Reply With Quote

Old   March 12, 2013, 06:13
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 16,642
Rep Power: 130
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
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.
aero_head likes this.
ghorrocks is offline   Reply With Quote

Old   March 12, 2013, 06:23
Default
  #7
Senior Member
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 2,708
Rep Power: 38
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
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.
flotus1 is offline   Reply With Quote

Old   March 12, 2013, 06:27
Default
  #8
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 16,642
Rep Power: 130
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
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?
ghorrocks is offline   Reply With Quote

Old   March 12, 2013, 06:34
Default
  #9
Senior Member
 
JuPa's Avatar
 
Mr CFD
Join Date: Jun 2012
Location: Britain
Posts: 361
Rep Power: 11
JuPa is on a distinguished road
Quote:
Originally Posted by flotus1 View Post
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 View Post
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.
JuPa is offline   Reply With Quote

Old   March 12, 2013, 08:47
Default
  #10
Senior Member
 
OJ
Join Date: Apr 2012
Location: United Kindom
Posts: 473
Rep Power: 17
oj.bulmer will become famous soon enough
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

Last edited by oj.bulmer; March 12, 2013 at 08:51. Reason: 2D
oj.bulmer is offline   Reply With Quote

Old   March 12, 2013, 09:02
Default
  #11
Senior Member
 
JuPa's Avatar
 
Mr CFD
Join Date: Jun 2012
Location: Britain
Posts: 361
Rep Power: 11
JuPa is on a distinguished road
Quote:
Originally Posted by oj.bulmer View Post
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 View Post
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 View Post
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.
JuPa is offline   Reply With Quote

Old   March 27, 2020, 05:21
Default Time step
  #12
New Member
 
Basil Varghese
Join Date: Feb 2020
Posts: 3
Rep Power: 3
BasilVarghese is on a distinguished road
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
BasilVarghese is offline   Reply With Quote

Old   March 27, 2020, 17:24
Default
  #13
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 16,642
Rep Power: 130
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
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.
BasilVarghese likes this.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Reply

Tags
buoyant, cfx, convection, heat, transient

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in running ICEM grid in Openfoam Tarak OpenFOAM 6 September 9, 2011 17:51
Read Result Files or User Defined Result Aquilaris ANSYS 0 February 9, 2011 05:25
read a table from bcdefi user file valsi STAR-CD 0 June 16, 2010 05:34
Phase locked average in run time panara OpenFOAM 2 February 20, 2008 14:37
Ist it only me that cant read the user guide pdf olle53 OpenFOAM 5 April 5, 2006 22:14


All times are GMT -4. The time now is 07:20.