|
[Sponsors] |
May 24, 2015, 09:51 |
Error in UDF DPM
|
#1 |
Member
YANNAPOL SRIPHUTKIAT
Join Date: Sep 2014
Posts: 43
Rep Power: 12 |
Dear All,
I have been facing this kind of problem for so long long time. I use exactly the same declaration and function as tutorial, but i do not why I get this error (Attachment 1: Error) I also attach the code in that line (Attachment 2: Line 109-111) Anyone please advise Best Regards, Yannapol S. Last edited by YANNAPOL; May 25, 2015 at 01:34. |
|
May 24, 2015, 19:29 |
|
#2 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Variables need to be declared at the start of a code block for the programming language ANSI C (which Fluent UDFs are coded with). What is the tutorial you are following, and how have they declared their thread pointers?
|
|
May 25, 2015, 01:34 |
|
#3 |
Member
YANNAPOL SRIPHUTKIAT
Join Date: Sep 2014
Posts: 43
Rep Power: 12 |
Dear e,
Thank you for your reply i followed the tutorial http://148.204.81.206/Ansys/150/ANSY...F%20Manual.pdf "2.5.5.3. Example" PAGE 167 I will attach the code in C language for your convenience in the main thread It was declared ... Thread *t0 = P_CELL_THREAD(p); LINE 17 I am very new with this, I may miss something. Please advise |
|
May 25, 2015, 02:19 |
|
#4 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
The UDF manual correctly declares the thread pointer (and also initialises this pointer with P_CELL_THREAD(p)) at the start of a code block (after an opening curly bracket). You should follow this rule in your code, specifically: move "Thread *t0;" up with your other variable declarations.
|
|
Tags |
dpm, dpm fluent, particle, udf, udf and programming |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
WILLING TO PAY/ FREELANCER REQUIRED / small UDF coding force loads over body / 6DOF | acasas | CFD Freelancers | 1 | January 23, 2015 08:26 |
Add Mass to a Particle with UDF (DPM) | sega | Fluent UDF and Scheme Programming | 6 | October 24, 2013 23:14 |
please help me. i have question about the UDF at the DPM | motallebi | FLUENT | 0 | July 6, 2009 12:27 |
Velocity of Fluid @ different positions of Particle in DPM using UDF | pmghadge | FLUENT | 1 | June 16, 2009 20:11 |
UDF DPM injection | M.A. Rakib | FLUENT | 0 | June 13, 2000 09:28 |