Get phase diameter udf fluent

In summary, Michela is working on a complex simulation project involving the encapsulation of pancreatic islets in a simple chamber. She is using a udf to calculate the coating thickness and is encountering some problems with declaring multiple phases and using the C_PHASE_DIAMETER function. She also has an alternative idea of obtaining the coordinates of the islets and coating based on the volume fraction, and is unsure if the Euler-Euler model or DPM is more suitable for her problem.
  • #1
michimichi88
1
0
Hi everyone! I'm trying to simulate the encapsulation of pancreatic islets in a very simple chamber. It is made of one cylinder with diameter of 10mm, a coaxial capillary of diameter 1mm. In the cylinder there is a oilic phase and in the capillary flow polymeric material and islets. when islet plus polymer exit from capillary,they meet oil in a convergent situated at the base of the cylinder. This convergent is connected to another capillary, where flow encapsulated islets.
In the small capillary flow polymeric material and islet(respectively 87% and 13% of volume fraction), in the large capillary flows oil(100%). At the outlet of the small capillary, the islet should come encapsulate, thanks to the action of the instability of Rayleigh-Plateau and also to the action of the oil on the polymeric material. In other words these islets are inside a coating of polymeric material (named conformal). These two flows (oil and polymeric material plus islets) are coaxial flows.
I am trying to write a udf that permits me to calculate the coating thickness.
My idea is to create planes in the convergent and evaluate on them the coating thickness by a volume fraction study. In other words, on this plane my udf must calculate the volume fraction of islets and water, must remove the cells that contains a vof<0.0505, and least must evaluate the diameter of these two phases.
I think it's possible to do, but i have several problems.
First of all, I don't know if it's possible declare two or more phases when I use, for example, C_VOF(c,t). "t" is my thread: is it possible to declare two phase, using for example pt[1,2]?
Another problem is the function C_PHASE_DIAMETER(c,t). In various forums I found it use in this way "C_PHASE_DIAMETER(f,t). But, why put "f" and no "c"?

My udf is this:

/*C_PHASE_DIAMETER*/

#include "udf.h"
#include "stdio.h"
#include "stdlib.h"

DEFINE_EXECUTE_AT_END(diameter)
{
Domain *d=Get_Domain(1);
Thread **pt;
Thread *t;
cell_t c;
float diam_islet;
float diam_water_islet;
float radius_islet;
float radius_water;
float coating;
float vof_islet;
int ID[3]={3,10,13};
int i;
diam_islet=0.;
radius_islet=0.;

i=0;

mp_thread_loop_c(t,d,pt)
{
begin_c_loop(c,t)
{

for(i=0;i<=2;i++)
{
t=Lookup_Thread(d,ID);
vof_islet = C_VOF(c,pt[2]);
vof_water = C_VOF(c,pt[1]);
printf("%f\n", vof_islet);

if (vof_islet>0.0505 && vof_islet<=1)
{

diam_islet=C_PHASE_DIAMETER(c,pt[2]);
printf ("islets diameter: %f\n",diam_islet);
}
}
if (0.0505<=vof_water<=1)
{

diam_water=C_PHASE_DIAMETER(c,pt[1]);
printf("water diameter: %f\n", diam_water);
}

radius_islet=diam_islet/2;
printf("radius_islet: %f\n", radius_islet);

radius_water=diam_water/2;
printf("radius_water: %f\n", radius_water);

coating=radius_water-radius_islet;
printf("coating thickness is: %f\n", coating);

}
end_c_loop(c,t)
}
}}

I have an alternative idea: I can create a udf that gives back coordinates of cells in this way: I want to get x max and x min, y max and y min and z max and z min of the islets and of the coating based on the volume fraction (based on passage between different phases). In other words, I want to obtain coordinates max and min about the interface of my phases. Is it possible?
Another question is the following: I'm using an Euler Euler model, but the volume fraction of the islets is approximatively 13%. Is this method suitable for my problem, or DPM is more appropriate?
Thanks a lot!
Michela
 
Engineering news on Phys.org
  • #2


Hello Michela,
Thank you for sharing your interesting simulation project with us. It sounds like you are studying a very complex system with multiple phases and flows, and I can see that you have put a lot of thought and effort into your udf. Let me try to address your questions and provide some suggestions.

Firstly, it is possible to declare multiple phases using the C_VOF(c,t) function. The "t" in this function stands for the thread, and you can declare multiple threads for different phases in your simulation. For example, you can define a thread for the oil phase and another thread for the polymeric material plus islets phase. Then, in your udf, you can use C_VOF(c,oil_thread) to get the volume fraction of the oil phase in a specific cell, and C_VOF(c,poly_thread) to get the volume fraction of the polymeric material plus islets phase in the same cell.

Regarding your question about using "f" instead of "c" in the C_PHASE_DIAMETER function, "f" stands for the face, while "c" stands for the cell. This function is typically used to calculate the diameter of a specific phase at a specific face. For example, if you want to calculate the diameter of the oil phase at a certain face, you would use C_PHASE_DIAMETER(f,oil_thread).

Now, for your alternative idea of obtaining the coordinates of the islets and coating based on the volume fraction, I think it is a good approach. You can use the C_VOF function to get the volume fraction of the islets in a specific cell, and then use the C_CENTROID function to get the coordinates of that cell. This way, you can get the coordinates of all cells with a volume fraction above a certain threshold, and then you can use those coordinates to calculate the dimensions of your islets and coating.

Finally, as for your question about using the Euler-Euler model or DPM, it really depends on the specific characteristics of your system and what you are trying to study. The Euler-Euler model is suitable for multiphase flows, while DPM is more suitable for particle-laden flows. You may want to consult with your colleagues or supervisor to determine which model is more appropriate for your specific problem.

I hope this helps and I wish you all the best in your simulation project. Let me know if you have any further questions, and I will
 

1. What is the "Get phase diameter udf fluent" function used for?

The "Get phase diameter udf fluent" function is used in the Fluent software to obtain the diameter of a specific phase in a multiphase flow simulation. This information can be used to analyze the behavior of different phases and their interactions in a system.

2. How do I use the "Get phase diameter udf fluent" function in my simulation?

To use the "Get phase diameter udf fluent" function, you will need to create a user-defined function (UDF) in the Fluent software. This UDF should include the necessary code to calculate the phase diameter and output the results. The UDF can then be compiled and loaded into your simulation.

3. Can I use the "Get phase diameter udf fluent" function for any type of multiphase flow?

Yes, the "Get phase diameter udf fluent" function can be used for any type of multiphase flow simulation in Fluent. This includes simulations with two or more phases, such as gas-liquid, liquid-liquid, or solid-liquid flows.

4. Is the "Get phase diameter udf fluent" function accurate?

The accuracy of the "Get phase diameter udf fluent" function depends on the accuracy of the inputs and the code used in the UDF. It is important to carefully validate and test your UDF before using it in a simulation. Additionally, the function may have limitations in certain scenarios, such as when there is a high volume fraction of one phase compared to the others.

5. Can I modify the "Get phase diameter udf fluent" function for my specific needs?

Yes, the "Get phase diameter udf fluent" function is a user-defined function, which means that you can modify the code to suit your specific needs. However, it is important to have a strong understanding of the Fluent software and UDF development before making any modifications to the function.

Similar threads

  • General Engineering
Replies
1
Views
3K
Replies
12
Views
1K
  • Mechanical Engineering
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
7K
  • Math Proof Training and Practice
2
Replies
46
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
3K
  • Advanced Physics Homework Help
Replies
1
Views
1K
  • Advanced Physics Homework Help
Replies
1
Views
2K
Replies
2
Views
6K
  • Other Physics Topics
Replies
10
Views
2K
Back
Top