Variable Definition

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
baila12

Variable Definition

Post 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!
guingo
Posts: 31
Joined: Wed Apr 04, 2012 2:52 pm

Re: Variable Definition

Post 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
Post Reply