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

Real exponents

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 22, 2007, 16:21
Default Hi, I'm trying to get a really
  #1
Member
 
Ken Darcovich
Join Date: Mar 2009
Location: Ottawa, Canada
Posts: 31
Rep Power: 17
kdarc is on a distinguished road
Hi, I'm trying to get a really simple thing to compile,

pow(a,b) where the exponent b is real. Open Foam does not seem to want to compile this. It works fine if b is an integer.

Surely there has to be a way to use real exponents.

Help?

thanks!
kdarc is offline   Reply With Quote

Old   August 22, 2007, 16:32
Default Should work. Try Foam::pow(a,
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
Should work. Try Foam::pow(a, b); if it does not work, could you please post the error message.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   August 22, 2007, 16:32
Default Hello, Did you try defining
  #3
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25
philippose will become famous soon enough
Hello,

Did you try defining the variables as OpenFOAM datatype "scalar" rather than the normal "float" or "double" datatype ?

Philippose
philippose is offline   Reply With Quote

Old   August 22, 2007, 16:35
Default the Foam::pow(a,b) works as su
  #4
Member
 
Ken Darcovich
Join Date: Mar 2009
Location: Ottawa, Canada
Posts: 31
Rep Power: 17
kdarc is on a distinguished road
the Foam::pow(a,b) works as suggested!

that's it, that's all I need, I'm back on the rails.

thanks!
kdarc 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
i need your real help sihat FLUENT 3 August 8, 2007 15:00
[Fortran] (-real number)**(- or + real number) jinwon Main CFD Forum 3 June 14, 2007 14:50
REAL GAS UDF brian FLUENT 6 September 11, 2006 08:23
Real Gas Alireza Zarif FLUENT 0 October 30, 2005 09:53
What is real? - Main CFD Forum 0 December 26, 2004 11:28


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