How to get mass fraction of a multi-component particle injected into a tank using DPM+UDF
How to get mass fraction of a multi-component particle injected into a tank using DPM+UDF
(OP)
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!
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!





RE: How to get mass fraction of a multi-component particle injected into a tank using DPM+UDF
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.