CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CFX (
-   -   questions about sensitivity analysis and adaptive timestep (

sjtusyc June 19, 2012 09:50

questions about sensitivity analysis and adaptive timestep
I am new in CFDonline,but i learned a lot , so thank you ,especially to you.
I read several threads where you emphasize do sensitivity analysis before run the entire simulation. timestep ,convergence criteria and mesh sensitivity analysis.

I am confused.

You said in one thread"A typical approach is to just run the first little bit of the simulation, rather than the whole thing. Just run it until something interesting happens."

I don't get it. How can i judge i get a proper timestep or convergence criteria when you just do a bit of the simulation?

You said using adaptive timestep is a good way to get proper timestep,but how? as there are many blanks in the setting?

Thank you .

Danial Q June 19, 2012 17:46

As far as, "something interesting happens" is concerned, i am sure, he meant " something weired" which you know by checking initial steps' convergence HISTORY (Rate, Linear solution ) as rate should be less than 1 for convergence and Linear solution values should be atleast "ok" or "OK" at best. And couple of few other convergence criterias , you can find in documents.
Fot adaptive time stepping, I guess, you know your total time, set some initial time step (which you can at first get by sensitivity analysis or random value but reasonable), min/max timestep supposedly 1e-20 and 1e20.But max.timestep should be less than total time (in my opinion as i got error when chose 1e20). Coefficient loops should be 3-5 or 5-10 (complex multiphase) and let the rest be defaults.
I hope it would be helpful as I am also doing the same thing at the moment.Glen, please correct me if I am mistaken.


ghorrocks June 19, 2012 20:07

Danial's comments are correct.

"something interesting happens" means that the run has gone for long enough for the important physics to start up. Often the very first bit of a simulation is boring and little happens - you cannot use this for a sensitivity analysis. You need it it get far enough to be representative of the important part of the simulation.

sjtusyc June 19, 2012 21:57

Thank you,your reply is helpful.
I still wondering whether the adaptive timestep is used to get a proper timstep or after your get a proper timestep?

ghorrocks June 19, 2012 22:07

It can be either. You can use adaptive time stepping to find a time step size quickly, or you can use it so you define the convergence criteria and it finds the time step size automatically. This means you do not need to do a sensitivity study on time step size.

The assumption behind this is that if you are converging well and quickly that the tiem step is therefore correct. I have not yet found an exception to this, so am happy to say it is a general rule.

sjtusyc June 20, 2012 08:02

Gelnn and Danail ,thank you for your reply,it helps.
I still wondering of the sensitivity analysis process.
If a just started a simulation and i created coarse mesh.Now i have to do the simulation analysis ,right?(suppose the other settings are correct)
First, i define the convergence criteria,ex,1E-04,and then i get the proper timestep through the use of adaptive timestep.
After all of the above is done, i get the simulation started.Instead of running the whole simulation, i stop the run at some time point,and postprocessing the results,if the important physics start up then i conclude the sensitivity analysis has been past,if not,
i set smaller convergence criteria....
if that do not work ,i turn to refine the mesh and then do the rest of the work.
My understanding is right? If not ,just correct it,I will appreciate it.

sjtusyc June 20, 2012 08:03

Can you tell me how dou you do your simulation analysis .
Thank you.

ghorrocks June 20, 2012 18:44

Getting all these parameters right for a simulation is an iterative process.

Start off with your guess of a suitable mesh. Assuming you are using adaptive time stepping (so the time step size is coupled to the convergence criteria and therefore reduces the variables by one), then do a series of runs with convergence criteria 1e-3, 1e-4, 1e-5 and 1e-6 or further if you have to. This will tell you what convergence criteria you need on this grid.

Then make a series of mesh densities. Run them using the convergence criteria you found before. This will give you the mesh density you need for the accuracy you require.

For completeness it is useful to then repeat the convergence criterion check, as you are now using a new mesh. It does not often move much but if you are being thorough you should check it. Providing it has not moved then you can say you have converged on a mesh AND a convergence critereon which will provide you the accuracy you require.

sjtusyc June 21, 2012 04:29

Gelen,thank you for your elaborate reply.
I think it has a high demand on the initial mesh.
Can you give me an example that how you judge just after a few runs when you set the convergence criteria.Would a monitor be a good idea?Just observe the monitor in few runs when different convergence criteria is set.
When i do steady simulation, is there a convenient way to get a suitable timescale instead of using the automatic timescale.The adaptive timestep really helps.
Thank you.

ghorrocks June 21, 2012 06:18

You have to decide what are the important parameters for your simulation - generally these are the output variables you are doing the simulation for in the first place (drag, lift, pressure drop, flow rate, whatever).

Automatic is fine as a starting point for steady runs, but often you make it faster or slower after that depending on how the convergence is going.

sjtusyc June 21, 2012 09:24

Thanks so much!

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