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

Error in Time Calculation in transition mode

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 22, 2006, 09:40
Default Error in Time Calculation in transition mode
  #1
Morteza
Guest
 
Posts: n/a
Hi Guys,

I have a weird error in my code. When my code is marching in time in transition mode, somewhere between T_0 and T_END an error in claculation of time is occured. As an example, for dt=0.1, at Time=5.9 the value of Time in next time step is calculated as Time=5.9999999999 instead of 6.0 or for dt=0.2, it happens in Time=23.2 and Time is 23.3999999 instead of 23.4. I used Double Precision for dt and Time variables but still I have this problem. I appreciate to receive your advise to fix this issue.

Thanks Morteza
  Reply With Quote

Old   August 23, 2006, 06:51
Default Re: Error in Time Calculation in transition mode
  #2
Mani
Guest
 
Posts: n/a
How do you advance the time: Do you keep adding dt to the previous time, or do you multiply dt with an integer number of time steps?
  Reply With Quote

Old   August 23, 2006, 07:21
Default Re: Error in Time Calculation in transition mode
  #3
Morteza
Guest
 
Posts: n/a
Hi Mani,

It is just adding dt to previous time,

Thanks Morteza
  Reply With Quote

Old   August 23, 2006, 07:54
Default Re: Error in Time Calculation in transition mode
  #4
Morteza
Guest
 
Posts: n/a
Hi Mani,

It is just adding dt to previous time,

Thanks Morteza
  Reply With Quote

Old   August 24, 2006, 07:16
Default Re: Error in Time Calculation in transition mode
  #5
Mani
Guest
 
Posts: n/a
This will be inherently inaccurate as you keep accumulating round-off errors. The general advice is to use an integer as increment (number of time steps) and obtain the current time by multiplication of that integer with dt.
  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
calculation of time step aamer Main CFD Forum 8 December 8, 2010 03:26
PostChannel maka OpenFOAM Post-Processing 5 July 22, 2009 09:15
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 18:07
Warning 097- AB Siemens 6 November 15, 2004 04:41
unsteady calcs in FLUENT Sanjay Padhiar Main CFD Forum 1 March 31, 1999 12:32


All times are GMT -4. The time now is 05:16.