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

Problems with adjustable timestep control and maxCo Number

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By wolle1982

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 18, 2008, 06:46
Default Hi all, I'm using OF 1.5 an
  #1
Senior Member
 
Wolfgang Heydlauff
Join Date: Mar 2009
Location: Germany
Posts: 136
Rep Power: 21
wolle1982 will become famous soon enough
Hi all,

I'm using OF 1.5 an try to make a turbFoam simulation run with adjustable Timestep control.
But it doesn't work. the solver always keeps the preset deltaT. NO adjustment is done at all!!

As I read in this forum ( http://www.cfd-online.com/cgi-bin/Op...cus/discus.cgi ) to make it work I have to change my turboFoam.C.
But by recompiling it there appears an error:

-------------------------
.../setInitialDeltaT.H: In function 'int main(int, char**)':
.../setInitialDeltaT.H36: error 'CoNum was not declared in this scope
turbFoam wurde nicht aktualisiert
-------------------------

How can I correct the missing declaration?

Or should this work in OF1.5 already rigth? If so, what do I have to change or adjust and in what file?

Thanks a lot.
wolle1982 is offline   Reply With Quote

Old   November 18, 2008, 07:21
Default in turbFoam.C After: # inc
  #2
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
in turbFoam.C
After:
# include "initContinuityErrs.H"
add this:
# include "readTimeControls.H"

and after:
# include "CourantNo.H"
add this:
# include "setDeltaT.H"

and run wmake.

in system/controlDict add these lines.

adjustTimeStep on;
maxCo 0.3;
niklas is offline   Reply With Quote

Old   November 18, 2008, 08:55
Default Thank you. This solved it fina
  #3
Senior Member
 
Wolfgang Heydlauff
Join Date: Mar 2009
Location: Germany
Posts: 136
Rep Power: 21
wolle1982 will become famous soon enough
Thank you. This solved it finally!!
As a conclution for all others: My turbFoam.C now looks like this:

.
.
.
int main(int argc, char *argv[])
{

# include "setRootCase.H"

# include "createTime.H"
# include "createMesh.H"
# include "createFields.H"
# include "initContinuityErrs.H"
# include "CourantNo.H"
# include "readTimeControls.H"
# include "setInitialDeltaT.H"


// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Info<< "\nStarting time loop\n" << endl;

for (runTime++; !runTime.end(); runTime++)
{
Info<< "Time = " << runTime.timeName() << nl << endl;
# include "readTimeControls.H"
# include "readPISOControls.H"
# include "CourantNo.H"
# include "setDeltaT.H"

// Pressure-velocity PISO corrector
.
.
.
.
My controlDict has the following lines attached
=======================
.
.
adjustTimeStep yes;

maxCo 5;

maxDeltaT 0.01;
.
.
.
=================================

after that I did "wclean" and "wmake" inside the ../incompressible/turbFoam/ directory.

Finally it works.
mn14cat likes this.
wolle1982 is offline   Reply With Quote

Old   June 18, 2009, 14:00
Default courant number bigger in icoFoam
  #4
Member
 
xianghong wu
Join Date: Mar 2009
Posts: 57
Rep Power: 17
wendywu is on a distinguished road
Quote:
Originally Posted by niklas View Post
in turbFoam.C
After:
# include "initContinuityErrs.H"
add this:
# include "readTimeControls.H"

and after:
# include "CourantNo.H"
add this:
# include "setDeltaT.H"

and run wmake.

in system/controlDict add these lines.

adjustTimeStep on;
maxCo 0.3;
Hi,
I also met this problem, when I run icoFoam on a case with complex 3D shape. courant number becomes bigger and bigger. it seems non reasonable.
Do I need to correct it like what you said here?
Thank you.

Wendy.
wendywu is offline   Reply With Quote

Old   July 27, 2011, 06:40
Default
  #5
Member
 
Tibo
Join Date: Jun 2011
Posts: 68
Rep Power: 15
megacrout is on a distinguished road
Hi Niklas,

Thanks a lot, that was exactly what I needed.
I actually did it with pisoFoam, it works great.

Tibo
megacrout is offline   Reply With Quote

Old   September 24, 2015, 11:07
Default DelT, adjustableTIme,courantNumber
  #6
New Member
 
Isaac Mark Joseph Manasseh
Join Date: Aug 2015
Posts: 3
Rep Power: 11
mar001 is on a distinguished road
I have set my transient turbulent flow simulation to adjustable time steps. And also set the max. COurant number to 1. I am simulating flow over a smooth cylinder. While using my FFT MATLAB script to plot the dominant frequency as the Strouhal's frequency i realized I got two spikes. One at 2.575 and another peak at 2.795. Reynolds number of : 5.5*10^5. Is this is a physical phenomenon or that my time step delT has been so small to capture the dominant frequency twice. If yes what is the correction that I can do?
mar001 is offline   Reply With Quote

Reply


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
MaxCo with interFoam sega OpenFOAM Running, Solving & CFD 2 January 6, 2009 05:05
Timestep control via CEL? Claudia CFX 7 September 14, 2007 06:00
change timestep after a certain iteration number Sans CFX 5 June 3, 2007 06:17
Timestep-Control (Subroutine) Gabor CFX 1 November 14, 2005 02:22


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