CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Using UDF to alter particle size (https://www.cfd-online.com/Forums/fluent-udf/36690-using-udf-alter-particle-size.html)

Tumppi May 18, 2005 04:05

Using UDF to alter particle size
 
Hello everybody

Kind of newbie quetion here. I'm trying to alter the particle size (diameter) with UDF in fluent. I made a little code for testing purposes and interpreted it and then defined an injection which uses this UDF. But when I dislay particle track, the diameter doesn't change. I used DEFINE_DPM_LAW as define function. If someone could help me it would be great.

Allan Walsh May 18, 2005 13:45

Re: Using UDF to alter particle size
 
I assume you are manipulating P_DIAM(p). Print out P_DIAM(p) in your UDF, before and after manipulating it. Depending on particle type (i.e. inert, combusting, etc.) FLUENT could reset it somewhere else.

Good luck.

Tumppi May 23, 2005 07:50

Re: Using UDF to alter particle size
 
Well seems thet I'm dooing something really wrong. When I put printf lines to see what happens I only get 0 values for P_DIAM(p) and its only reported once at the start.

If someone can guide me to right direction that would be nice.

Allan Walsh May 23, 2005 11:13

Re: Using UDF to alter particle size
 
Do the values for P_DIAM(P) match up with what FLUENT shows if you do a step-by-step particle tracking? They should.

If it is only getting to your print statement once, it could be that FLUENT is only using your UDF once and then setting the particle to use the next law. Can you check that.


Tumppi May 25, 2005 03:21

Re: Using UDF to alter particle size
 
I think I found the answer why I cant get the UDF to work. If you read part 19.9.3 Particle Types at the manual you can see that only law 1 is active when one uses inert particle (which I did). So I gues that I have to use a droplet particle type to get my UDF to work, am I right?

Thank you for your help so far Allan.

Tumppi May 27, 2005 03:23

Re: Using UDF to alter particle s. Problem Solved
 
Well I solved the problem and got it to work with inert particle, I had selected wrong law from the custom laws panel at injection properties. When I put my custom law as Law 1 I got it to work.

Thanks for help.

tagada April 7, 2011 10:17

Hello Tumppi,

I'm very interested to have a look on your UDF, I'm also trying to alter the particle size with UDF an,d it doesn't work.
This is my code:

#include "udf.h"
#include "dpm.h"

DEFINE_DPM_LAW (diam_particle, p, ci)
{
/* compute new particle diameter */
P_DIAM(p) = 6*pow((0.015/2*0.7*1000.0*9.81)* 0.000300*P_POS(p)[0],1/3);
}
Thank you

liliana February 28, 2019 08:27

UDF to consider the particle size in DPM
 
Hi all,

I am simulating a situation where I have a particle travelling in a fluid. The gap where the fluid flows is too small, and the particle size became important in this case. Does anyone know how can I use an UDF to consider the particle size?

I would be an UDF to make the collision between the particle and the boundary when the distance between the "point" (particle in DPM) is equal or smaller than the diameter of the particle.

Thanks!


All times are GMT -4. The time now is 17:29.