CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

DPM particle species index

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   July 21, 2022, 08:20
Default DPM particle species index
New Member
Join Date: Apr 2021
Posts: 17
Rep Power: 5
JeroenH is on a distinguished road
I am trying to write a UDF to determine the density as function of composition and temperature using the DEFINE_DPM_PROPERTY udf. Now I am trying to access the species index by name (as I would in a gas mixture) however this does not work for the combusting type DPM particle.

Any advise on how to do this? I have given an example of my current code below:

DEFINE_DPM_PROPERTY(rho_particle, c, t, tp, T)
Material *cond_mix = TP_MATERIAL(tp);
int ind_A = mixture_specie_index(cond_mix, "a"); /* specie index A */
int ind_B = mixture_specie_index(cond_mix, "b"); /* specie index B */

int ns;
Material *sp;
real mf[MAX_SPE_EQNS];
mixture_species_loop(cond_mix, sp, ns)
mf[ns] = TP_COMPONENT_I(tp, ns); /* component mass fraction */

rho_A = ...
rho_B = ...

real rho = 1/(mf[ind_A]/rho_A + mf[ind_B]/rho_B)

return rho;

Thank you!
JeroenH is offline   Reply With Quote


combusting particle, species mass fraction, udf code

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
VOF, DPM model - particle penetrate phase interface issue! dwoh12 Fluent Multiphase 1 May 19, 2022 23:49
DPM: Table of Distance Traveled of each Particle JacobMillerChemE Fluent Multiphase 0 July 17, 2020 13:56
[OpenFOAM] Paraview 3.98 - errors when saving geometry file pajot ParaView 1 September 28, 2013 10:45
Dpm model, setting particle number wagnerqb FLUENT 7 March 23, 2013 21:06
Burning Particle (DPM) sega FLUENT 2 July 31, 2010 04:08

All times are GMT -4. The time now is 00:14.