|
[Sponsors] |
January 8, 2015, 21:07 |
can't compile DPM UDF
|
#1 |
Member
S. Morichika
Join Date: Aug 2014
Posts: 62
Rep Power: 12 |
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 |
|
January 9, 2015, 08:33 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
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. |
|
January 12, 2015, 19:59 |
|
#3 | |
Member
S. Morichika
Join Date: Aug 2014
Posts: 62
Rep Power: 12 |
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:
|
||
January 13, 2015, 06:23 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Line 12 is
Code:
User_Particle_Vars *user_particle_vars; Line 45 is Code:
cxprintf(fp,"(%s %d)\n",thread->head->dpm_summary.sort_file_name,8); |
|
January 13, 2015, 19:35 |
|
#5 |
Member
S. Morichika
Join Date: Aug 2014
Posts: 62
Rep Power: 12 |
Ok, I got the point and trying to fix it........
Thank you. |
|
|
|
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 |