# Time is always zero

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 September 24, 2007, 16:04 Hello OpenFoam Users, I hav #1 New Member   Kian Mehravaran Join Date: Mar 2009 Location: London, U.K Posts: 22 Rep Power: 8 Hello OpenFoam Users, I have 1.4.1, compiled with single precision. I noticed that when I use a deltaT lower than 1.0E-05, it is basically regarded as zero. In other words, time is always zero! I checked the deltaT.value() in the code (sonicFoam), and it contains the correct value. Any advice is appreciated, Kian

 September 24, 2007, 23:16 I compiled with double precisi #2 New Member   Kian Mehravaran Join Date: Mar 2009 Location: London, U.K Posts: 22 Rep Power: 8 I compiled with double precision, and the problem is gone now.

 September 25, 2007, 13:53 See Time.C around line 620. #3 Super Moderator   Mattijs Janssens Join Date: Mar 2009 Posts: 1,416 Rep Power: 16 See Time.C around line 620. The problem in single precision is that there are only 6 significant digits. There is some truncation in operator++ to reach time 0 exactly which is probably too strict for your case.

 September 26, 2007, 10:15 In the code segment you pointe #4 New Member   Kian Mehravaran Join Date: Mar 2009 Location: London, U.K Posts: 22 Rep Power: 8 In the code segment you pointed to (the ++ operator), time is set to value() + deltaT_ then it is forced to zero if its value is less than 10*SMALL or 1E-5, perhaps for aesthetics?! I can't understand why it is not forced to zero in double precisions, when your deltaT is say 1E-8?

 September 26, 2007, 10:24 OK, I was wrong about SMALL be #5 New Member   Kian Mehravaran Join Date: Mar 2009 Location: London, U.K Posts: 22 Rep Power: 8 OK, I was wrong about SMALL being 1E-6 in double precision, that value is for single precision. The actual value of SMALL is 1E-15 in dp. I wanted to get rid of that if statement, but I'm going to stick with the dp version instead, since it is better tested.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post may FLUENT 6 November 22, 2009 12:52 Simon FLUENT 1 August 5, 2009 10:32 JP CFX 0 May 9, 2008 03:36 Ybes FLUENT 0 November 3, 2007 13:32 Salman Main CFD Forum 2 August 3, 2005 14:13

All times are GMT -4. The time now is 20:30.

 Contact Us - CFD Online - Top