CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   accessing dpm data commands, help!!! (http://www.cfd-online.com/Forums/fluent/88149-accessing-dpm-data-commands-help.html)

TedBrogan May 9, 2011 16:51

accessing dpm data commands, help!!!
 
hey,

does anyone know where all of the random commands used in udf's by fluent and even some users on here can be found? i'm talking about things that i can't find documented anywhere that seem to be critical for some udf's. for example:

p->stream_index = -1 to turn off a particle stream
loop(I, Ilist) { } to loop through all injections

i cant find documentation on these anywhere. it makes me wonder what other commands are out there that could really help me. can i go through any of the "xxx.h" files to find these?

in particular, im trying to set the start and stop time of an unsteady particle injection in a udf, but i can't find a macro for that in fluent's udf manual. id also like to know where people find these obscure commands so i can help myself more easily in the future.

thanks!
:D

Bernhard May 10, 2011 11:02

Did you check dpm.h in the /src dir of your installation (for me in /opt/packages)? It is nice for accessing information of particles, but you should be very carefull to changes the variables from your udf.

TedBrogan May 10, 2011 11:28

Thank you for the reply, Bernhard.

I did look through all dpm_xxx.h and dpm.h files, and dpm_types.h seems to be the most resourceful file where things like P_INIT_RHO(p) or P_POS(p) are defined. Here's one line of code from the file:

#define P_INIT_RHO(p)((p)->init_state.rho)

To me, that means I could use either the macro P_INIT_RHO(p) or p->init_state.rho in a udf and get the same result. There's nothing defined in this file for start/stop time, however. The deeper question to me is where are things like init_state.rho or state.pos defined in the first place? That file is the one that would probably list all data access variables.

Bernhard May 11, 2011 02:44

I can find the time_of_birth real in the tracked_particle_struct

I'm not exactly sure what time you mean exactly with start/stop time, but I suppose those are solver settings, that you cannot change for a single particle.

TedBrogan May 19, 2011 16:58

I got it now, so here's how it works.

loop(p,I->p_init)
{
I->unsteady_start = ...
I->unsteady_stop = ...
}

You need to have initial values inserted in the GUI other than 0 for both or FLUENT will completely ignore the injection.


All times are GMT -4. The time now is 07:02.