 ## Fluids

Topics relate to Fluent, CFX, Turbogrid and more

• Diogo Martinho
Subscriber

Dear all,

I am modelling an electrochemical cell, and I am planning to use the mixture model. I have been trying to understand throught the UDF guide and online forums (others posts) how I should define the different pointers to access the different phases (primary phase is liquid and secondary gas).
So, for example, equation 28 (attached), s^k is the volume fraction of the phase k (all the others are constants) and I would like to define this in a DEFINE_DIFFUSIVITY. I know that volume fraction is C_VOF but I really have a hard time understanding how to call or define the different phases/threads/...

Is there anyone that could explain it a bit more?

Kind regards, • Atharva Nagarkar
Subscriber

Hello

Please find the links below from the Ansys UDF Manual. I have attached the documentation on the basic data types used in Ansys Fluent as well as Multiphase specific data types. Additionally, there is a link of another forum discussion where primary and secondary phase threads are defined. Please refer to the UDF code mentioned in the forum discussion link.

1.7. Data Types in Ansys Fluent

1.9.1. Multiphase-specific Data Types (ansys.com)

If you are not able to access the links, please refer to this forum discussion: Using Help with links (ansys.com)

Thanks!

• Diogo Martinho
Subscriber

Hi,

Can I just ask you as an overview. If I wanted to define something as the previous equation could I use something like:

Thread **pt;  /* initialize pt  */

So, at the end it would look something like:

DEFINE_DIFFUSIVITY(diff_uds, c, t, uds_i)

{

double diff = Diff_nil, lam;

double T = T0;

Thread **pt;  /* initialize pt  */

if (uds_i == C_H2)

{

if (Zone_ID == Membrane)

diff=Diff_H2(c,t)*pow(Get_Porosity(c,t),1.5)*C_VOF(c,pt);

else if (Zone_ID == Nelectrode || Zone_ID == Pelectrode)

diff=Diff_H2(c,t)*pow(Get_Porosity(c,t),1.5)*C_VOF(c,pt);

else if (Zone_ID == ext_neg)  // This is changed. It was commented out previously.

diff=Diff_H2(c,t)*pow(Get_Porosity(c,t),1.5)*C_VOF(c,pt);

else

diff=Diff_nil;

Kind regards,

Diogo 