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

can't compile DPM UDF

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By pakk

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 8, 2015, 21:07
Default can't compile DPM UDF
  #1
Member
 
S. Morichika
Join Date: Aug 2014
Posts: 62
Rep Power: 12
Saidul is on a distinguished road
Hello,
I am trying to compile an UDF but it shows some error. How can I fix it. Here is the attachment.

Plz have a look...


Saeed
Attached Images
File Type: jpg After_load.jpg (40.8 KB, 18 views)
File Type: jpg After_build.jpg (33.7 KB, 15 views)
Saidul is offline   Reply With Quote

Old   January 9, 2015, 08:33
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
You can fix it by changing your udf.

We can not tell you what is wrong in your udf, because you did not include your udf. Including the error message was a good start, because it shows that something is wrong on line 12 and possible line 45, but we can not see what is on line 12, so we can not give any advice on how to correct it.
Sun and Saidul like this.
pakk is offline   Reply With Quote

Old   January 12, 2015, 19:59
Default
  #3
Member
 
S. Morichika
Join Date: Aug 2014
Posts: 62
Rep Power: 12
Saidul is on a distinguished road
Here is the UDF
/************************************************** ************************************/
/* UDF for computing cell co-ordinates */
/************************************************** ************************************/

#include "udf.h"
#include "sg.h"
#include "prop.h"
#include "dpm.h"
#include "surf.h"
#define WALL_ID 8

User_Particle_Vars *user_particle_vars;


DEFINE_DPM_SCALAR_UPDATE(particle_coords, c, ct, initialize, p)
{
real A[ND_ND];
int n;
face_t f;
Thread *ft;
c_face_loop(c, ct, n)
{
f=C_FACE(c, ct,n);
ft=C_FACE_THREAD(c, ct, n);
if (NNULLP(ft))
{
if (THREAD_ID(ft)== WALL_ID)
{
p->user[0] = p->state.pos[0];
p->user[1] = p->state.pos[1];
p->user[2] = p->state.pos[2];

}
}

}
}

DEFINE_DPM_OUTPUT(Particle_coords_output, header, fp, p, thread, plane)
{
char name[100];
if (header)
{
if (NNULLP(thread))
cxprintf(fp,"(%s %d)\n",thread->head->dpm_summary.sort_file_name,8);
else
cxprintf(fp,"(%s %d)\n",plane->sort_file_name,8);

cxprintf(fp,"\n %10s %10s %10s",
"X", "Y", "Z");
}
else
{
sprintf(name,"%s:%d",p->injection->name,p->part_id);
cxprintf(fp,
"%10.6g %10.6g %10.6g\n", p->user[0], p->user[1], p->user[2]);
}
}
Quote:
Originally Posted by pakk View Post
You can fix it by changing your udf.

We can not tell you what is wrong in your udf, because you did not include your udf. Including the error message was a good start, because it shows that something is wrong on line 12 and possible line 45, but we can not see what is on line 12, so we can not give any advice on how to correct it.
Saidul is offline   Reply With Quote

Old   January 13, 2015, 06:23
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Line 12 is
Code:
User_Particle_Vars *user_particle_vars;
I don't know why you add this. You never use this pointer. It looks to me like you can simply delete this line...

Line 45 is
Code:
cxprintf(fp,"(%s %d)\n",thread->head->dpm_summary.sort_file_name,8);
The problem is in "thread->head->dpm_summary". How did you come to this? The structure is apparently not correct, but I don't know how you came to this structure, so I don't know what you want this part of the code to do.
pakk is offline   Reply With Quote

Old   January 13, 2015, 19:35
Default
  #5
Member
 
S. Morichika
Join Date: Aug 2014
Posts: 62
Rep Power: 12
Saidul is on a distinguished road
Ok, I got the point and trying to fix it........

Thank you.
Saidul is offline   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
udf for dpm boundary condition ucmaen Fluent UDF and Scheme Programming 0 July 15, 2014 14:33
DPM with UDF - Step-by-Step Procedure???? Prashanth FLUENT 3 April 3, 2009 18:45
So many questions in DPM & UDF - Help! URGENT! Prashanth FLUENT 0 March 3, 2009 23:26
Can someone PLEASE document the development version installation bernd OpenFOAM Installation 76 November 14, 2008 22:51
DPM - UDF for fluctuating bubble size Jaroslav Kotara FLUENT 1 April 19, 2006 10:02


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