CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

pow function or pos().z error, please help

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 26, 2010, 08:02
Default pow function or pos().z error, please help
  #1
Member
 
G B
Join Date: Mar 2010
Posts: 37
Rep Power: 16
Disco_Caine is on a distinguished road
Hi, ive been using funkysetfields to set the following initial conditions through out my mesh. Ive posted this earlier in the funkysetfields thread, however, its not a problem with FSF.

Anyways, the condition is this:

Code:
Part: temperature1
 Putting "pow(pos().z,0.1)" into field T at t = "0" if condition "(pos().x <= 0.0105) && (pos().z <= 0.15) && (pos().z > 0)" is true
And this works when z is bigger than 19. However when i change to values smaller than 19 (which coincidentally, i really need to do). I have a conversion factor of 0.01 (im typing in cm, solving in meters). I get this error:

Code:
#0  Foam::error::printStack(Foam::Ostream&) in "/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#1  Foam::sigFpe::sigFpeHandler(int) in "/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#2   in "/lib/libc.so.6"
#3   in "/lib/libm.so.6"
#4  Foam::pow(Foam::Field<double>&, Foam::UList<double> const&, double const&) in "/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#5  
 in "/home/gustavo/OpenFOAM/gustavo-1.6.x/applications/bin/linux64GccDPOpt/funkySetFields"
#6  
 in "/home/gustavo/OpenFOAM/gustavo-1.6.x/applications/bin/linux64GccDPOpt/funkySetFields"
#7  
 in "/home/gustavo/OpenFOAM/gustavo-1.6.x/applications/bin/linux64GccDPOpt/funkySetFields"
#8  
 in "/home/gustavo/OpenFOAM/gustavo-1.6.x/applications/bin/linux64GccDPOpt/funkySetFields"
#9  
 in "/home/gustavo/OpenFOAM/gustavo-1.6.x/applications/bin/linux64GccDPOpt/funkySetFields"
#10  __libc_start_main in "/lib/libc.so.6"
#11  
 at /build/buildd/eglibc-2.10.1/csu/../sysdeps/x86_64/elf/start.S:116
Floating point exception
In an effort to try and elucidate this, i got some tips from a fellow poster, if i run the condition as pos().z i get no error, and as expected the values vary from 0.0001 to 0.149. If i try the pow function with those loweest and highest values to the power i need, i get no error.

The error only appers when the pos().z is in the pow function for some values of z.

I really have no clue how to fix this. As i dont really understand whats going on. I am more than glad to post anything else that might help.

I really need help; thanks for your time.
GB
Disco_Caine is offline   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
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 10:31
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 15:11
latest OpenFOAM-1.6.x from git failed to compile phsieh2005 OpenFOAM Bugs 25 February 9, 2010 05:37
Error with Wmake skabilan OpenFOAM Installation 3 July 28, 2009 01:35
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00


All times are GMT -4. The time now is 23:47.