DPM update a scalar at reflection?
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.
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.
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?
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.
|All times are GMT -4. The time now is 03:28.|