|
[Sponsors] |
March 22, 2007, 01:01 |
DEFINE_DPM_OUTPUT
|
#1 |
Guest
Posts: n/a
|
Hi,I want to use the DEFINE_DPM_OUTPUT to get the droplet information(spray dry) form the sample plane that i constructed according to the command:Surface/plane.The DEFINE_DFINE_OUTPUT is shown below :
#include "udf.h" #include "dpm.h" DEFINE_DPM_OUTPUT(injetion_output, header, fp, p, thread, plane) { char name[100]; if (header) { if (NNULLP(thread)) printf(fp,"(%s %d)\n",thread->head->dpm_summary.sort_file_name,11); else printf(fp,"(%s %d)\n",plane->sort_file_name,11); printf(fp,"(%10s %10s %10s %10s %10s %10s %10s" " %10s %10s %10s %10s %s)\n", "X","Y","Z","U","V","W","diameter","T","mass-flow", "time","melt-index","name"); } else { sprintf(name,"%s:%d",p->injection->name,p->part_id); printf(fp, "((%10.6g %10.6g %10.6g %10.6g %10.6g %10.6g " "%10.6g %10.6g %10.6g %10.6g %10.6g) %s)\n", p->state.pos[0], p->state.pos[1], p->state.pos[2], p->state.V[0], p->state.V[1], p->state.V[2], p->state.diam, p->state.temp, p->flow_rate, p->state.time, p->user[0], name); } } I compiled the programme after the spray dry calculation is completed.The compiling process is success,but when i carry the order:Report/Discrete phase/sample, the data is unable to appendix the to file. Also the pointers to the particle *p and to the thread *t are all NULL Who can tell me why? Thank you very much! Lily |
|
March 22, 2007, 13:05 |
Re: DEFINE_DPM_OUTPUT
|
#2 |
Guest
Posts: n/a
|
Not sure exactly what you are doing, but you may have to use the RP_CELL and RP_THREAD macros to get Cell and Thread from the Particle Structure. See the UDF examples in the manual.
|
|
|
|