I'm using the lagrangien module of Code_Saturne for studying the dispersion of particles. What I would like to do is to define an inlet boundary condition for particles which is discontinued : at a certain time T0 (that comes after a restart) the particles are entering the domain with a certain velocity during a duration DT then the inlet of particles is stopped. The dispersion is then calculated based on the flow field.
So the BC for particles is only an inlet between T0 and (T0+DT).
Could you help me with that? Which is the subroutine that I need to modifiy with a test like :
You would need to use the "cs_user_lagr_boundary_conditions" user function (see examples), and based on the time step (cs_glob_time_step structure), modify the injection frequency or number of particles for the selected zone.
Thank you very much for your answer Yvan.
Unfortunately, I don't have access to CS6 for the moment due to configuration issues.
Would I be able to the same thing in uslain() subroutine for CS4?
Both...
I will try an upgrade for using these improvements of the Lagrangian module.
Another question : it's not clear for me how to play with time step, frequency and number of particles for defining my injection between (and only between) t=t_start and t=t_stop?
Thank you very much for your help, I've installed CS6 and your solution is actually working!
I would need another information on cs_glob_time_step structure : when I work with a constant time step, I can use cs_glob_time_step->dt_ref to retrieve the current time step but when I use a varying time step, I saw in the doxygen that the time step is the array cs_glob_time_step->dt[3].
So my question is the following : how can I retrieve the (current) time step when it's varying over the computation?