<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>CFD Online Discussion Forums - OpenFOAM Other</title>
		<link>http://www.cfd-online.com/Forums/</link>
		<description />
		<language>en</language>
		<lastBuildDate>Thu, 09 Sep 2010 09:17:49 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.cfd-online.com/Forums/images/misc/rss.jpg</url>
			<title>CFD Online Discussion Forums - OpenFOAM Other</title>
			<link>http://www.cfd-online.com/Forums/</link>
		</image>
		<item>
			<title>pow function or pos().z error, please help</title>
			<link>http://www.cfd-online.com/Forums/openfoam-code-other/79530-pow-function-pos-z-error-please-help.html</link>
			<pubDate>Thu, 26 Aug 2010 11:02:45 GMT</pubDate>
			<description>Hi, ive been using funkysetfields to set the following initial conditions through out my mesh. Ive posted this earlier in the funkysetfields thread,...</description>
			<content:encoded><![CDATA[<div>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.<br />
<br />
Anyways, the condition is this:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left"><br />
Part: temperature1<br />
&nbsp;Putting &quot;pow(pos().z,0.1)&quot; into field T at t = &quot;0&quot; if condition &quot;(pos().x &lt;= 0.0105) &amp;&amp; (pos().z &lt;= 0.15) &amp;&amp; (pos().z &gt; 0)&quot; is true</code><hr />
</div>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:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">#0&nbsp; Foam::error::printStack(Foam::Ostream&amp;) in &quot;/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so&quot;<br />
#1&nbsp; Foam::sigFpe::sigFpeHandler(int) in &quot;/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so&quot;<br />
#2&nbsp;  in &quot;/lib/libc.so.6&quot;<br />
#3&nbsp;  in &quot;/lib/libm.so.6&quot;<br />
#4&nbsp; Foam::pow(Foam::Field&lt;double&gt;&amp;, Foam::UList&lt;double&gt; const&amp;, double const&amp;) in &quot;/home/gustavo/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so&quot;<br />
#5&nbsp; <br />
&nbsp;in &quot;/home/gustavo/OpenFOAM/gustavo-1.6.x/applications/bin/linux64GccDPOpt/funkySetFields&quot;<br />
#6&nbsp; <br />
&nbsp;in &quot;/home/gustavo/OpenFOAM/gustavo-1.6.x/applications/bin/linux64GccDPOpt/funkySetFields&quot;<br />
#7&nbsp; <br />
&nbsp;in &quot;/home/gustavo/OpenFOAM/gustavo-1.6.x/applications/bin/linux64GccDPOpt/funkySetFields&quot;<br />
#8&nbsp; <br />
&nbsp;in &quot;/home/gustavo/OpenFOAM/gustavo-1.6.x/applications/bin/linux64GccDPOpt/funkySetFields&quot;<br />
#9&nbsp; <br />
&nbsp;in &quot;/home/gustavo/OpenFOAM/gustavo-1.6.x/applications/bin/linux64GccDPOpt/funkySetFields&quot;<br />
#10&nbsp; __libc_start_main in &quot;/lib/libc.so.6&quot;<br />
#11&nbsp; <br />
&nbsp;at /build/buildd/eglibc-2.10.1/csu/../sysdeps/x86_64/elf/start.S:116<br />
Floating point exception</code><hr />
</div>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.<br />
<br />
The error only appers when the pos().z is in the pow function for some values of z. <br />
<br />
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.<br />
<br />
I really need help; thanks for your time.<br />
GB</div>

]]></content:encoded>
			<category domain="http://www.cfd-online.com/Forums/openfoam-code-other/">OpenFOAM Other</category>
			<dc:creator>Disco_Caine</dc:creator>
			<guid isPermaLink="true">http://www.cfd-online.com/Forums/openfoam-code-other/79530-pow-function-pos-z-error-please-help.html</guid>
		</item>
	</channel>
</rss>
