CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Steady time step

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 22, 2004, 12:18
Default Steady time step
  #1
Jim
Guest
 
Posts: n/a
I am trying to compute the allowable time-step at each grid point in order to satisfy the CFL condition. The problem I am solving is steady and so I can use different time-steps at each point. I realise that I need to find the max. wavespeed at each point to determine the time-step. I am using MacCormack's method and the stencil for each grid point is three points (i-1, i, i+1), so I need to consider flow conditions at all three stencil points in order to compute the allowable time-step at each grid point. However, I can't seem to be able to code this correctly. I'm using Visual C++ and have so far written:

for (i = 1; i <= no. grid points; i = i + 1)

{

wav = 0.0;

lambda[1] = m_old[i]/ro_old[i] - sqrt(gam*p_old[i]/ro_old[i]);

lambda[2] = m_old[i]/ro_old[i];

lambda[3] = m_old[i]/ro_old[i] + sqrt(gam*p_old[i]/ro_old[i]);

for (j = 1; j <= 3; j = j + 1)

{

if (fabs(lambda[j]) > wav)

{

wav = fabs(lambda[j]);

}

}

deltat[i] = cflno*dx/wav;

}

When I run my program I get a very unstable solution and I think it's due to this time-step calculation.

Any help would be greatly appreciated.

Thanks.
  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
SLTS+rhoPisoFoam: what is rDeltaT??? nileshjrane OpenFOAM Running, Solving & CFD 4 February 25, 2013 04:13
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 04:03
Full pipe 3D using icoFoam cyberbrain OpenFOAM 4 March 16, 2011 09:20
Differences between serial and parallel runs carsten OpenFOAM Bugs 11 September 12, 2008 11:16
false time step implementation for steady state Kushagra CFX 1 June 22, 2008 19:06


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