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

Double Precision

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 4, 2001, 15:44
Default Double Precision
  #1
Ugur
Guest
 
Posts: n/a
Hi;

I have a question. Is there any way to use double precision real numbers in user defined functions?

Thanks...

Ugur
  Reply With Quote

Old   October 5, 2001, 04:33
Default Re: Double Precision
  #2
Anthony Wachs
Guest
 
Posts: n/a
Hi,

I am wondering if I have clearly understood your question. According to me, simply replace :

real x;

by :

double x;

Is that what you would like to know ? I apologize in advance if my answer is too trivial. If it is the kind of anwer you expected, I hope it might help...

Best regards,

Anthony
  Reply With Quote

Old   October 5, 2001, 14:58
Default Re: Double Precision
  #3
Ugur
Guest
 
Posts: n/a
Yes, you gotteh question correctly, does double work in interpreted UDFs? Or, when your case in double precision,even if you define as real is it single or double precision. I mean, does precision of the case affect the precision of the UDF? Thanks...
  Reply With Quote

Old   October 9, 2001, 04:32
Default Re: Double Precision
  #4
Greg Perkins
Guest
 
Posts: n/a
You don't need to do anything. Just declare your variabes as

real x;

you will find that when you use double precision the Fluent header files define

#define real double

while for single precision Fluent defines

#define real float

Thus if you always use real you should have no probs.

Have a look at the .h files in the /src folders under Fluent.Inc/fluent5.x/ etc.

Greg
  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
Continuing User Defined Real Gas Model issues aeroman FLUENT 6 April 8, 2016 03:34
Parallel User Defined Real Gas Model aeroman FLUENT 4 July 1, 2015 06:09
Missing math.h header Travis FLUENT 4 January 15, 2009 11:48
what's wrong about my code for 2d burgers equation morxio Main CFD Forum 3 April 27, 2007 10:38
REAL GAS UDF brian FLUENT 6 September 11, 2006 08:23


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