CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CCM+

How to select Time step

Register Blogs Community New Posts Updated Threads Search

Like Tree12Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 22, 2011, 04:50
Question How to select Time step
  #1
Senior Member
 
siara817's Avatar
 
siamak rahimi ardkapan
Join Date: Jul 2010
Location: Copenhagen, Denmark
Posts: 220
Rep Power: 18
siara817 is on a distinguished road
Hi dear All,
I simulation a ventilated room in unsteady model.
I do not know what is the proper time step for my simulation.
Thanks for your attention.
siara817 is offline   Reply With Quote

Old   September 22, 2011, 18:29
Default
  #2
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 636
Rep Power: 22
abdul099 is on a distinguished road
Depends on your desired accuracy. The smaller the timestep, the better for accuracy and stability, but the worse in terms of computational cost.

In most cases, the timestep will be set to allow the residuals to drop by two or three orders of magnitude in every timestep.
Additionally you can monitor the courant number. Although implicit schemes does not explicitly require the courant number to be below 1, best experience is made when the courant number is not higher than 1 (or at least not too much bigger than 1, assumed computational cost is not an issue).

But to be honest, in most cases it will not be possible to keep an ideal timestep. Smaller cells (to reduce errors of discretization in space) means more cells and a smaller ideal timestep. The computational cost will rise too much, therefore the timestep has to be limited as long as you don't have an excessive amount of time to wait for results.
abdul099 is offline   Reply With Quote

Old   September 28, 2011, 07:30
Default
  #3
Member
 
Eike
Join Date: Sep 2011
Posts: 40
Rep Power: 15
Eike is on a distinguished road
So if I have a rotor with 9 blades rotating at 1450 rpm, what is a good time step?

Btw, my model contains something about 7,000,000 volume cells. I can use a cluster and am allowed for up to 192 cores. How much cores should I use?


Best wishes
Eike
Eike is offline   Reply With Quote

Old   September 28, 2011, 08:11
Default
  #4
New Member
 
junlian
Join Date: Apr 2009
Posts: 4
Rep Power: 17
yinjunlian is on a distinguished road
it also depends on what you focus on
yinjunlian is offline   Reply With Quote

Old   September 28, 2011, 08:35
Default
  #5
Member
 
Eike
Join Date: Sep 2011
Posts: 40
Rep Power: 15
Eike is on a distinguished road
There is an inlet, the ventilator and an attatched diffusor ... I need to know the flow of air at 20°C for optimization of blades and diffusor ...

Does look like this, but with a square diffusor and the short section as the inlet:

Eike is offline   Reply With Quote

Old   September 28, 2011, 20:30
Default
  #6
New Member
 
Brenton King
Join Date: Sep 2011
Posts: 5
Rep Power: 15
BKaus is on a distinguished road
Quote:
Originally Posted by Eike View Post
So if I have a rotor with 9 blades rotating at 1450 rpm, what is a good time step?

Btw, my model contains something about 7,000,000 volume cells. I can use a cluster and am allowed for up to 192 cores. How much cores should I use?


Best wishes
Eike
A good rule of thumb is about 100,000 cells per core. More than that and your bottleneck may become communication between cores and not computation of cells.
DaveyBaby and Kummi like this.
BKaus is offline   Reply With Quote

Old   September 29, 2011, 06:48
Default
  #7
Member
 
Eike
Join Date: Sep 2011
Posts: 40
Rep Power: 15
Eike is on a distinguished road
At this time, I use 72 cores for 7,700,000 cells and it works fine steady and unsteady. If I use rigid body motion, does it make sence to use more cores, or is the 100,000-rule independed from steady/unsteady?

Btw, my compute-nodes are 12 core, so the next step would be 84 cores.
Eike is offline   Reply With Quote

Old   October 1, 2011, 18:50
Default
  #8
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 636
Rep Power: 22
abdul099 is on a distinguished road
Using too much cores will decrease efficiency, no matter if it's a steady or unsteady simulation.
What you could do to speed up your simulation is to use less cores per node, because all cores on a node share the memory bandwidth.

You can try to start with a bigger time step, e.g. 0.01s and run for some revolutions. Then reduce the time step for let say one order of magnitude and run for some revolutions...
abdul099 is offline   Reply With Quote

Old   October 4, 2011, 03:34
Default
  #9
Member
 
Eike
Join Date: Sep 2011
Posts: 40
Rep Power: 15
Eike is on a distinguished road
Quote:
Originally Posted by abdul099 View Post
What you could do to speed up your simulation is to use less cores per node, because all cores on a node share the memory bandwidth.
That is interesting! Can you tell me how to do this on a Windows system? Unfortunately we are not allowed to use Linux ... at this time, I send the jobs through the windows command promt and I did not find any command to specify for example 6 cores per node using 12 nodes.
Eike is offline   Reply With Quote

Old   October 5, 2011, 20:25
Default
  #10
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 636
Rep Power: 22
abdul099 is on a distinguished road
When it's a usual cluster using a batch system, you have to do it by the batch system. I can't help you with any commands, as there are several batch systems available.

When you don't use a batch system, I think you should have a command line like
"starccm+ -batch -on host1:x,host2:x,host3:x -master host1 #pathtomacro.java #pathtosimfile.sim"
where x is the number of cores to be used on the specified host. Just pick a number you like which is less or equal the number of cores.

But be aware, using only one core per node may also have a negative impact on the solution time as more communication will be carried out via network / infiniband / whateverconnectionyouareusing instead of QPI / HT.
abdul099 is offline   Reply With Quote

Old   October 6, 2011, 10:53
Default
  #11
Senior Member
 
siara817's Avatar
 
siamak rahimi ardkapan
Join Date: Jul 2010
Location: Copenhagen, Denmark
Posts: 220
Rep Power: 18
siara817 is on a distinguished road
Thanks Abdul for your kind help
My question is that, when I use implicit unsteady, why do I need to have small time step.
My model has 300,000 cells, what is rough time step needed?
Thanks
siara817 is offline   Reply With Quote

Old   October 6, 2011, 19:42
Default
  #12
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 636
Rep Power: 22
abdul099 is on a distinguished road
The time step does not depend on the number of cells but on the time frame of your physical phenomena. Read my second post, it's all written there.
I never mentioned, you need a small time step when you choose implicit unsteady. I just wrote, the smaller the time step, the better in terms of accuracy and stability. And there's no definition for a "small" time step. Most people wouldn't say, a year is a small time step. But it is when you try to simulate the thermal behaviour of our earth.

And just think a little bit about your question. I don't know anything about your simulation. It's a ventilated room, that's fine. But is there a fan, is it ventilated by natural convection, is it a room in a doll's house or an aircraft shelter..... It's impossible to give you any advice on the time step without any further information!
Vinay Nandurdikar likes this.
abdul099 is offline   Reply With Quote

Old   October 7, 2011, 04:03
Default
  #13
Senior Member
 
siara817's Avatar
 
siamak rahimi ardkapan
Join Date: Jul 2010
Location: Copenhagen, Denmark
Posts: 220
Rep Power: 18
siara817 is on a distinguished road
Hi Abdul,
Thanks for the information.
My simulation in about a small room in our laboratory, with two inlets and one outlet. there is no natural ventilation. the room is ventilated by mechanical ventilation with know air velocity (1 m/s). there is no fan in the room. Just I want to see how is the behavior of particle in this specific room.
siara817 is offline   Reply With Quote

Old   October 11, 2011, 18:06
Default
  #14
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 636
Rep Power: 22
abdul099 is on a distinguished road
But the cell size is still unknown, therefore it's still impossible to suggest the timestep.
Why don't you try a time step of let's say 0.1 seconds (assuming you don't model the fan itself) and plot the convective courant number? The courant number should be below 1 for best results, although small numbers above 1 doesn't harm. So check this and when the courant number is too high or residuals doesn't drop in every timestep, you should reduce the timestep.
abdul099 is offline   Reply With Quote

Old   October 18, 2011, 09:06
Default
  #15
Senior Member
 
siara817's Avatar
 
siamak rahimi ardkapan
Join Date: Jul 2010
Location: Copenhagen, Denmark
Posts: 220
Rep Power: 18
siara817 is on a distinguished road
Hi Abdul,

Thanks for your kind help.

I looked at the courant number close to the inlet of the model. then I changed the time step and with the time step of 0.1 s, the courant number distribution was as the attached figure. What do you think, is the time step accepted?

Best regards

Siamak
Attached Images
File Type: jpg longer time step cleaner modified 1,2_Histogram Plot 1.jpg (23.4 KB, 243 views)
siara817 is offline   Reply With Quote

Old   October 20, 2011, 09:38
Default
  #16
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 636
Rep Power: 22
abdul099 is on a distinguished road
You should look for the courant number in your whole domain, not just at the inlet. When you get courant numbers like this in your whole domain, there's nothing to worry about. But you need to know about the whole domain, as the courant number changes with the cell size, the velocity in a cell and the time step.
Just make a threshold and look if there are big areas where the courant number is significantly above 1. And check how much it is above 1. Make some plane sections and plot the courant number in the main area of interest. Then you will see immediately if it's okay or not.

Cheers
siara817 likes this.
abdul099 is offline   Reply With Quote

Old   April 8, 2015, 15:03
Default
  #17
Member
 
Join Date: Nov 2014
Posts: 88
Rep Power: 12
hwsv07 is on a distinguished road
Quote:
Originally Posted by abdul099 View Post
You should look for the courant number in your whole domain, not just at the inlet. When you get courant numbers like this in your whole domain, there's nothing to worry about. But you need to know about the whole domain, as the courant number changes with the cell size, the velocity in a cell and the time step.
Just make a threshold and look if there are big areas where the courant number is significantly above 1. And check how much it is above 1. Make some plane sections and plot the courant number in the main area of interest. Then you will see immediately if it's okay or not.

Cheers
i have some questions on the same issue.

It is mentioned here that the Courant Number, C, should ideally be less than 1 to fulfill the CFL stability criterion. Fulfilling this crtierion would be based on the choice of my timestep.

Im doing LES on an unsteady case and i want to capture the wake velocity, vortex shedding etc.

In my Solver settings, I have Implicit Unsteady and Coupled Implicit. Im rather confused why I can set both timestep and the courant number. shouldnt it be I can only set timestep and I have to monitor courant number?
hwsv07 is offline   Reply With Quote

Old   April 9, 2015, 12:26
Default Courant number
  #18
Member
 
DaveyBaby
Join Date: May 2013
Posts: 46
Rep Power: 13
DaveyBaby is on a distinguished road
Never refuse to accept the possibility that you just might not have the resources to run the simulations you would like to. If you can't you need to rethink.

If you have Courant numbers (C) higher than 1, the only way you can be confident that it's not a problem is by running another sim with a smaller timestep and checking that the change in results is small (a bit like a grid refinement study). And for this to be relevant, you need to have 'few' instances of C 'much higher' than 1 anyway. You cant do one with C=500 and one with C=400 and say that it's ok because the solution didn't change much.

In other words, to be confident in your results you:

A) Run two sims with C not much higher than 1
OR
B) Run one with C always less than 1 with a margin

B should take less time than A!

In addition to this, if you are running an unsteady simulation where you are claiming to resolve unsteady phenomena (periodic or turbulent) on a timescale t_physics you need timestep<<t_physics.

I am quite uncomfortable still with the general advice on Courant Number as a lot of people say "don't worry, if the simulation runs impractically slowly then just have a higher Courant number!"

This is the same as saying "do it correctly unless you don't like the fact that it is taking a long time to run".

At the least, it is saying "do it correctly up to a point and just hope you can get away with your high Courant numbers. Then present the results to your engineering team/research journals! Hopefully the plane won't crash!"
Nabuchadresar likes this.
DaveyBaby is offline   Reply With Quote

Old   April 9, 2015, 18:29
Default
  #19
Member
 
Join Date: Nov 2014
Posts: 88
Rep Power: 12
hwsv07 is on a distinguished road
Quote:
Originally Posted by DaveyBaby View Post
A) Run two sims with C not much higher than 1
OR
B) Run one with C always less than 1 with a margin

B should take less time than A!
im not sure if you wrote this correctly - i think you wanted to say A takes less than B ; higher C => larger timestep => less iterations to reach simulation end time.

Last edited by hwsv07; April 13, 2015 at 20:09.
hwsv07 is offline   Reply With Quote

Old   April 9, 2015, 18:36
Default
  #20
Member
 
Join Date: Nov 2014
Posts: 88
Rep Power: 12
hwsv07 is on a distinguished road
Quote:
Originally Posted by DaveyBaby View Post
In addition to this, if you are running an unsteady simulation where you are claiming to resolve unsteady phenomena (periodic or turbulent) on a timescale t_physics you need timestep<<t_physics.
if i do not know the timescale of the physics that im trying to resolve - how can I determine the timestep?

or my question does not make sense?
hwsv07 is offline   Reply With Quote

Reply

Tags
step, time


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
HELP! time step too small? meangreen Main CFD Forum 6 May 31, 2018 11:41
Hydrostatic Pressure and Gravity miliante OpenFOAM Running, Solving & CFD 132 October 7, 2012 23:50
Full pipe 3D using icoFoam cyberbrain OpenFOAM 4 March 16, 2011 10:20
Time step in transient simulation shib FLUENT 0 June 17, 2010 14:07
calculation diverge after continue to run zhajingjing OpenFOAM 0 April 28, 2010 05:35


All times are GMT -4. The time now is 04:34.