Page 1 of 1

Variable Definition

Posted: Mon Jul 29, 2013 6:41 pm
by baila12
I am trying to implement some new equations in the cs_lagr_tracking.c solver in the Code Saturne 3.1 version. I am having some difficulty finding how/where some of the variables that I need for these equations are defined in the code. For example, I need to find viscosity and density for water and air, size of rebound particle, and magnitude of particle velocity. Also, any tips for implementing new equations would be greatly appreciated, thanks!

Re: Variable Definition

Posted: Wed Jul 31, 2013 3:12 pm
by guingo
Hi,

cs_lagr_tracking.c contains currently (almost) only functions dedicated to locate the particles in the domain at the end of the time step, and to manage the interactions between particles and boundaries (see _bdy_treatment). The physical modeling is mostly in FORTRAN subroutines; for instance, lages1.f90 contains the integration of the numerical scheme to compute particle trajectories.

This is the reason why general physical properties of the fluid are not readily available in the functions in cs_lagr_tracking.c. However, the size and velocities of particles are available : if you take a look at the function _bdy_treatment (for instance, the part concerning the elastic rebound, search fo CS_LAGR_REBOL), you will see that the diameter of a particle is stored in particle.diameter, and its ith-component of its velocity is in particle.velocity.

Best regards,
Mathieu