|
[Sponsors] |
Doubt about real x[ND_ND] declaration in FLUENT udf |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 19, 2013, 14:45 |
Doubt about real x[ND_ND] declaration in FLUENT udf
|
#1 |
Member
Join Date: Jul 2012
Posts: 48
Rep Power: 14 |
Hi,
we declare the position vector in a udf as x[ND_ND]; my doubt is what is the data type (double? float?)of this x[0] variable .. if I'm using double precision solver?? and in single precision solver? This seems to cause certain weird unexpected random kindoff results in the conditions of "IF else" statements in my udfs..plz replyy ! thnx in advance |
|
March 19, 2013, 17:49 |
|
#2 |
Super Moderator
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49 |
I think the UDF manual covers this topic.
Variables declared as real are double if you are using the double precision solver. If you dont trust the manual, declare x as double. |
|
March 20, 2013, 08:03 |
|
#3 |
New Member
Join Date: Feb 2013
Location: Australia
Posts: 6
Rep Power: 13 |
u define it as real and fluent udf will automatically convert it to float in the single precison solver and double in double precision solver.
|
|
March 20, 2013, 09:38 |
|
#4 |
Super Moderator
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49 |
Zheng, why do you keep repeating my answers?
|
|
March 20, 2013, 18:19 |
|
#5 |
New Member
Join Date: Feb 2013
Location: Australia
Posts: 6
Rep Power: 13 |
||
March 21, 2013, 01:21 |
|
#6 | |
Member
Join Date: Jul 2012
Posts: 48
Rep Power: 14 |
Quote:
I tried it .. but it gives an error "Segmentation Violation" in the "EXECUTE_ON_DEMAND" udf im using .. it involves the comparison of 2-different array elements at a time .. i tried declaring on array as a double and other as a real(double precision solver) .. however if i declare both as real it runs successfully..isn't this weird? |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Two questions on Fluent UDF | Steven | Fluent UDF and Scheme Programming | 7 | March 23, 2018 04:22 |
view factor | yoollooz | Fluent UDF and Scheme Programming | 0 | March 1, 2013 01:44 |
UDF issue | MASOUD | Fluent UDF and Scheme Programming | 14 | December 6, 2012 14:39 |
defining a term for a domain using DEFINE_ADJUST | MASOUD | Fluent UDF and Scheme Programming | 1 | September 24, 2010 06:08 |
UDF error from Windows to Linux | manu | FLUENT | 3 | January 10, 2008 05:02 |