CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   Particle Transport Modelling - Fate Diagnostics (http://www.cfd-online.com/Forums/cfx/82662-particle-transport-modelling-fate-diagnostics.html)

leeportnoff December 1, 2010 22:29

Particle Transport Modelling - Fate Diagnostics
 
At the end of each run, the particle fate diagnostics gives Particles 'Left Domain' and Particles 'Collected on walls.'
To find my solution, I adjust inputs until 50% of the particles are collected on the walls and 50% leave the domain. This takes a lot of manual adjusting.
Any ideas on how to automate?

leeportnoff December 15, 2010 11:44

Transient Particle Diagnostic Routine
 
Ok. I think I am very close now.

In CFX\Samples\UserFortran there is a file called pt_termination.F This custom FORTRAN routine returns a 0 if the particle has impacted a surface or 1 if the particle is still alive.

I compiled the routine to a .dll. Then in 'Pre,' I Created a user routine with option 'Transient Particle Diagnostic Routine' Then I created a Function that calls the routine.

So the remaining question: how do I access the function and sum the transient particles?

Julian K. November 18, 2011 13:05

Quote:

In CFX\Samples\UserFortran there is a file called pt_termination.F This custom FORTRAN routine returns a 0 if the particle has impacted a surface or 1 if the particle is still alive.
Hi leeportnoff!

Did you find a solution to your problem?

I wonder, if you can help me with my problem:

I am simulating the impaction of particles on a moving circular cylinder using Lagrangian particle tracking. I found out, that CFX does not consider the particle's radius while checking if a particle has collidet with the cylinder's surface. Thus, the particle is captured, when its centre coordiantes of the coincide with the cylinder surface.
However, my case requires, that the particle is captured when the particle surface and the cylinder surface touch. Hence, I need to implement this simple algorithm:

Code:

if (x < r_part + r_cyl)
then impaction
else no impaction

I posted this problem here.

leeportnoff November 18, 2011 14:43

Transient Particle Diagnostic Routine
 
I was not able to figure out how to use pt_termination.F. I solved my problem with standard 'particle fate diagnostics.' One piece of advice... If particles are smaller than 10 um, none of the drag models work correctly. You need to write a custom drag function that incorporates the cunningham slip correction factor.

Julian K. December 2, 2011 18:35

Thanks for your answer.

Quote:

Originally Posted by leeportnoff (Post 332709)
I solved my problem with standard 'particle fate diagnostics.'

How did you manage to solve your problem using the 'particle fate diagnostics'? Me, I also need to know how many particles leave/enter the domain, are collected by walls, or get lost by an integration error for each individual time step. Is the a way to extract this information automatically, or do I have to go through the output-file and look at each time step manually?

leeportnoff December 2, 2011 21:28

I was not able to find a way to automate. I'm sure it can be done, but I after a few days, I gave up.
So I did have to read each Solver output file. (After I changed the particle diameter, I only needed to solve one iteration to get the next Fate Diagnostics for the other particle size, so at least I could solve one flow field and run through several particle sizes.)
My approach to this problem was as follows:
I started with the tutorial "flow through a butterfly valve." From that I learned how to create the flow field, specify the particles and create injection.
The next step is to define your impaction surface by setting the Restitution coefficients of a wall to zero.
Insert > Boundary, select the surface, Boundary Type is Wall, In the Field Values tab, for select velocity restitution coefficient, enter 0 for the perpendicular and parallel coefficients. In my case, I think just putting 0 in either coefficient works also.
I needed to create a custom Fortran routine because my particles were smaller than 10 um. That was the hardest part, but would not be necessary for particles larger than 10 um.

Julian K. December 5, 2011 10:23

Thanks Lee!

I need to run a transient simulation and look at the particle fate every time step. This is not possible to do manually, because there are too many time steps. Thus, I have to find a way to automate the procedure. Maybe I can read the output file in MATLAB and then write an algorithm, which analyses the particle fate at every single time step. This is not very elegant. It would be nicer to write a User FORTRAN, which outputs the particle fate at every time step.

leeportnoff December 5, 2011 10:55

I see. Well, it is just a matter of figuring out how to use pt_termination. Of course it is easy with just a few steps. But what those steps are, I haven't figured out. Good luck. Please post here if you figure it out, and I will do the same.

Julian K. December 8, 2011 14:00

1 Attachment(s)
Quote:

Originally Posted by leeportnoff (Post 334504)
I was not able to find a way to automate. I'm sure it can be done, but I after a few days, I gave up.

I wrote a Matlab code, which extracts the number of particles which entered a domain, were collected on walls and go lost due to an integration error from the output-file of a CFX simulation. Eventually, the code calculates the capture efficiency.

You find the program and a sample output file in the attachement.

Julian K. January 12, 2012 10:48

I found a way to solve my problem using a User Fortran. I posted the solution here.


All times are GMT -4. The time now is 18:07.