programmer's documentation
cs_lagr_tracking.h
Go to the documentation of this file.
1 #ifndef __CS_LAGR_TRACKING_H__
2 #define __CS_LAGR_TRACKING_H__
3 
4 /*============================================================================
5  * Functions and types for the Lagrangian module
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2016 EDF S.A.
12 
13  This program is free software; you can redistribute it and/or modify it under
14  the terms of the GNU General Public License as published by the Free Software
15  Foundation; either version 2 of the License, or (at your option) any later
16  version.
17 
18  This program is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21  details.
22 
23  You should have received a copy of the GNU General Public License along with
24  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25  Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 */
27 
28 /*----------------------------------------------------------------------------*/
29 
30 #include "cs_defs.h"
31 
32 #include "assert.h"
33 
34 /*----------------------------------------------------------------------------*/
35 
37 
38 /*=============================================================================
39  * Macro definitions
40  *============================================================================*/
41 
42 /*============================================================================
43  * Type definitions
44  *============================================================================*/
45 
46 typedef enum {
47 
48  CS_LAGR_CELL_NUM, /* local cell number */
49  CS_LAGR_RANK_ID, /* local parallel rank id */
50 
52 
53  CS_LAGR_RANDOM_VALUE, /* random value associated with the particle */
54 
63 
64  /* Arrays for 2nd order scheme */
65 
66  CS_LAGR_TURB_STATE_1, /* turbulence characteristics of first pass */
67  CS_LAGR_PRED_VELOCITY, /* 1st step prediction for particle velocity */
68  CS_LAGR_PRED_VELOCITY_SEEN, /* 1st step prediction for relative velocity */
69 
70  /* Deposition submodel additional parameters */
71 
77 
78  /* Resuspension model additional parameters */
79 
85 
86  /* Thermal model additional parameters */
87 
91 
92  /* Coal combustion additional parameters */
93 
97 
100 
103 
104  /* Radiative model additional parameters */
105 
107 
108  /* Statistical class */
109 
111 
112  /* User variables */
113 
115 
116  /* End of attributes */
117 
119 
121 
122 /* Particle structure mapping */
123 /* -------------------------- */
124 
125 typedef struct {
126 
127  size_t extents; /* size (in bytes) of particle
128  structure */
129 
130  int n_time_vals; /* number of time values
131  handled */
132 
133  size_t size[CS_LAGR_N_ATTRIBUTES]; /* size (in bytes) of
134  attributes in particle
135  structure for a given
136  time value */
137  cs_datatype_t datatype[CS_LAGR_N_ATTRIBUTES]; /* datatype of associated
138  attributes */
139  int (*count)[CS_LAGR_N_ATTRIBUTES]; /* number of values for each
140  attribute, per associated
141  time_id */
142  ptrdiff_t (*displ)[CS_LAGR_N_ATTRIBUTES]; /* displacement (in bytes) of
143  attributes in particle data,
144  per associated time_id*/
145 
146  ptrdiff_t *source_term_displ; /* displacement (in bytes) of
147  source term values
148  for second-order scheme,
149  or NULL */
150 
152 
153 /* Linked list */
154 /* ----------- */
155 
156 typedef struct _cs_lagr_tracking_list_t cs_lagr_tracking_list_t;
157 
158 /* Particle set */
159 /* ------------ */
160 
161 typedef struct {
162 
163  int time_id; /* 0 for current time,
164  -1 for previous */
170 
176 
178 
181 
182  const cs_lagr_attribute_map_t *p_am; /* particle attributes maps
183  (p_am + i for time n-i) */
184  unsigned char *p_buffer; /* Particles data buffer */
185 
186  cs_lagr_tracking_list_t *used_id; /* active particles list,
187  or NULL for secondary sets */
188 
190 
191 /* Global parameters for Lagrangian module */
192 /*-----------------------------------------*/
193 
194 typedef struct {
195 
196  int physical_model; /* FIXME: => enum: CS_LAGR_PHYS_STD,
197  CS_LAGR_PHYS_COAL,
198  CS_LAGR_PHYS_HEAT... */
200 
204  int clogging;
205 
208 
209  int t_order; /* Algorithm order in time */
210 
212 
213 /*=============================================================================
214  * Global variables
215  *============================================================================*/
216 
217 extern const char *cs_lagr_attribute_name[];
218 
219 /* Pointer to global Lagragian module parameters */
220 
222 
223 /*============================================================================
224  * Public function prototypes for Fortran API
225  *============================================================================*/
226 
227 /*----------------------------------------------------------------------------
228  * Allocate cs_lagr_particle_set_t structure and initialize useful buffers
229  * and indexes
230  *
231  * parameters:
232  * nordre <-- time algorithm order (1 or 2)
233  * iphyla <-- kind of physics used for the lagrangian approach
234  * nvls <-- number of user-defined variables
235  * nbclst <-- number of stat. class to study sub-set of particles
236  * ...
237  *----------------------------------------------------------------------------*/
238 
239 void
240 CS_PROCF (lagbeg, LAGBEG)(const cs_int_t *nordre,
241  const cs_int_t *nlayer,
242  const cs_int_t *iphyla,
243  const cs_int_t *idepst,
244  const cs_int_t *irough,
245  const cs_int_t *ireent,
246  const cs_int_t *iclogst,
247  const cs_int_t *nvls,
248  const cs_int_t *nbclst,
249  cs_lnum_t icocel[],
250  cs_lnum_t itycel[],
251  cs_int_t *jisor,
252  cs_int_t *jisora,
253  cs_int_t *jirka,
254  cs_int_t *jord1,
255  cs_int_t *jrval,
256  cs_int_t *jrpoi,
257  cs_int_t *jrtsp,
258  cs_int_t *jdp,
259  cs_int_t *jmp,
260  cs_int_t *jxp,
261  cs_int_t *jyp,
262  cs_int_t *jzp,
263  cs_int_t *jup,
264  cs_int_t *jvp,
265  cs_int_t *jwp,
266  cs_int_t *juf,
267  cs_int_t *jvf,
268  cs_int_t *jwf,
269  cs_int_t *jtaux,
270  cs_int_t jbx1[3],
271  cs_int_t jtsup[3],
272  cs_int_t jtsuf[3],
273  cs_int_t *jryplu,
274  cs_int_t *jrinpf,
275  cs_int_t *jdfac,
276  cs_int_t *jimark,
277  cs_int_t *jtp,
278  cs_int_t jhp[],
279  cs_int_t *jtf,
280  cs_int_t *jmwat,
281  cs_int_t jmch[],
282  cs_int_t jmck[],
283  cs_int_t *jcp,
284  cs_int_t *jrdck,
285  cs_int_t *jrd0p,
286  cs_int_t *jinch,
287  cs_int_t jrhock[],
288  cs_int_t *jreps,
289  cs_int_t *jdepo,
290  cs_int_t *jnbasg,
291  cs_int_t *jnbasp,
292  cs_int_t *jfadh,
293  cs_int_t *jmfadh,
294  cs_int_t *jndisp,
295  cs_int_t *jclst,
296  cs_int_t *jvls);
297 
298 /*----------------------------------------------------------------------------
299  * Get variables and parameters associated to each particles and keep it in
300  * a new structure
301  *
302  * parameters:
303  * ...
304  *----------------------------------------------------------------------------*/
305 
306 void
307 CS_PROCF (getbdy, GETBDY)(const cs_int_t *nflagm,
308  const cs_int_t *nfrlag,
309  const cs_int_t *injcon,
310  const cs_int_t ilflag[],
311  const cs_int_t iusncl[],
312  const cs_int_t iusclb[],
313  const cs_real_t deblag[],
314  const cs_int_t ifrlag[]);
315 
316 /*----------------------------------------------------------------------------
317  * Displacement of particles.
318  *
319  * parameters:
320  * scheme_order <-- current order of the scheme used for Lagragian
321  *----------------------------------------------------------------------------*/
322 
323 void
324 CS_PROCF (dplprt, DPLPRT)(cs_int_t *p_scheme_order,
325  cs_real_t boundary_stat[],
326  const cs_int_t *iensi3,
327  const cs_int_t *inbr,
328  const cs_int_t *inbrbd,
329  const cs_int_t *iflm,
330  const cs_int_t *iflmbd,
331  const cs_int_t *iang,
332  const cs_int_t *iangbd,
333  const cs_int_t *ivit,
334  const cs_int_t *ivitbd,
335  const cs_int_t *iencnd,
336  const cs_int_t *iencma,
337  const cs_int_t *iencdi,
338  const cs_int_t *iencck,
339  const cs_int_t *iencnbbd,
340  const cs_int_t *iencmabd,
341  const cs_int_t *iencdibd,
342  const cs_int_t *iencckbd,
343  const cs_int_t *inclg,
344  const cs_int_t *iscovc,
345  const cs_int_t *nusbor,
346  cs_int_t iusb[],
347  cs_real_t visc_length[],
348  cs_real_t dlgeo[],
349  cs_real_t energt[],
350  const cs_real_t tprenc[],
351  const cs_real_t visref[],
352  const cs_real_t enc1[],
353  const cs_real_t enc2[],
354  const cs_real_t *tkelvi);
355 
356 /*============================================================================
357  * Public function prototypes
358  *============================================================================*/
359 
360 /*----------------------------------------------------------------------------
361  * Get data access information for a given particle attribute.
362  *
363  * For attributes not currently present, the displacement and data
364  * size should be -1 and 0 respectively.
365  *
366  * parameters:
367  * particles <-- associated particle set
368  * time_id <-- associated time id (0: current, 1: previous)
369  * attr <-- particle attribute
370  * extents --> size (in bytes) of particle structure, or NULL
371  * size --> size (in bytes) of attribute in particle structure, or NULL
372  * displ --> displacement (in bytes) in particle structure, or NULL
373  * datatype --> associated datatype, or NULL
374  * count --> associated elements count, or NULL
375  *----------------------------------------------------------------------------*/
376 
377 void
379  int time_id,
380  cs_lagr_attribute_t attr,
381  size_t *extents,
382  size_t *size,
383  ptrdiff_t *displ,
384  cs_datatype_t *datatype,
385  int *count);
386 
387 /*----------------------------------------------------------------------------
388  * Return pointer to the main cs_lagr_particle_set_t structure.
389  *
390  * returns:
391  * pointer to current particle set, or NULL
392  *----------------------------------------------------------------------------*/
393 
396 
397 /*----------------------------------------------------------------------------
398  * Delete particle set structure and other useful buffers.
399  *----------------------------------------------------------------------------*/
400 
401 void
402 cs_lagr_destroy(void);
403 
404 /*----------------------------------------------------------------------------*/
414 /*----------------------------------------------------------------------------*/
415 
416 inline static void *
418  cs_lnum_t particle_id,
419  cs_lagr_attribute_t attr)
420 {
421  assert(particle_set->p_am->count[0][attr] > 0);
422 
423  return (unsigned char *)particle_set->p_buffer
424  + particle_set->p_am->extents*particle_id
425  + particle_set->p_am->displ[0][attr];
426 }
427 
428 /*----------------------------------------------------------------------------*/
439 /*----------------------------------------------------------------------------*/
440 
441 inline static const void *
443  cs_lnum_t particle_id,
444  cs_lagr_attribute_t attr)
445 {
446  assert(particle_set->p_am->count[0][attr] > 0);
447 
448  return particle_set->p_buffer
449  + particle_set->p_am->extents*particle_id
450  + particle_set->p_am->displ[0][attr];
451 }
452 
453 /*----------------------------------------------------------------------------*/
465 /*----------------------------------------------------------------------------*/
466 
467 inline static void *
469  cs_lnum_t particle_id,
470  int time_id,
471  cs_lagr_attribute_t attr)
472 {
473  assert(particle_set->p_am->count[time_id][attr] > 0);
474 
475  return particle_set->p_buffer
476  + particle_set->p_am->extents*particle_id
477  + particle_set->p_am->displ[time_id][attr];
478 }
479 
480 /*----------------------------------------------------------------------------*/
492 /*----------------------------------------------------------------------------*/
493 
494 inline static const void *
496  cs_lnum_t particle_id,
497  int time_id,
498  cs_lagr_attribute_t attr)
499 {
500  assert(particle_set->p_am->count[time_id][attr] > 0);
501 
502  return particle_set->p_buffer
503  + particle_set->p_am->extents*particle_id
504  + particle_set->p_am->displ[time_id][attr];
505 }
506 
507 /*----------------------------------------------------------------------------*/
517 /*----------------------------------------------------------------------------*/
518 
519 inline static cs_lnum_t
521  cs_lnum_t particle_id,
522  cs_lagr_attribute_t attr)
523 {
524  assert(particle_set->p_am->count[0][attr] > 0);
525 
526  return *((const cs_lnum_t *)( particle_set->p_buffer
527  + particle_set->p_am->extents*particle_id
528  + particle_set->p_am->displ[0][attr]));
529 }
530 
531 /*----------------------------------------------------------------------------*/
543 /*----------------------------------------------------------------------------*/
544 
545 inline static cs_lnum_t
547  cs_lnum_t particle_id,
548  int time_id,
549  cs_lagr_attribute_t attr)
550 {
551  assert(particle_set->p_am->count[time_id][attr] > 0);
552 
553  return *((const cs_lnum_t *)( particle_set->p_buffer
554  + particle_set->p_am->extents*particle_id
555  + particle_set->p_am->displ[time_id][attr]));
556 }
557 
558 /*----------------------------------------------------------------------------*/
567 /*----------------------------------------------------------------------------*/
568 
569 inline static void
571  cs_lnum_t particle_id,
572  cs_lagr_attribute_t attr,
573  cs_lnum_t value)
574 {
575  assert(particle_set->p_am->count[0][attr] > 0);
576 
577  *((cs_lnum_t *)( particle_set->p_buffer
578  + particle_set->p_am->extents*particle_id
579  + particle_set->p_am->displ[0][attr])) = value;
580 }
581 
582 /*----------------------------------------------------------------------------*/
593 /*----------------------------------------------------------------------------*/
594 
595 inline static void
597  cs_lnum_t particle_id,
598  int time_id,
599  cs_lagr_attribute_t attr,
600  cs_lnum_t value)
601 {
602  assert(particle_set->p_am->count[time_id][attr] > 0);
603 
604  *((cs_lnum_t *)( particle_set->p_buffer
605  + particle_set->p_am->extents*particle_id
606  + particle_set->p_am->displ[time_id][attr])) = value;
607 }
608 
609 /*----------------------------------------------------------------------------*/
619 /*----------------------------------------------------------------------------*/
620 
621 inline static cs_gnum_t
623  cs_lnum_t particle_id,
624  cs_lagr_attribute_t attr)
625 {
626  assert(particle_set->p_am->count[0][attr] > 0);
627 
628  return *((const cs_gnum_t *)( particle_set->p_buffer
629  + particle_set->p_am->extents*particle_id
630  + particle_set->p_am->displ[0][attr]));
631 }
632 
633 /*----------------------------------------------------------------------------*/
645 /*----------------------------------------------------------------------------*/
646 
647 inline static cs_gnum_t
649  cs_lnum_t particle_id,
650  int time_id,
651  cs_lagr_attribute_t attr)
652 {
653  assert(particle_set->p_am->count[time_id][attr] > 0);
654 
655  return *((const cs_gnum_t *)( particle_set->p_buffer
656  + particle_set->p_am->extents*particle_id
657  + particle_set->p_am->displ[time_id][attr]));
658 }
659 
660 /*----------------------------------------------------------------------------*/
669 /*----------------------------------------------------------------------------*/
670 
671 inline static void
673  cs_lnum_t particle_id,
674  cs_lagr_attribute_t attr,
675  cs_gnum_t value)
676 {
677  assert(particle_set->p_am->count[0][attr] > 0);
678 
679  *((cs_gnum_t *)( particle_set->p_buffer
680  + particle_set->p_am->extents*particle_id
681  + particle_set->p_am->displ[0][attr])) = value;
682 }
683 
684 /*----------------------------------------------------------------------------*/
695 /*----------------------------------------------------------------------------*/
696 
697 inline static void
699  cs_lnum_t particle_id,
700  int time_id,
701  cs_lagr_attribute_t attr,
702  cs_gnum_t value)
703 {
704  assert(particle_set->p_am->count[time_id][attr] > 0);
705 
706  *((cs_gnum_t *)( particle_set->p_buffer
707  + particle_set->p_am->extents*particle_id
708  + particle_set->p_am->displ[time_id][attr])) = value;
709 }
710 
711 /*----------------------------------------------------------------------------*/
721 /*----------------------------------------------------------------------------*/
722 
723 inline static cs_real_t
725  cs_lnum_t particle_id,
726  cs_lagr_attribute_t attr)
727 {
728  assert(particle_set->p_am->count[0][attr] > 0);
729 
730  return *((const cs_real_t *)( particle_set->p_buffer
731  + particle_set->p_am->extents*particle_id
732  + particle_set->p_am->displ[0][attr]));
733 }
734 
735 /*----------------------------------------------------------------------------*/
747 /*----------------------------------------------------------------------------*/
748 
749 inline static cs_real_t
751  cs_lnum_t particle_id,
752  int time_id,
753  cs_lagr_attribute_t attr)
754 {
755  assert(particle_set->p_am->count[time_id][attr] > 0);
756 
757  return *((const cs_real_t *)( particle_set->p_buffer
758  + particle_set->p_am->extents*particle_id
759  + particle_set->p_am->displ[time_id][attr]));
760 }
761 
762 /*----------------------------------------------------------------------------*/
771 /*----------------------------------------------------------------------------*/
772 
773 inline static void
775  cs_lnum_t particle_id,
776  cs_lagr_attribute_t attr,
777  cs_real_t value)
778 {
779  assert(particle_set->p_am->count[0][attr] > 0);
780 
781  *((cs_real_t *)( particle_set->p_buffer
782  + particle_set->p_am->extents*particle_id
783  + particle_set->p_am->displ[0][attr])) = value;
784 }
785 
786 /*----------------------------------------------------------------------------*/
797 /*----------------------------------------------------------------------------*/
798 
799 inline static void
801  cs_lnum_t particle_id,
802  int time_id,
803  cs_lagr_attribute_t attr,
804  cs_real_t value)
805 {
806  assert(particle_set->p_am->count[time_id][attr] > 0);
807 
808  *((cs_real_t *)( particle_set->p_buffer
809  + particle_set->p_am->extents*particle_id
810  + particle_set->p_am->displ[time_id][attr])) = value;
811 }
812 
813 /*----------------------------------------------------------------------------*/
824 /*----------------------------------------------------------------------------*/
825 
826 inline static cs_real_t *
828  cs_lnum_t particle_id,
829  cs_lagr_attribute_t attr)
830 {
831  assert(particle_set->p_am->source_term_displ != NULL);
832  assert(particle_set->p_am->source_term_displ[attr] >= 0);
833 
834  return (cs_real_t *)( (unsigned char *)particle_set->p_buffer
835  + particle_set->p_am->extents*particle_id
836  + particle_set->p_am->source_term_displ[attr]);
837 }
838 
839 /*----------------------------------------------------------------------------*/
850 /*----------------------------------------------------------------------------*/
851 
852 inline static const cs_real_t *
854  cs_lnum_t particle_id,
855  cs_lagr_attribute_t attr)
856 {
857  assert(particle_set->p_am->source_term_displ != NULL);
858  assert(particle_set->p_am->source_term_displ[attr] >= 0);
859 
860  return (const cs_real_t *)( (unsigned char *)particle_set->p_buffer
861  + particle_set->p_am->extents*particle_id
862  + particle_set->p_am->source_term_displ[attr]);
863 }
864 
865 /*----------------------------------------------------------------------------*/
875 /*----------------------------------------------------------------------------*/
876 
877 inline static void *
878 cs_lagr_particle_attr(void *particle,
879  const cs_lagr_attribute_map_t *attr_map,
880  cs_lagr_attribute_t attr)
881 {
882  assert(attr_map->count[0][attr] > 0);
883 
884  return (unsigned char *)particle + attr_map->displ[0][attr];
885 }
886 
887 /*----------------------------------------------------------------------------*/
897 /*----------------------------------------------------------------------------*/
898 
899 inline static const void *
900 cs_lagr_particle_attr_const(const void *particle,
901  const cs_lagr_attribute_map_t *attr_map,
902  cs_lagr_attribute_t attr)
903 {
904  assert(attr_map->count[0][attr] > 0);
905 
906  return (const unsigned char *)particle + attr_map->displ[0][attr];
907 }
908 
909 /*----------------------------------------------------------------------------*/
920 /*----------------------------------------------------------------------------*/
921 
922 inline static void *
923 cs_lagr_particle_attr_n(void *particle,
924  const cs_lagr_attribute_map_t *attr_map,
925  int time_id,
926  cs_lagr_attribute_t attr)
927 {
928  assert(attr_map->count[time_id][attr] > 0);
929 
930  return (unsigned char *)particle + attr_map->displ[time_id][attr];
931 }
932 
933 /*----------------------------------------------------------------------------*/
944 /*----------------------------------------------------------------------------*/
945 
946 inline static const void *
947 cs_lagr_particle_attr_n_const(const void *particle,
948  const cs_lagr_attribute_map_t *attr_map,
949  int time_id,
950  cs_lagr_attribute_t attr)
951 {
952  assert(attr_map->count[time_id][attr] > 0);
953 
954  return (const unsigned char *)particle
955  + attr_map->displ[time_id][attr];
956 }
957 
958 /*----------------------------------------------------------------------------*/
968 /*----------------------------------------------------------------------------*/
969 
970 inline static cs_lnum_t
971 cs_lagr_particle_get_lnum(const void *particle,
972  const cs_lagr_attribute_map_t *attr_map,
973  cs_lagr_attribute_t attr)
974 {
975  assert(attr_map->count[0][attr] > 0);
976 
977  return *((const cs_lnum_t *)( (const unsigned char *)particle
978  + attr_map->displ[0][attr]));
979 }
980 
981 /*----------------------------------------------------------------------------*/
993 /*----------------------------------------------------------------------------*/
994 
995 inline static cs_lnum_t
996 cs_lagr_particle_get_lnum_n(const void *particle,
997  const cs_lagr_attribute_map_t *attr_map,
998  int time_id,
999  cs_lagr_attribute_t attr)
1000 {
1001  assert(attr_map->count[time_id][attr] > 0);
1002 
1003  return *((const cs_lnum_t *)( (const unsigned char *)particle
1004  + attr_map->displ[time_id][attr]));
1005 }
1006 
1007 /*----------------------------------------------------------------------------*/
1016  /*----------------------------------------------------------------------------*/
1017 
1018 inline static void
1020  const cs_lagr_attribute_map_t *attr_map,
1021  cs_lagr_attribute_t attr,
1022  cs_lnum_t value)
1023 {
1024  assert(attr_map->count[0][attr] > 0);
1025 
1026  *((cs_lnum_t *)((unsigned char *)particle + attr_map->displ[0][attr]))
1027  = value;
1028 }
1029 
1030 /*----------------------------------------------------------------------------*/
1041  /*----------------------------------------------------------------------------*/
1042 
1043 inline static void
1045  const cs_lagr_attribute_map_t *attr_map,
1046  int time_id,
1047  cs_lagr_attribute_t attr,
1048  cs_lnum_t value)
1049 {
1050  assert(attr_map->count[time_id][attr] > 0);
1051 
1052  *((cs_lnum_t *)( (unsigned char *)particle
1053  + attr_map->displ[time_id][attr])) = value;
1054 }
1055 
1056 /*----------------------------------------------------------------------------*/
1066 /*----------------------------------------------------------------------------*/
1067 
1068 inline static cs_gnum_t
1069 cs_lagr_particle_get_gnum(const void *particle,
1070  const cs_lagr_attribute_map_t *attr_map,
1071  cs_lagr_attribute_t attr)
1072 {
1073  assert(attr_map->count[0][attr] > 0);
1074 
1075  return *((const cs_gnum_t *)( (const unsigned char *)particle
1076  + attr_map->displ[0][attr]));
1077 }
1078 
1079 /*----------------------------------------------------------------------------*/
1091 /*----------------------------------------------------------------------------*/
1092 
1093 inline static cs_gnum_t
1094 cs_lagr_particle_get_gnum_n(const void *particle,
1095  const cs_lagr_attribute_map_t *attr_map,
1096  int time_id,
1097  cs_lagr_attribute_t attr)
1098 {
1099  assert(attr_map->count[time_id][attr] > 0);
1100 
1101  return *((const cs_gnum_t *)( (const unsigned char *)particle
1102  + attr_map->displ[time_id][attr]));
1103 }
1104 
1105 /*----------------------------------------------------------------------------*/
1114  /*----------------------------------------------------------------------------*/
1115 
1116 inline static void
1118  const cs_lagr_attribute_map_t *attr_map,
1119  cs_lagr_attribute_t attr,
1120  cs_gnum_t value)
1121 {
1122  assert(attr_map->count[0][attr] > 0);
1123 
1124  *((cs_gnum_t *)((unsigned char *)particle + attr_map->displ[0][attr]))
1125  = value;
1126 }
1127 
1128 /*----------------------------------------------------------------------------*/
1139  /*----------------------------------------------------------------------------*/
1140 
1141 inline static void
1143  const cs_lagr_attribute_map_t *attr_map,
1144  int time_id,
1145  cs_lagr_attribute_t attr,
1146  cs_gnum_t value)
1147 {
1148  assert(attr_map->count[time_id][attr] > 0);
1149 
1150  *((cs_gnum_t *)( (unsigned char *)particle
1151  + attr_map->displ[time_id][attr])) = value;
1152 }
1153 
1154 /*----------------------------------------------------------------------------*/
1164 /*----------------------------------------------------------------------------*/
1165 
1166 inline static cs_real_t
1167 cs_lagr_particle_get_real(const void *particle,
1168  const cs_lagr_attribute_map_t *attr_map,
1169  cs_lagr_attribute_t attr)
1170 {
1171  assert(attr_map->count[0][attr] > 0);
1172 
1173  return *((const cs_real_t *)( (const unsigned char *)particle
1174  + attr_map->displ[0][attr]));
1175 }
1176 
1177 /*----------------------------------------------------------------------------*/
1189 /*----------------------------------------------------------------------------*/
1190 
1191 inline static cs_real_t
1192 cs_lagr_particle_get_real_n(const void *particle,
1193  const cs_lagr_attribute_map_t *attr_map,
1194  int time_id,
1195  cs_lagr_attribute_t attr)
1196 {
1197  assert(attr_map->count[time_id][attr] > 0);
1198 
1199  return *((const cs_real_t *)( (const unsigned char *)particle
1200  + attr_map->displ[time_id][attr]));
1201 }
1202 
1203 /*----------------------------------------------------------------------------*/
1212  /*----------------------------------------------------------------------------*/
1213 
1214 inline static void
1216  const cs_lagr_attribute_map_t *attr_map,
1217  cs_lagr_attribute_t attr,
1218  cs_real_t value)
1219 {
1220  assert(attr_map->count[0][attr] > 0);
1221 
1222  *((cs_real_t *)((unsigned char *)particle + attr_map->displ[0][attr]))
1223  = value;
1224 }
1225 
1226 /*----------------------------------------------------------------------------*/
1237  /*----------------------------------------------------------------------------*/
1238 
1239 inline static void
1241  const cs_lagr_attribute_map_t *attr_map,
1242  int time_id,
1243  cs_lagr_attribute_t attr,
1244  cs_real_t value)
1245 {
1246  assert(attr_map->count[time_id][attr] > 0);
1247 
1248  *((cs_real_t *)( (unsigned char *)particle
1249  + attr_map->displ[time_id][attr])) = value;
1250 }
1251 
1252 /*----------------------------------------------------------------------------*/
1262 /*----------------------------------------------------------------------------*/
1263 
1264 inline static cs_real_t *
1266  const cs_lagr_attribute_map_t *attr_map,
1267  cs_lagr_attribute_t attr)
1268 {
1269  assert(attr_map->source_term_displ != NULL);
1270  assert(attr_map->source_term_displ[attr] >= 0);
1271 
1272  return (cs_real_t *)( (unsigned char *)particle
1273  + attr_map->source_term_displ[attr]);
1274 }
1275 
1276 /*----------------------------------------------------------------------------*/
1286 /*----------------------------------------------------------------------------*/
1287 
1288 inline static const cs_real_t *
1290  const cs_lagr_attribute_map_t *attr_map,
1291  cs_lagr_attribute_t attr)
1292 {
1293  assert(attr_map->source_term_displ != NULL);
1294  assert(attr_map->source_term_displ[attr] >= 0);
1295 
1296  return (const cs_real_t *)( (unsigned char *)particle
1297  + attr_map->source_term_displ[attr]);
1298 }
1299 
1300 /*----------------------------------------------------------------------------
1301  * Resize particle set buffers if needed.
1302  *
1303  * parameters:
1304  * n_particles <-- minumum number of particles required
1305  *
1306  *
1307  * returns:
1308  * 1 if resizing was required, 0 otherwise
1309  *----------------------------------------------------------------------------*/
1310 
1311 int
1312 cs_lagr_resize_particle_set(cs_lnum_t n_min_particles);
1313 
1314 /*----------------------------------------------------------------------------
1315  * Set reallocation factor for particle sets.
1316  *
1317  * This factor determines the multiplier used for reallocations when
1318  * the particle set's buffers are too small to handle the new number of
1319  * particles.
1320  *
1321  * parameters:
1322  * f <-- reallocation size multiplier
1323  *----------------------------------------------------------------------------*/
1324 
1325 void
1327 
1328 /*----------------------------------------------------------------------------
1329  * \brief Set global maximum number of particles.
1330  *
1331  * By default, the number is limited only by local cs_lnum_t and global
1332  * cs_gnum_t data representation limits.
1333  *
1334  * parameters:
1335  * n_g_particles_max <-- global maximum number of particles
1336 *----------------------------------------------------------------------------*/
1337 
1338 void
1339 cs_lagr_set_n_g_particles_max(unsigned long long n_g_particles_max);
1340 
1341 /*----------------------------------------------------------------------------
1342  * Dump a cs_lagr_particle_t structure
1343  *
1344  * parameters:
1345  * particles <-- cs_lagr_particle_t structure to dump
1346  *----------------------------------------------------------------------------*/
1347 
1348 void
1350 
1351 /*----------------------------------------------------------------------------*/
1352 
1354 
1355 #endif /* __CS_LAGR_TRACKING_H__ */
cs_lnum_t n_part_out
Definition: cs_lagr_tracking.h:166
static void cs_lagr_particle_set_gnum_n(void *particle, const cs_lagr_attribute_map_t *attr_map, int time_id, cs_lagr_attribute_t attr, cs_gnum_t value)
Set attribute value of type cs_gnum_t of a given particle at a given time.
Definition: cs_lagr_tracking.h:1142
cs_datatype_t
Definition: cs_defs.h:255
integer, save iencnbbd
Definition: lagran.f90:1173
Definition: cs_lagr_tracking.h:82
cs_lagr_particle_set_t * cs_lagr_get_particle_set(void)
Return pointer to the main cs_lagr_particle_set_t structure.
Definition: cs_lagr_tracking.c:5521
integer, save iflm
particle mass flow at the boundary faces
Definition: lagran.f90:1185
unsigned long cs_gnum_t
global mesh entity number
Definition: cs_defs.h:280
Definition: cs_lagr_tracking.h:75
integer, save jreps
pointer to particle emissivity for array pepa
Definition: lagran.f90:443
static cs_real_t cs_lagr_particle_get_real(const void *particle, const cs_lagr_attribute_map_t *attr_map, cs_lagr_attribute_t attr)
Get attribute value of type cs_real_t of a given particle in a set.
Definition: cs_lagr_tracking.h:1167
cs_lnum_t n_part_fou
Definition: cs_lagr_tracking.h:168
integer, save jwf
pointer to locally undisturbed Z fluid velocity component for pointer eptp
Definition: lagran.f90:397
static void cs_lagr_particles_set_real(cs_lagr_particle_set_t *particle_set, cs_lnum_t particle_id, cs_lagr_attribute_t attr, cs_real_t value)
Set attribute value of type cs_real_t of a given particle in a set.
Definition: cs_lagr_tracking.h:774
Definition: cs_lagr_tracking.h:83
integer, save jord1
Additional pointer in the IPEPA array (contains the particule state)
Definition: lagran.f90:269
integer, save jxp
pointer to particle X coordinate for pointer eptp
Definition: lagran.f90:378
static cs_real_t cs_lagr_particles_get_real(const cs_lagr_particle_set_t *particle_set, cs_lnum_t particle_id, cs_lagr_attribute_t attr)
Get attribute value of type cs_real_t of a given particle in a set.
Definition: cs_lagr_tracking.h:724
Definition: cs_lagr_tracking.h:89
integer, save iencck
Definition: lagran.f90:1206
static void cs_lagr_particles_set_gnum(cs_lagr_particle_set_t *particle_set, cs_lnum_t particle_id, cs_lagr_attribute_t attr, cs_gnum_t value)
Set attribute value of type cs_gnum_t of a given particle in a set.
Definition: cs_lagr_tracking.h:672
Definition: cs_lagr_tracking.h:102
integer, save jwp
pointer to particle Z velocity component for pointer eptp
Definition: lagran.f90:388
integer, dimension(nlayer), save jmch
pointer to mass of reactive coal of the coal particle for pointer eptp
Definition: lagran.f90:415
integer, save iencmabd
Definition: lagran.f90:1175
static void cs_lagr_particle_set_lnum_n(void *particle, const cs_lagr_attribute_map_t *attr_map, int time_id, cs_lagr_attribute_t attr, cs_lnum_t value)
Set attribute value of type cs_lnum_t of a given particle at a given time.
Definition: cs_lagr_tracking.h:1044
ptrdiff_t * source_term_displ
Definition: cs_lagr_tracking.h:146
integer, save iencdibd
Definition: lagran.f90:1177
int t_order
Definition: cs_lagr_tracking.h:209
Definition: cs_lagr_tracking.h:74
Definition: cs_lagr_tracking.h:114
static cs_real_t cs_lagr_particle_get_real_n(const void *particle, const cs_lagr_attribute_map_t *attr_map, int time_id, cs_lagr_attribute_t attr)
Get attribute value of type cs_real_t of a given particle at a given time.
Definition: cs_lagr_tracking.h:1192
Definition: cs_lagr_tracking.h:57
static cs_real_t cs_lagr_particles_get_real_n(const cs_lagr_particle_set_t *particle_set, cs_lnum_t particle_id, int time_id, cs_lagr_attribute_t attr)
Get attribute value of type cs_real_t of a given particle in a set at a given time.
Definition: cs_lagr_tracking.h:750
integer, save jdfac
Additional pointer in the IPEPA array (contains the particule state)
Definition: lagran.f90:263
integer, save jclst
pointer to class of the particle for ipepa array
Definition: lagran.f90:467
integer, save jisor
pointer to number of the current cell containing the particle for ipepa array; this number is re-actu...
Definition: lagran.f90:457
int physical_model
Definition: cs_lagr_tracking.h:196
Definition: cs_lagr_tracking.h:81
Definition: cs_lagr_tracking.h:106
integer, dimension(:), allocatable ifrlag
Definition: pointe.f90:388
Definition: cs_lagr_tracking.h:118
Definition: cs_lagr_tracking.h:51
integer, save jrd0p
pointer to coal particle initial diameter for array pepa
Definition: lagran.f90:446
integer, save jisora
pointer to number of the previous cell containing the particle for ipepa array
Definition: lagran.f90:460
#define BEGIN_C_DECLS
Definition: cs_defs.h:419
Definition: cs_lagr_tracking.h:84
int cs_int_t
Fortran-compatible integer.
Definition: cs_defs.h:295
Definition: cs_lagr_tracking.h:161
integer, save jzp
pointer to particle Z coordinate for pointer eptp
Definition: lagran.f90:382
integer, save ireent
Definition: lagran.f90:282
integer, save nvls
pointer to number of additional variables related to the particles for ipepa array. The additional variables can be accessed in the arrays eptp and eptpa by means of the pointer jvls: eptp(nbpt,jvls(ii)) and eptpa(nbpt,jvls(ii)) (nbpt is the index-number of the treated particle, and ii an integer between 1 and nvls)
Definition: lagran.f90:477
Definition: cs_lagr_tracking.h:98
integer, save jmwat
pointer to water mass (for coal) for pointer eptp
Definition: lagran.f90:413
double precision, dimension(ncharm2), save enc1
encrustation data
Definition: lagran.f90:978
integer, save iphyla
activates (>0) or deactivates (=0) the physical models associated to the particles: ...
Definition: lagran.f90:210
static void cs_lagr_particle_set_gnum(void *particle, const cs_lagr_attribute_map_t *attr_map, cs_lagr_attribute_t attr, cs_gnum_t value)
Set attribute value of type cs_gnum_t of a given particle.
Definition: cs_lagr_tracking.h:1117
integer, save jvf
pointer to locally undisturbed Y fluid velocity component for pointer eptp
Definition: lagran.f90:394
Definition: cs_lagr_tracking.h:80
int n_temperature_layers
Definition: cs_lagr_tracking.h:199
const cs_lagr_param_t * cs_glob_lagr_params
integer, save iencma
Definition: lagran.f90:1202
integer, save jrval
pointer to random number associated with a particle for array pepa
Definition: lagran.f90:434
static void cs_lagr_particles_set_gnum_n(cs_lagr_particle_set_t *particle_set, cs_lnum_t particle_id, int time_id, cs_lagr_attribute_t attr, cs_gnum_t value)
Set attribute value of type cs_gnum_t of a given particle in a set at a given time.
Definition: cs_lagr_tracking.h:698
integer, save jyp
pointer to particle Y coordinate for pointer eptp
Definition: lagran.f90:380
cs_real_t weight_fou
Definition: cs_lagr_tracking.h:174
integer, save idepst
Definition: lagran.f90:250
integer, save iclogst
Definition: lagran.f90:325
static cs_lnum_t cs_lagr_particle_get_lnum(const void *particle, const cs_lagr_attribute_map_t *attr_map, cs_lagr_attribute_t attr)
Get attribute value of type cs_lnum_t of a given particle in a set.
Definition: cs_lagr_tracking.h:971
void cs_lagr_get_attr_info(const cs_lagr_particle_set_t *particles, int time_id, cs_lagr_attribute_t attr, size_t *extents, size_t *size, ptrdiff_t *displ, cs_datatype_t *datatype, int *count)
Get data extents for a given particle attribute.
Definition: cs_lagr_tracking.c:5490
double precision, dimension(nflagm), save deblag
massic flow rate for a boudary zone
Definition: lagran.f90:589
integer, save jrinpf
Additional pointer in the IPEPA array (contains the particule state)
Definition: lagran.f90:267
integer, save injcon
activates (=1) or not (=0) the continuous injection of particles. this option allows to inject partic...
Definition: lagran.f90:496
const cs_lagr_attribute_map_t * p_am
Definition: cs_lagr_tracking.h:182
integer, save inbr
number of particle/boundary interactions
Definition: lagran.f90:1182
integer, save jrpoi
pointer to particle statistic weight for array pepa
Definition: lagran.f90:440
void getbdy(const cs_int_t *nflagm, const cs_int_t *nfrlag, const cs_int_t *injcon, const cs_int_t ilflag[], const cs_int_t iusncl[], const cs_int_t iusclb[], const cs_real_t deblag[], const cs_int_t ifrlag[])
Definition: cs_lagr_tracking.c:5111
integer, save jvp
pointer to particle Y velocity component for pointer eptp
Definition: lagran.f90:386
integer, save iencdi
Definition: lagran.f90:1204
Definition: cs_lagr_tracking.h:59
integer, save irough
Definition: lagran.f90:286
integer, save jimark
Additional pointer in the IPEPA array (contains the particule state)
Definition: lagran.f90:261
cs_real_t weight_failed
Definition: cs_lagr_tracking.h:175
Definition: cs_lagr_tracking.h:95
double precision tkelvi
Temperature in Kelvin correponding to 0 degrees Celsius (= +273,15)
Definition: cstphy.f90:44
cs_real_t weight_dep
Definition: cs_lagr_tracking.h:173
static void * cs_lagr_particle_attr(void *particle, const cs_lagr_attribute_map_t *attr_map, cs_lagr_attribute_t attr)
Get pointer to current attribute data of a particle.
Definition: cs_lagr_tracking.h:878
static cs_real_t * cs_lagr_particle_source_term(void *particle, const cs_lagr_attribute_map_t *attr_map, cs_lagr_attribute_t attr)
Get pointer to 2nd order scheme attribute source terms of a particle.
Definition: cs_lagr_tracking.h:1265
unsigned char * p_buffer
Definition: cs_lagr_tracking.h:184
integer, dimension(nusvar), save jvls
pointer to additional user variable for pointer eptp
Definition: lagran.f90:419
integer, save nfrlag
number of boundary zones
Definition: lagran.f90:489
Definition: cs_lagr_tracking.h:110
int resuspension
Definition: cs_lagr_tracking.h:203
Definition: cs_lagr_tracking.h:55
Definition: cs_lagr_tracking.h:49
ptrdiff_t(* displ)[CS_LAGR_N_ATTRIBUTES]
Definition: cs_lagr_tracking.h:142
cs_real_t weight_out
Definition: cs_lagr_tracking.h:172
int deposition
Definition: cs_lagr_tracking.h:201
integer, dimension(nflagm), save iusncl
for all the nfrlag boundary zones previously identified, the number of classes nbclas (a class is a s...
Definition: lagran.f90:509
integer, save jcp
pointer to particle specific heat for pointer eptp
Definition: lagran.f90:409
integer, save inbrbd
activation (=1) or not (=0) of the recording of the number of particle/boundary interactions, and of the calculation of the associated boundary statistics. inbrbd = 1 is a compulsory condition to use the particulate average imoybr = 2. Useful if iensi3=1
Definition: lagran.f90:1151
integer, dimension(:), allocatable icocel
Definition: pointe.f90:387
Definition: cs_lagr_tracking.h:53
integer, save iang
mean interaction angle with the boundary faces
Definition: lagran.f90:1188
void cs_lagr_particle_set_dump(const cs_lagr_particle_set_t *particles)
Dump a cs_lagr_particle_t structure.
Definition: cs_lagr_tracking.c:5646
static void * cs_lagr_particles_attr_n(cs_lagr_particle_set_t *particle_set, cs_lnum_t particle_id, int time_id, cs_lagr_attribute_t attr)
Get pointer to attribute data of a given particle in a set at a given time.
Definition: cs_lagr_tracking.h:468
int time_id
Definition: cs_lagr_tracking.h:163
static const void * cs_lagr_particles_attr_const(const cs_lagr_particle_set_t *particle_set, cs_lnum_t particle_id, cs_lagr_attribute_t attr)
Get const pointer to current attribute data of a given particle in a set.
Definition: cs_lagr_tracking.h:442
integer, save juf
pointer to locally undisturbed X fluid velocity component for pointer eptp
Definition: lagran.f90:391
cs_lnum_t n_part_dep
Definition: cs_lagr_tracking.h:167
cs_lnum_t n_particles_max
Definition: cs_lagr_tracking.h:177
integer, save jtp
pointer to particle and locally undisturbed fluid flow temperature (Celsius) for pointer eptp ...
Definition: lagran.f90:404
integer, dimension(3), save jtsup
pointer to velocity prediction for second order in time for array pepa
Definition: lagran.f90:427
static void * cs_lagr_particles_attr(cs_lagr_particle_set_t *particle_set, cs_lnum_t particle_id, cs_lagr_attribute_t attr)
Get pointer to a current attribute of a given particle in a set.
Definition: cs_lagr_tracking.h:417
double precision, dimension(ncharm2), save enc2
encrustation data
Definition: lagran.f90:980
integer, dimension(3), save jtsuf
pointer to seen velocity prediction for second order in time for array pepa
Definition: lagran.f90:430
Definition: cs_lagr_tracking.h:67
Definition: cs_lagr_tracking.h:60
integer, dimension(nusbrd), save iusb
supplementary user boundary statistics
Definition: lagran.f90:1209
integer, save inclg
Definition: lagran.f90:1234
const char * cs_lagr_attribute_name[]
cs_lagr_attribute_t
Definition: cs_lagr_tracking.h:46
static cs_real_t * cs_lagr_particles_source_terms(cs_lagr_particle_set_t *particle_set, cs_lnum_t particle_id, cs_lagr_attribute_t attr)
Get pointer to 2nd order scheme source terms for an attribute of a given particle in a set...
Definition: cs_lagr_tracking.h:827
integer, save jnbasg
Additional pointer in IPEPA and PEPA arrays (contains particule state)
Definition: lagran.f90:291
Definition: cs_lagr_tracking.h:66
static const void * cs_lagr_particle_attr_const(const void *particle, const cs_lagr_attribute_map_t *attr_map, cs_lagr_attribute_t attr)
Get const pointer to current attribute data of a particle.
Definition: cs_lagr_tracking.h:900
void cs_lagr_destroy(void)
Delete particle set structure and other useful buffers.
Definition: cs_lagr_tracking.c:5533
integer, save nbclst
statistic per zone and per class
Definition: lagran.f90:824
integer, save jmfadh
Additional pointer in IPEPA and PEPA arrays (contains particule state)
Definition: lagran.f90:299
Definition: cs_lagr_tracking.h:48
int cs_lagr_resize_particle_set(cs_lnum_t n_min_particles)
Resize particle set buffers if needed.
Definition: cs_lagr_tracking.c:5583
Definition: cs_lagr_tracking.h:94
static void cs_lagr_particle_set_real_n(void *particle, const cs_lagr_attribute_map_t *attr_map, int time_id, cs_lagr_attribute_t attr, cs_real_t value)
Set attribute value of type cs_real_t of a given particle at a given time.
Definition: cs_lagr_tracking.h:1240
integer, dimension(3), save jbx1
pointer to turbulence characteristics for second order in time for array pepa
Definition: lagran.f90:425
static cs_gnum_t cs_lagr_particles_get_gnum(const cs_lagr_particle_set_t *particle_set, cs_lnum_t particle_id, cs_lagr_attribute_t attr)
Get attribute value of type cs_gnum_t of a given particle in a set.
Definition: cs_lagr_tracking.h:622
integer nlayer
maximal number of layer per coal particle
Definition: lagpar.f90:60
cs_lnum_t n_particles
Definition: cs_lagr_tracking.h:165
cs_lnum_t n_failed_part
Definition: cs_lagr_tracking.h:169
void lagbeg(const cs_int_t *nordre, const cs_int_t *nlayer, const cs_int_t *iphyla, const cs_int_t *idepst, const cs_int_t *irough, const cs_int_t *ireent, const cs_int_t *iclogst, const cs_int_t *nvls, const cs_int_t *nbclst, cs_lnum_t icocel[], cs_lnum_t itycel[], cs_int_t *jisor, cs_int_t *jisora, cs_int_t *jirka, cs_int_t *jord1, cs_int_t *jrval, cs_int_t *jrpoi, cs_int_t *jrtsp, cs_int_t *jdp, cs_int_t *jmp, cs_int_t *jxp, cs_int_t *jyp, cs_int_t *jzp, cs_int_t *jup, cs_int_t *jvp, cs_int_t *jwp, cs_int_t *juf, cs_int_t *jvf, cs_int_t *jwf, cs_int_t *jtaux, cs_int_t jbx1[3], cs_int_t jtsup[3], cs_int_t jtsuf[3], cs_int_t *jryplu, cs_int_t *jrinpf, cs_int_t *jdfac, cs_int_t *jimark, cs_int_t *jtp, cs_int_t jhp[], cs_int_t *jtf, cs_int_t *jmwat, cs_int_t jmch[], cs_int_t jmck[], cs_int_t *jcp, cs_int_t *jrdck, cs_int_t *jrd0p, cs_int_t *jinch, cs_int_t jrhock[], cs_int_t *jreps, cs_int_t *jdepo, cs_int_t *jnbasg, cs_int_t *jnbasp, cs_int_t *jfadh, cs_int_t *jmfadh, cs_int_t *jndisp, cs_int_t *jclst, cs_int_t *jvls)
Definition: cs_lagr_tracking.c:4621
double precision, dimension(ncharm2), save visref
ash critical viscosity in , in the fouling model cf J.D. Watt et T. Fereday (J.Inst.Fuel, Vol.42-p99). Useful if iphyla = 2 and iencra = 1
Definition: lagran.f90:991
integer, save jdp
pointer to particle diameter for pointer eptp
Definition: lagran.f90:401
Definition: cs_lagr_tracking.h:90
integer, save iencckbd
Definition: lagran.f90:1179
integer, save iscovc
Definition: lagran.f90:1236
integer, dimension(nflagm), save iusclb
for all the nfrlag boundary zones previously identified, a particle boundary condition type is given...
Definition: lagran.f90:554
static cs_lnum_t cs_lagr_particles_get_lnum_n(const cs_lagr_particle_set_t *particle_set, cs_lnum_t particle_id, int time_id, cs_lagr_attribute_t attr)
Get attribute value of type cs_lnum_t of a given particle in a set at a given time.
Definition: cs_lagr_tracking.h:546
static const void * cs_lagr_particle_attr_n_const(const void *particle, const cs_lagr_attribute_map_t *attr_map, int time_id, cs_lagr_attribute_t attr)
Get const pointer to attribute data of a particle at a given time.
Definition: cs_lagr_tracking.h:947
integer nflagm
maximal number of boundary zones
Definition: lagpar.f90:73
integer, dimension(nflagm), save ilflag
list of number of boundary zones
Definition: lagran.f90:499
static void * cs_lagr_particle_attr_n(void *particle, const cs_lagr_attribute_map_t *attr_map, int time_id, cs_lagr_attribute_t attr)
Get pointer to attribute data of a particle at a given time.
Definition: cs_lagr_tracking.h:923
static cs_gnum_t cs_lagr_particle_get_gnum(const void *particle, const cs_lagr_attribute_map_t *attr_map, cs_lagr_attribute_t attr)
Get attribute value of type cs_gnum_t of a given particle in a set.
Definition: cs_lagr_tracking.h:1069
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:292
static cs_gnum_t cs_lagr_particles_get_gnum_n(const cs_lagr_particle_set_t *particle_set, cs_lnum_t particle_id, int time_id, cs_lagr_attribute_t attr)
Get attribute value of type cs_gnum_t of a given particle in a set at a given time.
Definition: cs_lagr_tracking.h:648
int n_time_vals
Definition: cs_lagr_tracking.h:130
struct _cs_lagr_tracking_list_t cs_lagr_tracking_list_t
Definition: cs_lagr_tracking.h:156
static void cs_lagr_particles_set_lnum(cs_lagr_particle_set_t *particle_set, cs_lnum_t particle_id, cs_lagr_attribute_t attr, cs_lnum_t value)
Set attribute value of type cs_lnum_t of a given particle in a set.
Definition: cs_lagr_tracking.h:570
integer, dimension(nlayer), save jhp
pointer to coal particle temperature ( ) for pointer eptp
Definition: lagran.f90:411
integer, save jfadh
Additional pointer in IPEPA and PEPA arrays (contains particule state)
Definition: lagran.f90:297
integer, save jmp
pointer to particle mass for pointer eptp
Definition: lagran.f90:399
void dplprt(cs_int_t *p_scheme_order, cs_real_t boundary_stat[], const cs_int_t *iensi3, const cs_int_t *inbr, const cs_int_t *inbrbd, const cs_int_t *iflm, const cs_int_t *iflmbd, const cs_int_t *iang, const cs_int_t *iangbd, const cs_int_t *ivit, const cs_int_t *ivitbd, const cs_int_t *iencnd, const cs_int_t *iencma, const cs_int_t *iencdi, const cs_int_t *iencck, const cs_int_t *iencnbbd, const cs_int_t *iencmabd, const cs_int_t *iencdibd, const cs_int_t *iencckbd, const cs_int_t *inclg, const cs_int_t *iscovc, const cs_int_t *nusbor, cs_int_t iusb[], cs_real_t visc_length[], cs_real_t dlgeo[], cs_real_t energt[], const cs_real_t tprenc[], const cs_real_t visref[], const cs_real_t enc1[], const cs_real_t enc2[], const cs_real_t *tkelvi)
Definition: cs_lagr_tracking.c:5180
integer, save iangbd
activation (=1) or not (=0) of the recording of the angle between a particle trajectory and a boundar...
Definition: lagran.f90:1164
integer, save jtf
pointer to particle and locally undisturbed fluid flow temperature (Celsius) for pointer eptp ...
Definition: lagran.f90:407
integer, dimension(nlayer), save jrhock
pointer to coal density for array pepa
Definition: lagran.f90:452
Definition: cs_lagr_tracking.h:88
Definition: cs_lagr_tracking.h:99
double precision, dimension(ncharm2), save tprenc
limit temperature (in degree Celsius) below which the coal particles do not cause any fouling (if the...
Definition: lagran.f90:985
#define END_C_DECLS
Definition: cs_defs.h:420
double cs_real_t
Definition: cs_defs.h:296
static void cs_lagr_particle_set_real(void *particle, const cs_lagr_attribute_map_t *attr_map, cs_lagr_attribute_t attr, cs_real_t value)
Set attribute value of type cs_real_t of a given particle.
Definition: cs_lagr_tracking.h:1215
Definition: cs_lagr_tracking.h:76
Definition: cs_lagr_tracking.h:58
size_t extents
Definition: cs_lagr_tracking.h:127
integer, save jrdck
pointer to coal particle shrinking core diameter for array pepa
Definition: lagran.f90:449
integer, save iflmbd
activation (=1) or not (=0) of the recording of the particulate mass flow related to the particle/bou...
Definition: lagran.f90:1158
#define CS_PROCF(x, y)
Definition: cs_defs.h:433
int roughness
Definition: cs_lagr_tracking.h:202
integer, save ivitbd
activation (=1) or not (=0) of the recording of the velocity of a particle involved in a particle/bou...
Definition: lagran.f90:1170
integer, save nusbor
number additional user data to record for the calculation of additional boundary statistics in parbor...
Definition: lagran.f90:1117
Definition: cs_lagr_tracking.h:61
integer, save jirka
pointer to number of the previous rank containing the particle for ipepa array
Definition: lagran.f90:463
integer, save jup
pointer to particle X velocity component for pointer eptp
Definition: lagran.f90:384
static cs_gnum_t cs_lagr_particle_get_gnum_n(const void *particle, const cs_lagr_attribute_map_t *attr_map, int time_id, cs_lagr_attribute_t attr)
Get attribute value of type cs_gnum_t of a given particle at a given time.
Definition: cs_lagr_tracking.h:1094
cs_real_t weight
Definition: cs_lagr_tracking.h:171
int n_user_variables
Definition: cs_lagr_tracking.h:207
Definition: cs_lagr_tracking.h:68
static void cs_lagr_particles_set_real_n(cs_lagr_particle_set_t *particle_set, cs_lnum_t particle_id, int time_id, cs_lagr_attribute_t attr, cs_real_t value)
Set attribute value of type cs_real_t of a given particle in a set at a given time.
Definition: cs_lagr_tracking.h:800
void cs_lagr_set_reallocation_factor(double f)
Set reallocation factor for particle sets.
Definition: cs_lagr_tracking.c:5614
static const void * cs_lagr_particles_attr_n_const(const cs_lagr_particle_set_t *particle_set, cs_lnum_t particle_id, int time_id, cs_lagr_attribute_t attr)
Get const pointer to attribute data of a given particle in a set at a given time. ...
Definition: cs_lagr_tracking.h:495
integer, save jryplu
Additional pointer in the IPEPA array (contains the particule state)
Definition: lagran.f90:265
static const cs_real_t * cs_lagr_particle_source_term_const(void *particle, const cs_lagr_attribute_map_t *attr_map, cs_lagr_attribute_t attr)
Get pointer to 2nd order scheme attribute source terms of a particle.
Definition: cs_lagr_tracking.h:1289
integer, save ivit
mean interaction velocity with the boundary faces
Definition: lagran.f90:1191
Definition: cs_lagr_tracking.h:73
int n_stat_classes
Definition: cs_lagr_tracking.h:206
static cs_lnum_t cs_lagr_particle_get_lnum_n(const void *particle, const cs_lagr_attribute_map_t *attr_map, int time_id, cs_lagr_attribute_t attr)
Get attribute value of type cs_lnum_t of a given particle at a given time.
Definition: cs_lagr_tracking.h:996
Definition: cs_lagr_tracking.h:56
Definition: cs_lagr_tracking.h:96
Definition: cs_lagr_tracking.h:125
static cs_lnum_t cs_lagr_particles_get_lnum(const cs_lagr_particle_set_t *particle_set, cs_lnum_t particle_id, cs_lagr_attribute_t attr)
Get attribute value of type cs_lnum_t of a given particle in a set.
Definition: cs_lagr_tracking.h:520
integer, save jdepo
Additional pointer in IPEPA and PEPA arrays (contains particule state)
Definition: lagran.f90:295
void cs_lagr_set_n_g_particles_max(unsigned long long n_g_particles_max)
Set global maximum number of particles.
Definition: cs_lagr_tracking.c:5632
integer, dimension(nlayer), save jmck
pointer to mass of coke of the coal particle for pointer eptp
Definition: lagran.f90:417
Definition: cs_lagr_tracking.h:62
cs_lnum_t first_free_id
Definition: cs_lagr_tracking.h:180
integer, save jndisp
Additional pointer in IPEPA and PEPA arrays (contains particule state)
Definition: lagran.f90:301
integer, save jtaux
pointer to work array for the second order in time for pointer pepa
Definition: lagran.f90:422
integer, dimension(:), allocatable itycel
Definition: pointe.f90:387
integer, save nordre
order of integration for the stochastic differential equations
Definition: lagran.f90:1070
cs_lagr_tracking_list_t * used_id
Definition: cs_lagr_tracking.h:186
integer, save jinch
pointer to number of the coal particle for ipepa array
Definition: lagran.f90:465
Definition: cs_lagr_tracking.h:101
static const cs_real_t * cs_lagr_particles_source_terms_const(cs_lagr_particle_set_t *particle_set, cs_lnum_t particle_id, cs_lagr_attribute_t attr)
Get const pointer to 2nd order scheme source terms an attribute of a given particle in a set...
Definition: cs_lagr_tracking.h:853
static void cs_lagr_particles_set_lnum_n(cs_lagr_particle_set_t *particle_set, cs_lnum_t particle_id, int time_id, cs_lagr_attribute_t attr, cs_lnum_t value)
Set attribute value of type cs_lnum_t of a given particle in a set at a given time.
Definition: cs_lagr_tracking.h:596
integer, save iensi3
Definition: lagran.f90:1286
cs_lnum_t first_used_id
Definition: cs_lagr_tracking.h:179
integer, save jnbasp
Additional pointer in IPEPA and PEPA arrays (contains particule state)
Definition: lagran.f90:293
Definition: cs_lagr_tracking.h:72
integer, save jrtsp
pointer to particle residence time for array pepa
Definition: lagran.f90:437
double precision, dimension(:,:), pointer dlgeo
Definition: pointe.f90:395
int clogging
Definition: cs_lagr_tracking.h:204
int(* count)[CS_LAGR_N_ATTRIBUTES]
Definition: cs_lagr_tracking.h:139
static void cs_lagr_particle_set_lnum(void *particle, const cs_lagr_attribute_map_t *attr_map, cs_lagr_attribute_t attr, cs_lnum_t value)
Set attribute value of type cs_lnum_t of a given particle.
Definition: cs_lagr_tracking.h:1019
Definition: cs_lagr_tracking.h:194