File: cs_lagr_log.c

package info (click to toggle)
code-saturne 4.3.3%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 77,992 kB
  • sloc: ansic: 281,257; f90: 122,305; python: 56,490; makefile: 3,915; xml: 3,285; cpp: 3,183; sh: 1,139; lex: 176; yacc: 101; sed: 16
file content (745 lines) | stat: -rw-r--r-- 23,637 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
/*============================================================================
 * Lagrangian module logging
 *============================================================================*/

/*
  This file is part of Code_Saturne, a general-purpose CFD tool.

  Copyright (C) 1998-2016 EDF S.A.

  This program is free software; you can redistribute it and/or modify it under
  the terms of the GNU General Public License as published by the Free Software
  Foundation; either version 2 of the License, or (at your option) any later
  version.

  This program is distributed in the hope that it will be useful, but WITHOUT
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
  details.

  You should have received a copy of the GNU General Public License along with
  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
  Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

/*----------------------------------------------------------------------------*/

#include "cs_defs.h"

/*----------------------------------------------------------------------------
 * Standard C library headers
 *----------------------------------------------------------------------------*/

#include <limits.h>
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <ctype.h>
#include <float.h>
#include <assert.h>

/*----------------------------------------------------------------------------
 *  Local headers
 *----------------------------------------------------------------------------*/

#include "bft_printf.h"
#include "bft_error.h"
#include "bft_mem.h"

#include "cs_log.h"

#include "cs_math.h"

#include "cs_mesh.h"
#include "cs_parall.h"

#include "cs_field.h"

#include "cs_lagr.h"
#include "cs_lagr_tracking.h"
#include "cs_lagr_post.h"
#include "cs_lagr_stat.h"

#include "cs_lagr_prototypes.h"

/*----------------------------------------------------------------------------
 *  Header for the current file
 *----------------------------------------------------------------------------*/

#include "cs_lagr_log.h"

/*----------------------------------------------------------------------------*/

BEGIN_C_DECLS

/*=============================================================================
 * Additional doxygen documentation
 *============================================================================*/

/*!
  \file cs_lagr_listing.c
*/

/*! \cond DOXYGEN_SHOULD_SKIP_THIS */

/*============================================================================
 * Static global variables
 *============================================================================*/

const char *_astat[2] = {N_("off"), N_("on")};

/*! (DOXYGEN_SHOULD_SKIP_THIS) \endcond */

/*============================================================================
 * Private function definitions
 *============================================================================*/

/*----------------------------------------------------------------------------*/
/*!
 * \brief  Return string indicating on/off depending on integer value
 *
 * \param  i  input integer
 *
 * \return  status string, possibly translated
 */
/*----------------------------------------------------------------------------*/

static const char *
_status(int i)
{
  return (i > 0) ? _(_astat[1]) : _(_astat[0]);
}

/*----------------------------------------------------------------*/
/*!
 *\brief  Calcul des valeurs min max et moyenne pour les statistiques aux frontieres.
 *
 * Parameters:
 * \param[in]  ivar      numero de la variable a integrer
 * \param[out] gmin      valeurs  min
 * \param[out] gmax      valeurs  max
 * \param[in]  unsnbr    inverse du nombre interaction frontiere pour moyenne
 * \param[in]  unsnbrfou inverse du nombre interaction frontiere (avec fouling) pour moyenne
 */
 /*----------------------------------------------------------------*/

static void
_lagstf(int         ivar,
        cs_real_t  *gmin,
        cs_real_t  *gmax,
        cs_real_t   unsnbr[],
        cs_real_t   unsnbrfou[])
{
  cs_lagr_boundary_interactions_t *lagr_bd_i = cs_glob_lagr_boundary_interactions;
  cs_lnum_t nfabor = cs_glob_mesh->n_b_faces;

  /* initializations */
  cs_lnum_t nbrfac  = 0;
  *gmax  = -cs_math_big_r;
  *gmin  =  cs_math_big_r;

  cs_real_t  seuilf = cs_glob_lagr_stat_options->threshold;

  if (lagr_bd_i->imoybr[ivar] == 3) {

    for (cs_lnum_t ifac = 0; ifac < nfabor; ifac++) {

      if (bound_stat[ifac + nfabor * lagr_bd_i->iencnb] > seuilf) {

        nbrfac++;
        *gmax = CS_MAX(*gmax, bound_stat[ifac + nfabor * ivar] / unsnbrfou[ifac]);
        *gmin = CS_MIN(*gmin, bound_stat[ifac + nfabor * ivar] / unsnbrfou[ifac]);

      }

    }

  }
  else if (lagr_bd_i->imoybr[ivar] == 2) {

    for (cs_lnum_t ifac = 0; ifac < nfabor; ifac++) {

      if (bound_stat[ifac + nfabor * lagr_bd_i->inbr] > seuilf) {

        nbrfac++;
        *gmax = CS_MAX(*gmax, bound_stat[ifac + nfabor * ivar] * unsnbr[ifac]);
        *gmin = CS_MIN(*gmin, bound_stat[ifac + nfabor * ivar] * unsnbr[ifac]);

      }

    }

  }
  else if (lagr_bd_i->imoybr[ivar] == 1) {

    for (cs_lnum_t ifac = 0; ifac < nfabor; ifac++) {

      if (bound_stat[ifac + nfabor * lagr_bd_i->inbr] > seuilf) {

        nbrfac++;
        *gmax = CS_MAX(*gmax, bound_stat[ifac + nfabor * ivar] / lagr_bd_i->tstatp);
        *gmin = CS_MIN(*gmin, bound_stat[ifac + nfabor * ivar] / lagr_bd_i->tstatp);

      }

    }

  }
  else if (lagr_bd_i->imoybr[ivar] == 0) {

    for (cs_lnum_t ifac = 0; ifac < nfabor; ifac++) {

      if (bound_stat[ifac + nfabor * lagr_bd_i->inbr] > seuilf) {

        nbrfac++;
        *gmax = CS_MAX(*gmax, bound_stat[ifac + nfabor * ivar]);
        *gmin = CS_MIN(*gmin, bound_stat[ifac + nfabor * ivar]);

      }

    }

  }

  if (nbrfac == 0) {

    *gmax     = 0.0;
    *gmin     = 0.0;

  }
}

/*============================================================================
 * Public function definitions
 *============================================================================*/

/*----------------------------------------------------------------------------*/
/*!
 * \brief  Log Lagrangian module output in the setup file.
 */
/*----------------------------------------------------------------------------*/

void
cs_lagr_log_setup(void)
{
  /* Check if this call is needed */

  if (cs_glob_lagr_time_scheme == NULL)
    return;

  if (cs_glob_lagr_time_scheme->iilagr < 1)
    return;

  /* Now add Lagrangian setup info */

  cs_log_printf(CS_LOG_SETUP,
                _("\n"
                  "Lagrangian model options\n"
                  "------------------------\n"));

  cs_log_printf
    (CS_LOG_SETUP,
     _("  Continuous phase:\n"
       "    iilagr:                 %3d  (0: Lagrangian deactivated\n"
       "                                  1: one way coupling\n"
       "                                  2: two way coupling\n"
       "                                  3: on frozen fields)\n"
       "    restart: %s\n"
       "    statistics/return source terms restart: %s\n\n"
       "  Specific physics associated with particles\n"
       "    physical_model:         %3d  (0: no additional equations\n"
       "                                  1: equations on Dp Tp Mp\n"
       "                                  2: coal particles)\n"),
     cs_glob_lagr_time_scheme->iilagr,
     _status(cs_glob_lagr_time_scheme->isuila),
     _status(cs_glob_lagr_stat_options->isuist),
     cs_glob_lagr_model->physical_model);

  if (cs_glob_lagr_model->physical_model == 1)
    cs_log_printf
      (CS_LOG_SETUP,
       _("    idpvar:                 %3d  (1: eqn diameter Dp,    or 0)\n"
         "    itpvar:                 %3d  (1: eqn temperature Tp, or 0)\n"
         "    impvar:                 %3d  (1: eqn mass Mp,        or 0)\n"),
       cs_glob_lagr_specific_physics->idpvar,
       cs_glob_lagr_specific_physics->itpvar,
       cs_glob_lagr_specific_physics->impvar);

  cs_log_printf
    (CS_LOG_SETUP,
     _("\n  Global parameters:\n"
       "    user particle variables: %2d\n"
       "    isttio:                 %3d  (1: steady carrier phase)\n"),
     cs_glob_lagr_model->n_user_variables,
     cs_glob_lagr_time_scheme->isttio);

  if (cs_glob_lagr_model->physical_model == 2) {

    cs_log_printf
      (CS_LOG_SETUP,
       _("\n  Coal options:\n"
         "    fouling: %s\n"),
       _status(cs_glob_lagr_model->fouling));

    const cs_lagr_extra_module_t *extra = cs_get_lagr_extra_module();

    for (int i = 0; i < extra->ncharb; i++)
      cs_log_printf
        (CS_LOG_SETUP,
         _("    tprenc[%3d]:    %11.5e (threshold T for coal fouling %d)\n"),
         i, cs_glob_lagr_encrustation->tprenc[i], i);

    for (int i = 0; i < extra->ncharb; i++)
      cs_log_printf
        (CS_LOG_SETUP,
         _("    visref[%3d]:    %11.5e (critical coal viscosity %d)\n"),
         i, cs_glob_lagr_encrustation->visref[i], i);

  }

  if (cs_glob_lagr_model->physical_model == 2) {

    cs_log_printf
      (CS_LOG_SETUP,
       _("\n  Return coupling options:\n"
         "    start iteration for time average:  %d\n"
         "    dynamic return coupling:           %s\n"
         "    mass return coupling:              %s\n"
         "    thermal return coupling:           %s\n"),
       cs_glob_lagr_source_terms->nstits,
       _status(cs_glob_lagr_source_terms->ltsdyn),
       _status(cs_glob_lagr_source_terms->ltsmas),
       _status(cs_glob_lagr_source_terms->ltsthe));
  }

  cs_log_printf
    (CS_LOG_SETUP,
     _("\n"
       "  Statistics options:\n"
       "  starting iteration for statistics:        %d\n"
       "  starting iteration for steady statistics: %d\n"
       "  threshold for statistical meaning:        %11.3e\n"),
     cs_glob_lagr_stat_options->idstnt,
     cs_glob_lagr_stat_options->nstist,
     cs_glob_lagr_stat_options->threshold);

  cs_log_printf
    (CS_LOG_SETUP,
     _("\n  Turbulent dispersion options:\n"
       "    lagrangian turbulent dispersion:              %s\n"
       "      identical to fluid turbulent diffusion:     %s\n"
       "    apply complete model from time step:          %d\n"),
     _status(cs_glob_lagr_time_scheme->idistu),
     _status(cs_glob_lagr_time_scheme->idiffl),
     cs_glob_lagr_time_scheme->modcpl);

  if (cs_glob_lagr_time_scheme->modcpl) {
    const char c_dir[] = "xyze";
    int _idirla = cs_glob_lagr_time_scheme->modcpl;
    cs_log_printf
      (CS_LOG_SETUP,
       _("    complete model main flow direction: %c\n"),
       c_dir[_idirla]);
  }

  cs_log_printf
    (CS_LOG_SETUP,
     _("\n  Numerical options:\n"
       "    trajectory time scheme order:                 %d\n"
       "    Poisson correction for particle velocity:     %s\n"),
     cs_glob_lagr_time_scheme->t_order,
     _status(cs_glob_lagr_time_scheme->ilapoi));

  cs_log_printf
    (CS_LOG_SETUP,
     _("\n  Trajectory/particle postprocessing options:\n"
       "    fluid velocity seen:                          %s\n"
       "    velocity:                                     %s\n"
       "    residence time:                               %s\n"
       "    diameter:                                     %s\n"
       "    temperature:                                  %s\n"
       "    mass:                                         %s\n"),
     _status(cs_glob_lagr_post_options->ivisv1),
     _status(cs_glob_lagr_post_options->ivisv2),
     _status(cs_glob_lagr_post_options->ivistp),
     _status(cs_glob_lagr_post_options->ivisdm),
     _status(cs_glob_lagr_post_options->iviste),
     _status(cs_glob_lagr_post_options->ivismp));

  if (cs_glob_lagr_model->physical_model == 2)
    cs_log_printf
      (CS_LOG_SETUP,
       _("    shrinking core diameter:                      %s\n"
         "    moisture mass:                                %s\n"
         "    active coal mass:                             %s\n"
         "    coke mass:                                    %s\n"),
       _status(cs_glob_lagr_post_options->ivisdk),
       _status(cs_glob_lagr_post_options->iviswat),
       _status(cs_glob_lagr_post_options->ivisch),
       _status(cs_glob_lagr_post_options->ivisck));

  cs_log_printf
    (CS_LOG_SETUP,
     _("\n  Statistics for particles/boundary interaction:\n"
       "    compute wall statistics: %s\n"),
     _status(cs_glob_lagr_post_options->iensi3));

  if (cs_glob_lagr_post_options->iensi3)
    cs_log_printf
      (CS_LOG_SETUP,
       _("    number of interactions:                       %s\n"
         "    particle mass flow:                           %s\n"
         "    impact angle:                                 %s\n"
         "    impact velocity:                              %s\n"
         "    interactions with fouling:                    %s\n"
         "    fouling coal mass flux:                       %s\n"
         "    fouling coal diameter:                        %s\n"
         "    fouling coal coke fraction:                   %s\n"
         "    number of additional user statistics:         %d\n"),
       _status(cs_glob_lagr_boundary_interactions->inbrbd),
       _status(cs_glob_lagr_boundary_interactions->iflmbd),
       _status(cs_glob_lagr_boundary_interactions->iangbd),
       _status(cs_glob_lagr_boundary_interactions->ivitbd),
       _status(cs_glob_lagr_boundary_interactions->iencnbbd),
       _status(cs_glob_lagr_boundary_interactions->iencmabd),
       _status(cs_glob_lagr_boundary_interactions->iencdibd),
       _status(cs_glob_lagr_boundary_interactions->iencckbd),
       cs_glob_lagr_boundary_interactions->nusbor);

  /* Volumic statistics   */

  cs_log_printf(CS_LOG_SETUP,
                _("\n"
                  "Lagrangian statistics\n"
                  "---------------------\n\n"));

  cs_log_printf
    (CS_LOG_SETUP,
     _("  Start of calculation from absolute iteration n°: %10d\n"),
     cs_glob_lagr_stat_options->idstnt);

  if (cs_glob_time_step->nt_cur >= cs_glob_lagr_stat_options->idstnt) {

    if (cs_glob_lagr_time_scheme->isttio == 1) {
      cs_log_printf
        (CS_LOG_SETUP,
         _("  Start of steady-state statistics from Lagrangian "
           "iteration n°: %10d)\n"),
         cs_glob_lagr_stat_options->nstist);

    }
    cs_log_printf(CS_LOG_SETUP, "\n");

  }
}

/*----------------------------------------------------------------------------*/
/*!
 * \brief  Log Lagrangian module output in the main listing file.
 */
/*----------------------------------------------------------------------------*/

void
cs_lagr_log_iteration(void)
{
  /* Check if this call is needed */

  if (cs_glob_lagr_time_scheme == NULL)
    return;

  if (cs_glob_lagr_time_scheme->iilagr < 1)
    return;

  const cs_real_t  *b_stats = bound_stat;

  cs_log_printf(CS_LOG_DEFAULT,
                _("   ** INFORMATION ON THE LAGRANGIAN CALCULATION\n"));
  cs_log_separator(CS_LOG_DEFAULT);

  /* Make sure counters are up-to-date */

  const cs_lagr_particle_counter_t *pc = cs_lagr_update_particle_counter();

  /* Number of particles  */
  cs_log_printf(CS_LOG_DEFAULT,
                _("\n"));
  cs_log_printf(CS_LOG_DEFAULT,
                _("   Current number of particles "
                  "(with and without statistical weight) :\n"));
  cs_log_printf(CS_LOG_DEFAULT,
                _("\n"));
  cs_log_printf
    (CS_LOG_DEFAULT,
     _("ln  newly injected                           %8llu   %14.5E\n"),
     (unsigned long long)(pc->n_g_new),
     pc->w_new);

  if (cs_glob_lagr_model->physical_model == 2 && cs_glob_lagr_model->fouling == 1)
    cs_log_printf
      (CS_LOG_DEFAULT,
       _("ln  coal particles fouled                    %8llu   %14.5E\n"),
       (unsigned long long)(pc->n_g_fouling), pc->w_fouling);

  cs_log_printf
    (CS_LOG_DEFAULT,
     _("ln  out, or deposited and eliminated         %8llu   %14.5E\n"),
     (unsigned long long)(pc->n_g_exit), pc->w_exit);
  cs_log_printf
    (CS_LOG_DEFAULT,
     _("ln  deposited                                %8llu   %14.5E\n"),
     (unsigned long long)(pc->n_g_deposited), pc->w_deposited);

  if (cs_glob_lagr_model->resuspension > 0)
    cs_log_printf
      (CS_LOG_DEFAULT,
       _("ln  resuspended                              %8llu   %14.5E\n"),
       (unsigned long long)(pc->n_g_resuspended),
       pc->w_resuspended);

  cs_log_printf
    (CS_LOG_DEFAULT,
     _("ln  lost in the location stage               %8llu\n"),
     (unsigned long long)(pc->n_g_failed));
  cs_log_printf
    (CS_LOG_DEFAULT,
     _("ln  total number at the end of the time step %8llu   %14.5E\n"),
     (unsigned long long)pc->n_g_total, pc->w_total);

  if (pc->n_g_cumulative_total > 0)
    cs_log_printf(CS_LOG_DEFAULT,
                  _("%% of lost particles (restart(s) included): %13.4E\n"),
                  pc->n_g_cumulative_failed * 100. / pc->n_g_cumulative_total);
      cs_log_separator(CS_LOG_DEFAULT);

  /* Flow rate for each zone   */
  cs_log_printf(CS_LOG_DEFAULT,
                _("   Zone     Mass flow rate(kg/s)      Boundary type\n"));

  int nbfr = 0;
  cs_lagr_bdy_condition_t *bdy_cond = cs_lagr_get_bdy_conditions();

  /* TODO log for internal zone */
  cs_lagr_internal_condition_t *internal_cond = cs_lagr_get_internal_conditions();

  for (cs_lnum_t ii = 0; ii < bdy_cond->n_b_zones; ii++) {

    if (bdy_cond->b_zone_id[ii] >= nbfr-1)
      nbfr = bdy_cond->b_zone_id[ii] + 1;

  }

  if (cs_glob_rank_id >= 0)
    cs_parall_counter_max(&nbfr, 1);

  cs_real_t debloc[2];
  for (cs_lnum_t nb = 0; nb < nbfr; nb++) {

    debloc[0] = 0.0;
    debloc[1] = 0.0;

    for (cs_lnum_t ii = 0; ii < bdy_cond->n_b_zones; ii++) {

      if (bdy_cond->b_zone_id[ii] == nb) {
        debloc[0] = 1.0;
        debloc[1] = bdy_cond->particle_flow_rate[nb];
      }

    }

    cs_parall_sum(2, CS_REAL_TYPE, debloc);

    if (debloc[0] > 0.5) {

      char const *chcond;

      if (bdy_cond->b_zone_natures[nb] == CS_LAGR_INLET)
        chcond = "INLET";

      else if (bdy_cond->b_zone_natures[nb] == CS_LAGR_REBOUND)
        chcond = "REBOUND";

      else if (bdy_cond->b_zone_natures[nb] == CS_LAGR_OUTLET)
        chcond = "OUTLET";

      else if (   bdy_cond->b_zone_natures[nb] == CS_LAGR_DEPO1
               || bdy_cond->b_zone_natures[nb] == CS_LAGR_DEPO2)
        chcond = "DEPOSITION";

      else if (bdy_cond->b_zone_natures[nb] == CS_LAGR_FOULING)
        chcond = "FOULING";

      else if (bdy_cond->b_zone_natures[nb] == CS_LAGR_DEPO_DLVO)
        chcond = "DLVO CONDITIONS";

      else if (bdy_cond->b_zone_natures[nb] == CS_LAGR_SYM)
        chcond = "SYMMETRY";

      else
        chcond = "USER";

      cs_log_printf(CS_LOG_DEFAULT,
                    "  %3d          %12.5E         %s\n",
                    nb,
                    debloc[1]/cs_glob_lagr_time_step->dtp,
                    chcond);

    }

  }

  cs_log_separator(CS_LOG_DEFAULT);

  /* Boundary statistics  */
  if (cs_glob_lagr_post_options->iensi3 == 1) {

    cs_log_printf(CS_LOG_DEFAULT,
                  _("   Boundary statistics :\n"));
    cs_log_printf(CS_LOG_DEFAULT,
                  "\n");

    if (cs_glob_lagr_time_scheme->isttio == 1) {

      if (cs_glob_time_step->nt_cur >= cs_glob_lagr_stat_options->nstist)
        cs_log_printf(CS_LOG_DEFAULT,
                      _("Number of iterations in steady-state statistics: %10d\n"),
                      cs_glob_lagr_boundary_interactions->npstf);

      else
        cs_log_printf(CS_LOG_DEFAULT,
                      _("Start of steady-state statistics from time step n°: %8d\n"),
                      cs_glob_lagr_stat_options->nstist);

    }

    cs_log_printf(CS_LOG_DEFAULT,
                  _("Total number of iterations in the statistics:%10d\n"),
                  cs_glob_lagr_boundary_interactions->npstft);
    cs_log_printf(CS_LOG_DEFAULT,
                  "\n");

    if (cs_glob_lagr_dim->nvisbr > 0) {

      cs_log_printf(CS_LOG_DEFAULT,
                    _("                           Min value    Max value    \n"));

      const cs_real_t _threshold = 1.e-30;

      cs_real_t *tabvr = NULL;
      cs_real_t *tabvrfou = NULL;

      if (cs_glob_lagr_boundary_interactions->inbrbd == 1) {

        /* Allocate a work array     */
        BFT_MALLOC(tabvr, cs_glob_mesh->n_b_faces, cs_real_t);

        const cs_lnum_t s_id = cs_glob_lagr_boundary_interactions->inbr;

        for (cs_lnum_t ifac = 0; ifac < cs_glob_mesh->n_b_faces; ifac++) {

          if (b_stats[ifac + cs_glob_mesh->n_b_faces * s_id] > _threshold)
            tabvr[ifac] = 1.0 / b_stats[ifac + cs_glob_mesh->n_b_faces * s_id];
          else
            tabvr[ifac] = 0.0;

        }

      }

      if (cs_glob_lagr_boundary_interactions->iencnbbd == 1) {

        BFT_MALLOC(tabvrfou, cs_glob_mesh->n_b_faces, cs_real_t);

        const cs_lnum_t s_id = cs_glob_lagr_boundary_interactions->iencnb;

        for (cs_lnum_t ifac = 0; ifac < cs_glob_mesh->n_b_faces; ifac++) {

          if (b_stats[ifac + cs_glob_mesh->n_b_faces * s_id] > _threshold)
            tabvrfou[ifac] = 1.0 / b_stats[ifac + cs_glob_mesh->n_b_faces * s_id];
          else
            tabvrfou[ifac] = 0.0;

        }
      }

      for (int ivf = 0; ivf < cs_glob_lagr_dim->nvisbr; ivf++) {

        cs_real_t gmin = cs_math_big_r;
        cs_real_t gmax =-cs_math_big_r;

        _lagstf(ivf, &gmin, &gmax, tabvr, tabvrfou);

        cs_parall_min(1, CS_REAL_TYPE, &gmin);
        cs_parall_max(1, CS_REAL_TYPE, &gmax);

        cs_log_printf(CS_LOG_DEFAULT,
                      "lp  %20s  %12.5E  %12.5E\n",
                      cs_glob_lagr_boundary_interactions->nombrd[ivf],
                      gmin,
                      gmax);

      }

      /* Free memory     */

      if (tabvr != NULL)
        BFT_FREE(tabvr);
      if (tabvrfou != NULL)
        BFT_FREE(tabvrfou);

      cs_log_separator(CS_LOG_DEFAULT);

    }

  }

  /* Information about two-way coupling  */

  if (cs_glob_lagr_time_scheme->iilagr == 2) {

    if (cs_glob_lagr_time_scheme->isttio == 0) {

      cs_log_printf(CS_LOG_DEFAULT,
                    _("   Unsteady two-way coupling source terms:\n"));
      cs_log_separator(CS_LOG_DEFAULT);

    }
    else if (cs_glob_lagr_time_scheme->isttio == 1) {

      cs_log_printf(CS_LOG_DEFAULT,
                    _("   Two-way coupling source terms:\n"));
      cs_log_separator(CS_LOG_DEFAULT);

      if (cs_glob_time_step->nt_cur < cs_glob_lagr_source_terms->nstits)
        cs_log_printf(CS_LOG_DEFAULT,
                      _("Reset of the source terms (Start of steady-state at:): %10d\n"),
                      cs_glob_lagr_source_terms->nstits);

      else if (cs_glob_time_step->nt_cur >= cs_glob_lagr_stat_options->nstist)
        cs_log_printf(CS_LOG_DEFAULT,
                      _("Number of iterations for the steady-state source terms:%10d\n"),
                      cs_glob_lagr_source_terms->npts);

    }

    cs_log_printf(CS_LOG_DEFAULT,
                  _("Maximum particle volume fraction : %14.5E\n"),
                  cs_glob_lagr_source_terms->vmax);
    cs_log_printf(CS_LOG_DEFAULT,
                  _("Maximum particle mass fraction :  %14.5E\n"),
                  cs_glob_lagr_source_terms->tmamax);
    cs_log_printf(CS_LOG_DEFAULT,
                  _("Number of cells with a part. volume fraction greater than 0.8 :%10d\n"),
                  cs_glob_lagr_source_terms->ntxerr);
    cs_log_separator(CS_LOG_DEFAULT);

  }

  return;

}

/*----------------------------------------------------------------------------*/

END_C_DECLS