|
[Sponsors] |
August 22, 2006, 10:40 |
Error in Time Calculation in transition mode
|
#1 |
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 |
|
August 23, 2006, 07:51 |
Re: Error in Time Calculation in transition mode
|
#2 |
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?
|
|
August 23, 2006, 08:21 |
Re: Error in Time Calculation in transition mode
|
#3 |
Guest
Posts: n/a
|
Hi Mani,
It is just adding dt to previous time, Thanks Morteza |
|
August 23, 2006, 08:54 |
Re: Error in Time Calculation in transition mode
|
#4 |
Guest
Posts: n/a
|
Hi Mani,
It is just adding dt to previous time, Thanks Morteza |
|
August 24, 2006, 08:16 |
Re: Error in Time Calculation in transition mode
|
#5 |
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.
|
|
|
|
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 10: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 | Siemens | 6 | November 15, 2004 05:41 |
unsteady calcs in FLUENT | Sanjay Padhiar | Main CFD Forum | 1 | March 31, 1999 13:32 |