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

Real exponents

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

Reply
 
LinkBack Thread Tools 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: 30
Rep Power: 8
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,758
Rep Power: 21
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: 530
Rep Power: 16
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: 30
Rep Power: 8
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

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
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 10:53
What is real? - Main CFD Forum 0 December 26, 2004 12:28


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