Transient Particle Tracking in CFX

  • Last Post 17 June 2019
  • Topic Is Solved posted this 21 April 2019

Hi everyone,


I am trying to simulate particle transport in a pipe using transient analysis due to the transient velocity profile at the pipe inlet. A certain amount of particles needs to be injected at time zero (or first time step) at the pipe inlet. However, under transient analysis, the particle injection method has to be mass flow rate or number rate. Can particles be injected using total number under transient analysis in CFX?


I have tried to use variable expressions to define particle mass flow rate which depends on flow time. For exampel, if time step was 0.001 s,


swtich = if(t < 0.002,1,0)

and in particle mass flow section I entered

mdot * swtich 

where mdot represents the mass flow rate.

However this method does not work as it reports an error after the simulation has been run.


Any help is appreciated. Thank you.


Order By: Standard | Newest | Votes
abenhadj posted this 23 April 2019

In CFX number of positions or number of injected particles per unit time can be specified. Total number is only for steady state. TrĂ½ using very small number at first instead of zero.

Best regards, Amine posted this 23 April 2019

Hi Amine,

Thank you for your answer. 

For the problem I am trying to simulate, the particles are injected only at the inital time step. Because the velocity boundary condition at the inlet is time dependent, transient analysis must be used. Is there a way to release particles only at the beginning of the simulation in CFX?

abenhadj posted this 23 April 2019

As far as I know not directly. But you can just use adjust the number of positions to be dependent on time and just set to zero after the first time step. Do not set the mass flow rate to zero.

Best regards, Amine

abenhadj posted this 23 April 2019

Or set the flow rate to zero but the number of positions proportional to it.

Best regards, Amine posted this 23 April 2019

Thank you so much for the advice. The method works!

sasingeniero posted this 16 June 2019



I have the same difficulty as you, could you please provide more details about the expressions that worked for you, for both Number Rate and Mass flow rate?


Thank you,


Sebastian posted this 17 June 2019

Hi Sebastian,


Please see if following steps is helpful to you. I solve my problem using CCL expression.


- Enable transient statistics.

- Define following expressions of the form:


switch = if(t < tinjection,1,0)

tinjection = 0.010 [s]

Mpdot = 9.41e-4 [kg/s]


where tinjection is the particle injection interval and Mpdot is the required mass flow rate.


- Define the Particle Mass Flow Rate using an expression:




- Choose “Proportional to Mass Flow Rate” for “Number of Positions” and define particle number Np.


Based on this setup, after starting simulation, N particles are injected every time step until flow time >= tinjection


N = time step size * Mpdot * Np



abenhadj posted this 17 June 2019

Thanks Jianan.

Best regards, Amine