×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

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

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!

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

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources