CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   DPM update a scalar at reflection? (http://www.cfd-online.com/Forums/fluent-udf/80937-dpm-update-scalar-reflection.html)

Fluent_user October 11, 2010 16:53

DPM update a scalar at reflection?
 
Hi all,

I am working on writing a tribocharging UDF to simulate the flow of particles down a dispenser tube. The tube consists of a solid grooved core surrounded by a smooth outer sleeve.

So as the particle travels, its max possible distance from the centerline of the tube is constant, but the minimum possible distance changes due to the shape of the inner core.

The number of times a particle has collided with one of these surfaces affects the charge accumulated on it.

So my question is:
Can I set a scalar for each particle that will increment by 1 each time that particle collides with a wall?


The outer sleeve is the transparent red solid. The length of this is the region I am trying to right the UDF for.
http://i54.photobucket.com/albums/g8...penserAssy.jpg

Thanks all,
Ray

sreerao October 13, 2010 07:48

Hi

Yes you can setup a user defined scalar and initialise it in scalar updates. However, you may need to define number of scalars based on your particle number in your domain.

You can check with single particle and once you are happy with the results, you can define other scalars later.

Sree

Fluent_user October 13, 2010 16:00

By default the new variable created updates at each time step, correct?

If this is the case, I was thinking of having the variable run a check at each time step and only increment 'number of collisions' if the particle has just collided with one of the tube surfaces.

How will the UDF know to only update when there is a collision?

Thanks,
Ray

sreerao October 14, 2010 05:26

Hi

You are right. One way you can do this is writing and reading the number of collisions to/from a file. Make sure you append the file correctly each time.

Did you ever tried user defined memories? I feel that these memory locations wont be updated unless otherwise you initialise them every time. if you dont initialise them, they should have the previous value. (Just double check in the FLUENT manual what they say about user defined memory locations).

However, I feel confident about the writing and reading from a file, which wont be a problem from udf.

Sree


All times are GMT -4. The time now is 03:28.