CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM

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

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

LinkBack Thread Tools Display Modes
Old   August 26, 2010, 07:02
Default pow function or pos().z error, please help
Join Date: Mar 2010
Posts: 37
Rep Power: 9
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:

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:

#0  Foam::error::printStack(Foam::Ostream&) in "/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/"
#1  Foam::sigFpe::sigFpeHandler(int) in "/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/"
#2   in "/lib/"
#3   in "/lib/"
#4  Foam::pow(Foam::Field<double>&, Foam::UList<double> const&, double const&) in "/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/"
 in "/home/gustavo/OpenFOAM/gustavo-1.6.x/applications/bin/linux64GccDPOpt/funkySetFields"
 in "/home/gustavo/OpenFOAM/gustavo-1.6.x/applications/bin/linux64GccDPOpt/funkySetFields"
 in "/home/gustavo/OpenFOAM/gustavo-1.6.x/applications/bin/linux64GccDPOpt/funkySetFields"
 in "/home/gustavo/OpenFOAM/gustavo-1.6.x/applications/bin/linux64GccDPOpt/funkySetFields"
 in "/home/gustavo/OpenFOAM/gustavo-1.6.x/applications/bin/linux64GccDPOpt/funkySetFields"
#10  __libc_start_main in "/lib/"
 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.
Disco_Caine is offline   Reply With Quote


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
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31
BlockMesh FOAM warning gaottino OpenFOAM Native Meshers: blockMesh 7 July 19, 2010 14: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 00:35
Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Native Meshers: blockMesh 10 April 2, 2007 14:00

All times are GMT -4. The time now is 11:57.