Post reply

Note: this post will not display until it's been approved by a moderator.

Message icon:

Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

shortcuts: hit alt+s to submit/post or alt+p to preview

Topic Summary

Posted by: sfotovati
« on: June 26, 2012, 12:48:31 AM »


But apparently, if you want to combine the above with define_dpm_body_force, it cannot be done. All you mentioned is correct if one does not aim to combine it with macros which consider tracked particles in sequential order.

Thank you anyway,
Posted by: admin
« on: June 20, 2012, 05:32:31 PM »

To loop over all the injections, you first need to get a list of all the injections you have defined. This can be done using the following command

Injection *Ilist = Get_dpm_injections();

You will also have to define a generic injection pointer

Injection *I;

Now, looping over all the injections can be done using the following command

loop(I, Ilist)
You can loop over all the particles from a given injection. To do that, you first need to define a particle pointer

Particle *p;

Looping over all the particles can be done using

loop(p, I->p)
In unsteady DPM calculations, if you want to initialize the transient particles, you will require the following loop
loop(p, I->p_init)

You can use these loops to fetch particle data using particle specific macros like

P_DIAM(p) for particle diameter
P_T(p) for particle temperature etc.
Posted by: sfotovati
« on: June 20, 2012, 04:34:36 PM »

William, Even though I used those macros for obtaining cell and thread of the particle, it still does not let me to loop over other particles. So I am still recieving the same error!  :-[

Posted by: sfotovati
« on: June 20, 2012, 07:26:35 AM »

Thanks for the hint.

I am wondering to know if I use the above to obtain cell and thread, then can I use begin_particle_cell_loop or not?
Posted by: william
« on: June 19, 2012, 08:40:24 AM »

You should use the following to get the cell in which the particle is in:

cell_t c  = RP_CELL(&(tp->cCell));
Thread *t = RP_THREAD(&(tp->cCell));
Posted by: sfotovati
« on: June 17, 2012, 12:45:22 AM »

hi every body,

I wrote the following UDF:

# include "udf.h"
# include "stdio.h"
# include "dpm.h"
# include "mem.h"
# include "surf.h"
# define mag 2.0
    double bforce=0., Bc=0.;
    Thread *t;
    cell_t c;
    Particle *pi;
    t = P_CELL_THREAD(p);
    c = P_CELL(p);
    return bforce; 

But as I am running it it gives me the following error:

FLUENT received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object: #f

Can anybody help me please?