My Project
programmer's documentation
Functions
cs_lagr_agglo.c File Reference
#include "cs_defs.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
#include <assert.h>
#include "cs_lagr_agglo.h"
#include <limits.h>
#include <stddef.h>
#include <ctype.h>
#include "bft_mem.h"
#include "bft_printf.h"
#include "cs_base.h"
#include "cs_field.h"
#include "cs_field_pointer.h"
#include "cs_math.h"
#include "cs_prototypes.h"
#include "cs_parameters.h"
#include "cs_time_step.h"
#include "cs_physical_constants.h"
#include "cs_thermal_model.h"
#include "cs_turbulence_model.h"
#include "cs_lagr.h"
#include "cs_lagr_particle.h"
#include "cs_random.h"
Include dependency graph for cs_lagr_agglo.c:

Functions

void cs_lagr_agglo_merge_arrays (cs_lnum_2_t arr1[], cs_lnum_2_t arr2[], cs_lnum_t n1, cs_lnum_t n2, cs_lnum_2_t arr3[])
 Merge two sorted arrays in a third sorted array. More...
 
cs_lnum_t cs_lagr_agglomeration (cs_lnum_t cell_id, cs_real_t dt, cs_real_t minimum_particle_diam, cs_real_t rho, cs_lnum_t start_particle, cs_lnum_t end_particle)
 Agglomeration algorithm based on algorithms used in rare gas modelling. More...
 

Function Documentation

◆ cs_lagr_agglo_merge_arrays()

void cs_lagr_agglo_merge_arrays ( cs_lnum_2_t  arr1[],
cs_lnum_2_t  arr2[],
cs_lnum_t  n1,
cs_lnum_t  n2,
cs_lnum_2_t  arr3[] 
)

Merge two sorted arrays in a third sorted array.

Parameters
[in]arr1first sorted array
[in]arr2second sorted array
[in]n1size of first sorted array
[in]n2size of second sorted array
[in,out]arr3preallocated array that will contain the sorted merge of the two previous arrays

◆ cs_lagr_agglomeration()

cs_lnum_t cs_lagr_agglomeration ( cs_lnum_t  cell_id,
cs_real_t  dt,
cs_real_t  minimum_particle_diam,
cs_real_t  rho,
cs_lnum_t  start_particle,
cs_lnum_t  end_particle 
)

Agglomeration algorithm based on algorithms used in rare gas modelling.

Parcels represent physical particles with similar properties (size). The number of physical particles in a parcel is represented by the statistical weight.

  • We select randomly a number of parcels within which agglomeration is treated.
  • We selected randomly pairs of particles and, for each pair, the number of agglomeration events is generated with a Poisson distribution that depends on the agglomeration kernel and number of each particle (i.e. statistical weight).

Working hypotheses:

1) Discrete diameters

  • Minimal particle size , called a monomere (unbreakable particle)
  • Aggregates correponds to group of monomeres sticking together.
  • Each class of the parcel represent one size (stored in CS_LAGR_AGGREGATE) 2) Agglomeration happens between two parcels 3) Particles in the same cell are contiguous in the particle list
Parameters
[in]cell_idcurrent cell id
[in]dttime step
[in]minimum_particle_diamminumum diameter (monomere diameter)
[in]rhoparticles density
[in]start_particleindex of the first particle
[in]end_particleindex after the last particle
Returns
a modified list of particles, containing newly created parcels at the end