|
[Sponsors] |
How to increase the output precision for a variable? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 19, 2013, 15:31 |
How to increase the output precision for a variable?
|
#1 |
Member
Jack
Join Date: Dec 2011
Posts: 94
Rep Power: 14 |
Hi all,
I am using OpenFOAM to simulate channel flows. I have a problem, and you guys can help me? Thanks. I specified a very small temperature difference on top and bottom walls (e.g. 300.005 at top and 299.995 at the bottom wall), it seems that the temperature precision is not enough because when I check the T output in the flow field, the results are just 300.004, 300.003, etc. But what I expect is more accurate T value, like 300.004142, 300.003125. I want to increase the precision of temperature, how can I do it? Regards |
|
April 19, 2013, 16:52 |
|
#2 |
Member
Jack
Join Date: Dec 2011
Posts: 94
Rep Power: 14 |
I have checked my openfoam configuration, the $WM_PRECISION_OPTION=DP. It seems that it is double precision, but the output results just have 6 valid digits, it is weird....
|
|
April 19, 2013, 16:55 |
|
#3 |
Senior Member
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22 |
U can control the "writePrecision" in the system/controlDict file.
Just a small question, how meaningful is writing the temperature up to 5 digits after the decimal point. Can't you assume the flow to be isothermal? Cheers, L |
|
April 19, 2013, 16:59 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings ripperjack,
I was trying to make a witty comment, but I'm too burn out from the long week of work... oh well... So, here's what's happening: OpenFOAM is doing exactly what you told it to do! Check your "system/controlDict"; then check the user guide: http://www.openfoam.org/docs/user/controlDict.php There are two very important details here:
Bruno
__________________
|
|
April 19, 2013, 19:04 |
|
#5 |
Member
Jack
Join Date: Dec 2011
Posts: 94
Rep Power: 14 |
Hi Lieven wyldckat,
Many thanks for your reply! I am simulating heat transfer using DNS method, the velocity is very small, so is the temperature difference. Now my results make sense. Thanks again and have a great weekend! Regards |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFoam-1.6-ext Allwmake compilation error - one last barrier | Pat84 | OpenFOAM Installation | 15 | July 25, 2012 22:49 |
Condensation as an additional variable | Clark Griswold | CFX | 2 | April 21, 2012 08:20 |
Additional variable as output of an expression | Chander | CFX | 1 | November 22, 2011 13:54 |
help !!!!variable output in cylindrical coordinate | rohit | Phoenics | 3 | September 8, 2004 22:28 |
How to output one variable which is not stored | sun | Phoenics | 3 | June 18, 2002 03:37 |