Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get mass fraction of a multi-component particle injected into a tank using DPM+UDF

Status
Not open for further replies.

Sacaq

Mechanical
Nov 4, 2014
42
0
0
TW
One particle composed of one evaporating and one inert material was injected into a tank.

The mass fractions of original evaporating and inert material were 0.8 and 0.2, respectively.
They could be set up through Define→Injection→Component.

How to get evaporating mass fraction remained in this multi-component particle using UDF in Fluent per time-step?

The macro provided in manual were not for multi-component particle.
I can't use P_VFF(p) in a case injecting multi-component particle.
Could anyone kindly help?
THank you!
 
Replies continue below

Recommended for you

TP_COMPONENT_I(p,is) is the macro that gives you mass fraction inside each particle. 

I will add an example here on how to use it:

int is;
int nc = TP_N_COMPONENTS(p); /* number of particle components */
printf("\n######");
for (is = 0; is < nc; is++)
{
int gas_index = TP_COMPONENT_INDEX_I(p,is); /* index of vaporizing component in the gas phase */
printf(" gas_index=%d is=%d TP_COMPONENT_I=%e ",gas_index,is,TP_COMPONENT_I(p,is)); 
}
printf("#######$\n");

To look in closely, 

TP_N_COMPONENTS(p) gives you the total number of components inside each particle. 

TP_COMPONENT_INDEX_I(p,is) gives gas index. if the component is not meant to evaporate, this gives -1. 

and TP_COMPONENT_I(p,is) actually gives you the mass fraction.
 
Status
Not open for further replies.
Back
Top