Dear All,
the GUI leads us to specify either single particle diameter or diameters of normal distribution.
I would want to impose an arbitrary size distribution. The EXAMPLEs in cs_user_lagr_boundary_conditions.c do not tell us how to do this.
I know of the inverse transform sampling to generate a random variable for a given distribution. But how to do this in Code_Saturne ?
Is this doable at all?
Thanks
Anand
User defined Particle Diameter Profile
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4209
- Joined: Mon Feb 20, 2012 3:25 pm
Re: User defined Particle Diameter Profile
Hello,
There is no reason why this could not be doable. Which version of the code are you using ?
Regards,
Yvan
There is no reason why this could not be doable. Which version of the code are you using ?
Regards,
Yvan
Re: User defined Particle Diameter Profile
Hello,
I am using CS V 5.07.
Yes, I found how to do it, although in a less elegant way.
Generate the sampled values from a distribution and store in a text file.
Read the file once for all (using some static declarations) and input those values right into "cs_real_t diam = " for each nbclas and time step.
Regards
Anand
I am using CS V 5.07.
Yes, I found how to do it, although in a less elegant way.
Generate the sampled values from a distribution and store in a text file.
Read the file once for all (using some static declarations) and input those values right into "cs_real_t diam = " for each nbclas and time step.
Regards
Anand
-
- Posts: 4209
- Joined: Mon Feb 20, 2012 3:25 pm
Re: User defined Particle Diameter Profile
Hello,
That's ugly. You can do it in a cleaner manner using the cs_user_lagr_in or cs_user_lagr_new_p_attr functions from the cs_user_lagr_particle.c user file.
Best regards,
Yvan
That's ugly. You can do it in a cleaner manner using the cs_user_lagr_in or cs_user_lagr_new_p_attr functions from the cs_user_lagr_particle.c user file.
Best regards,
Yvan