CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Very Small Time Step

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 11, 2012, 14:01
Default Very Small Time Step
  #1
New Member
 
A Sharma
Join Date: Mar 2012
Location: Germany
Posts: 14
Rep Power: 6
stealth is on a distinguished road
Hello OpenFoam Users,

I am a bit new to OpenFoam. I am trying to create droplet formation (in the simplest case worked well using a TJunction) using InterFoam. I made it little complex for by adding few more inputs, this leads to very small time step (of order of 1.0e-12). Courant Number also falls down. Please let me know if it could be a problem due to type of mesh I used (Please have a look at the attachment). I also attach the input files (tar.gz).

If mesh is okay, please let me know what could be the possible reasons for such problem.

Thanks,

A. Sharma
Attached Images
File Type: jpg Filea.0000.jpg (19.8 KB, 139 views)
Attached Files
File Type: gz tmp.tar.gz (5.6 KB, 15 views)
stealth is offline   Reply With Quote

Old   June 12, 2012, 03:28
Default
  #2
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 11
colinB is on a distinguished road
Hi there,

the problem you described indeed could be a meshing issue.

Unfortunately I don't have an OF computer at the hand to have a detailed
look at your mesh, but the picture you attached shows some significant
variation of the cell size for adjunct cells, so below that triangle you modelled
below the cut-out.

To be sure about meshing issues could you please run checkMesh and post
the results here, probably this will give us the answers we need.

As a rule of thumb, try to create as smooth meshes as possible without
abrupt changes in mesh size and direction at the same time.

I hope I could contribute

regards
Colin
colinB is offline   Reply With Quote

Old   June 12, 2012, 09:24
Default
  #3
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: Amherst, MA USA - San Diego, CA USA
Posts: 320
Rep Power: 10
kmooney is on a distinguished road
Howdy,

A while back I posted a code snipit that might help you out. If you swap out

Code:
#include CourantNo.H
in the top level solver with the code that I posted it will write out a Co field with a difference value for each cell. It might point out a few trouble cells or perhaps eliminate the mesh as a potential culprit.

Post #4 on this thread:
Non stationary simulation of a 2D cylinder

Let me know if you have any trouble with it, I wouldn't mind helping you out.

Cheers,
Kyle
kmooney is offline   Reply With Quote

Old   June 14, 2012, 13:10
Default
  #4
New Member
 
A Sharma
Join Date: Mar 2012
Location: Germany
Posts: 14
Rep Power: 6
stealth is on a distinguished road
Hello Colin,

Thank you very much for your response. As you said I tried running "checkMesh" and found out some errors. Then I decided to use Salome for creating mesh and it worked well i.e. gives no problem when I run checkMesh (as shown in figure attached).
Time Step now remains of the order of 1.e-6 and stable. Is it possible to even improve it to much higher value? All other parameters I kept same as before.


Thanks again,

Regards,

A. Sharma







Quote:
Originally Posted by colinB View Post
Hi there,

the problem you described indeed could be a meshing issue.

Unfortunately I don't have an OF computer at the hand to have a detailed
look at your mesh, but the picture you attached shows some significant
variation of the cell size for adjunct cells, so below that triangle you modelled
below the cut-out.

To be sure about meshing issues could you please run checkMesh and post
the results here, probably this will give us the answers we need.

As a rule of thumb, try to create as smooth meshes as possible without
abrupt changes in mesh size and direction at the same time.

I hope I could contribute

regards
Colin
Attached Images
File Type: jpg asa.0000.jpg (98.1 KB, 60 views)
stealth is offline   Reply With Quote

Old   June 14, 2012, 13:18
Default
  #5
New Member
 
A Sharma
Join Date: Mar 2012
Location: Germany
Posts: 14
Rep Power: 6
stealth is on a distinguished road
Hello Kyle,

Thanks a lot for your response. Your old post looks quiet good. But, I didn't get everything out of it. It will be great if you can elaborate your part a bit for. eg: where exactly to make changes as you described.
And do I need to recompile the code again etc.

I tried to recreate mesh using Salome, it worked well (gives no problem with checkMesh, as shown in figure on my last post). Time Step now stays at 1.e-6. Can I make it even bigger ?

What could be other possible reasons for still smaller step ?

Thank You again.

Regards,

A. Sharma







Quote:
Originally Posted by kmooney View Post
Howdy,

A while back I posted a code snipit that might help you out. If you swap out

Code:
#include CourantNo.H
in the top level solver with the code that I posted it will write out a Co field with a difference value for each cell. It might point out a few trouble cells or perhaps eliminate the mesh as a potential culprit.

Post #4 on this thread:
Non stationary simulation of a 2D cylinder

Let me know if you have any trouble with it, I wouldn't mind helping you out.

Cheers,
Kyle
stealth is offline   Reply With Quote

Old   June 19, 2012, 10:12
Default
  #6
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 11
colinB is on a distinguished road
Hi

since you have chosen adjustable run time the time step is calculated with
the courant number.

C = (u * deltaT) / deltaX and hence

deltaT = (C * deltaX ) / u

where u is the velocity in a certain cell deltaX the length of a cell and
deltaT the desired time step.

so increasing the courant number it would increase also your timestep.

Currently yours is set to 0.2 both mean and max. you could slowly try to go up to .5 or maybe even .8 but you should have a close look at your
calculation.

You can do these changes during the calculation, simply open your
controlDict, change the values and save them. In the next timestep OF
will reread the controlDict and implement the changes.

regards
Colin
colinB is offline   Reply With Quote

Old   June 6, 2013, 10:49
Default
  #7
Member
 
Join Date: Mar 2013
Posts: 92
Rep Power: 5
giack is on a distinguished road
Hi to all,
I have a similar problem whit the performance of inteFoam. My problem concern a circular pipe filled with liquid and closed to both extremity. At initial time the right wall of the pipe is opened and gas allowing gas to go inside and liquid outside. My aim is to validate OpenFOAM for this kind of problem so I compared its performance with Fluent.
The comparison seems very good but there is a strange difference.
In my simulations I use a fixed Courant number and adaptive time step. The difference between is that Fluent give me a deltaT around 10e-04 while OpenFOAM give me a deltaT around 10e-6.So the simulation run very slow with OpenFOAM...Why this different behavior?There i a way to speed simulation?
I obtain a little accelerate through decreasing tolerance but I would obtain i larger time step if possibile and kwon why there is this difference between two code.
Note that in my case Courant number is set to 0.25 and that a bigger Courant number increase the time step but give me a fluctuating solution. So I can't increase my Courant number

thanks to all
giack is offline   Reply With Quote

Old   June 7, 2013, 02:24
Default
  #8
Senior Member
 
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 237
Rep Power: 9
fredo490 is on a distinguished road
I suppose you run with the same exact mesh on both case ?

You can try to plot modify your solver and plot the Courant number to check where is the highest point. Maybe you have only 1 or 2 cells that are problematic.
fredo490 is offline   Reply With Quote

Old   June 10, 2013, 04:30
Default
  #9
Member
 
Join Date: Mar 2013
Posts: 92
Rep Power: 5
giack is on a distinguished road
thanks for your reply.
Yes,I run the same mesh in both simulations. I make a clerical error and the time step in OpenFoam is about 1e-05,so the difference between two codes is 1 order of magnitudes. To increase time step I can set Co number to 0.8 and set nAlphasubcycles=3, in this way the Co in the interface remain 0.25 and I redouble the time step. Someone suggests me to set maxCo=2 and maxAlphaCo=1 with nAlphasubcycles=4. In this way I increase my time step considerably but I have a question:
InterFoam is an explicit solver, with a maxCo=2 there is the possibility that solution diverge?
giack is offline   Reply With Quote

Old   June 10, 2013, 04:37
Default
  #10
Senior Member
 
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 237
Rep Power: 9
fredo490 is on a distinguished road
You have the possibility of a divergence but also of an "unphysical" result (the solver sometimes doesn't crash but gives inaccurate data). You need to check your data and see if there is any "mistake".
fredo490 is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
Differences between serial and parallel runs carsten OpenFOAM Bugs 11 September 12, 2008 11:16
AMG versus ICCG msrinath80 OpenFOAM Running, Solving & CFD 2 November 7, 2006 16:15
VOF özgür FLUENT 8 January 6, 2004 09:23


All times are GMT -4. The time now is 01:25.