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

Error in Time Calculation in transition mode

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

Reply
 
LinkBack Thread Tools 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

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
calculation of time step aamer Main CFD Forum 8 December 8, 2010 04: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 19:07
Warning 097- AB CD-adapco 6 November 15, 2004 05: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 10:04.