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

Problems with adjustable timestep control and maxCo Number

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

Reply
 
LinkBack Thread Tools 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: 9
wolle1982 is on a distinguished road
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: 20
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: 9
wolle1982 is on a distinguished road
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.
wolle1982 is offline   Reply With Quote

Old   June 18, 2009, 13:00
Default courant number bigger in icoFoam
  #4
Member
 
xianghong wu
Join Date: Mar 2009
Posts: 57
Rep Power: 8
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, 05:40
Default
  #5
Member
 
Tibo
Join Date: Jun 2011
Posts: 68
Rep Power: 6
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

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


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