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

Error in UDF DPM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 24, 2015, 08:51
Unhappy Error in UDF DPM
  #1
Member
 
YANNAPOL SRIPHUTKIAT
Join Date: Sep 2014
Posts: 43
Rep Power: 11
YANNAPOL is on a distinguished road
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.
Attached Images
File Type: jpg Error.jpg (17.0 KB, 3 views)
File Type: jpg Line 109-111.jpg (49.8 KB, 14 views)
Attached Files
File Type: c tutorial.c (4.0 KB, 1 views)

Last edited by YANNAPOL; May 25, 2015 at 00:34.
YANNAPOL is offline   Reply With Quote

Old   May 24, 2015, 18:29
Default
  #2
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
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?
`e` is offline   Reply With Quote

Old   May 25, 2015, 00:34
Default
  #3
Member
 
YANNAPOL SRIPHUTKIAT
Join Date: Sep 2014
Posts: 43
Rep Power: 11
YANNAPOL is on a distinguished road
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
YANNAPOL is offline   Reply With Quote

Old   May 25, 2015, 01:19
Default
  #4
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
Quote:
Originally Posted by `e` View Post
Variables need to be declared at the start of a code block for the programming language ANSI C (which Fluent UDFs are coded with).
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.
`e` is offline   Reply With Quote

Reply

Tags
dpm, dpm fluent, particle, udf, udf and programming


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
WILLING TO PAY/ FREELANCER REQUIRED / small UDF coding force loads over body / 6DOF acasas CFD Freelancers 1 January 23, 2015 07:26
Add Mass to a Particle with UDF (DPM) sega Fluent UDF and Scheme Programming 6 October 24, 2013 22:14
please help me. i have question about the UDF at the DPM motallebi FLUENT 0 July 6, 2009 11:27
Velocity of Fluid @ different positions of Particle in DPM using UDF pmghadge FLUENT 1 June 16, 2009 19:11
UDF DPM injection M.A. Rakib FLUENT 0 June 13, 2000 08:28


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