I'm using Code_Saturne V3.2 for a case of gas-particle flow. For particulate phase, I have particles of two differents diameters class. I would like to write the results of velocity component in three directions for each class of particles. So I set as following :
In uslag1.f90: I set :
- iactvx = 1
- iactvy = 1
- iactvz = 1
and to activate statistic per group
- nbclast = 2
In uslag2.f90, I set:
iczpart(iclst)= 1 to define the first group which belong the first class of particle
iczpart(iclst)= 2 to define the second group which belong the second class of particle
In cs_user_particle_tracking.f90, i set velocity profil for each class of particle.

My problem is that I only obtain in post-processing a variable called: Par_vel_group__1 for velocity of first class of particle and Par_vel_group__2 for velocity of second class of particle. How can i do to obtain the velocity component of each particle class and also the r.m.s velocity of each component of each class?

I send you also my uslag1.f90, uslag2.f90 and cs_user_particle_tracking.f90 .

Are you trying to postprocess data on the particle mesh or the Eulerian mesh ?

As you mention statistics, I assume it is the Eulerian mesh.

Note that version 3.2 is not maintained anymore. Some fixes were done between version 3.2 and 4.0 for the Lagrangian mesh user variables, but not much has changed that I remember for the statistics.

I'm not too sure what you mean by "velocity component of each particle class" and also the r.m.s velocity of each component of each class? If you also want variances, they are also available, and easy to activate using the GUI.

I'm not an expert on the theoretical aspects of the Lagrangian module, so I might have misunderstood your question...

Thanks for your quick answer.
I'm trying to poss-process data on the Eulerian mesh.

I mean that I expected to have a results as:
For the first class
-Par_vel_group__1_X in X-direction
-Par_vel_group__1_Y in Y-direction
-Par_vel_group__1_Z in Z_direction
For the second class
-Par_vel_group__2_X in X-direction
-Par_vel_group__2_Y in Y-direction
-Par_vel_group__2_Z in Z_direction

But for now, i obtained only Par_vel_group__1 for the first class and Par_vel_group__2 for the second class. I guess it is the mean of the velocity component in three directions.

And for the variance, i aspected something like:
-var_Par_vel_group__1_X
-var_Par_vel_group__1_Y
and so on ...

I hope that my question is more easily understood.

Are you using ParaView ? Did you check that Par_vel_group__1, for example, is not a vector (look for components).

I'm not sure, and don't have the time to check right away, so this is just a quick suggestion ,which might be useful, but it's easy to check first, before spending more time on details.

Im using Paraview4.3.1. I checked that the Par_vel_group__1 is a scalar and not a vector (I see that all the statistic variable of particulate phase on Eulerian mesh is a scalar).

For more informations, all the scalar that I obtained related to particulate phases are:
- Part_vol_grp__1 (Volume fraction of group 1)
- Part_vel_grp__1 (Velocity of group 1)
- Part_sta_grp__1 (Statistic weight of group 1)
- var_Part_grp__1 (Variance of Velocity of group 1)
and the same scalars for group 2:
- Part_vol_grp__2 (Volume fraction of group 2)
- Part_vel_grp__2 (Velocity of group 2)
- Part_sta_grp__2 (Statistic weight of group 2)
- var_Part_grp__2 (Variance of Velocity of group 2)

Additionnally, I obtained the scalars following:
- Part_vol_frac
- Part_velocity_X
- Part_velocity_Y
- Part_velocity_Z
I guess those scalars are the mean value of 2 groups for particulate phase. So I have a mean value of component velocity of 2 groups but not the component velocity of each group.

The only vector variable that I obtained is
- Velocity (Velocity of gas phase)

Looking at the Lagrangian source code (especially in lagopt.f90), I find references to separate components for velocity statistics, but am not sure how they interact with multiple classes.

I would recommend first trying to activate as much statistics post-processing as you can with the GUI, using subroutines only for advanced aspects.

Also, I recommend moving to version 4.0, though this specific aspect is probably not so different.