9.0
general documentation
Loading...
Searching...
No Matches
cs_lagr_agglo.cpp File Reference
#include "base/cs_defs.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
#include <assert.h>
#include "lagr/cs_lagr_agglo.h"
#include <limits.h>
#include <stddef.h>
#include <ctype.h>
#include "bft/bft_mem.h"
#include "bft/bft_printf.h"
#include "base/cs_base.h"
#include "base/cs_field.h"
#include "base/cs_field_pointer.h"
#include "base/cs_math.h"
#include "base/cs_prototypes.h"
#include "base/cs_parameters.h"
#include "base/cs_time_step.h"
#include "base/cs_physical_constants.h"
#include "base/cs_thermal_model.h"
#include "turb/cs_turbulence_model.h"
#include "lagr/cs_lagr.h"
#include "lagr/cs_lagr_particle.h"
#include "base/cs_random.h"
Include dependency graph for cs_lagr_agglo.cpp:

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.
cs_lnum_t cs_lagr_agglomeration (cs_lnum_t cell_id, cs_real_t dt, cs_real_t minimum_particle_diam, cs_lnum_t start_particle, cs_lnum_t end_particle)
 Agglomeration algorithm based on algorithms used in rare gas modelling.

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_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]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