programming language draft.distribution
TRANSCRIPT
Unpublishedworkingdraft.
Not for distribution.
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
Development of an Aircraft Aero-Icing Suite Using ChapelProgramming Language
Hélène Papillon LarocheSimon Bourgault-CôtéMatthieu ParenteauEric Laurendeau
[email protected]@[email protected]@polymtl.caPolytechnique MontréalMontréal, Québec, Canada
ABSTRACTThis paper presents an aircraft ice accretion simulation suite imple-mented in the Chapel programming language for deterministic andstochastic ice accretion in two (2D) and three (3D) dimensions. Thework is performed inside the CHApel Multi-Physics Simulationsoftware (CHAMPS) developed at Polytechnique Montreal since2019. Different physical models are added to the flow solver to simu-late the droplet trajectories, the surface thermodynamic exchanges,and the surface deformation. The object-oriented approach used inthe development of CHAMPS, combined with the generic functionsand types from Chapel, allowed the development of a code thatis easy to maintain and that still has high growth potential. Thelatest extension to CHAMPS is the capability to perform stochasticice accretion using an advancing front grid methodology at thecore and by randomly distributing the droplets, like in a cloud.Although stochastic ice accretion is not new, this paper presentsan original methodology that has advantages over other methodsfrom the literature, such as conserving a valid surface mesh fromthe beginning to the end of the stochastic accretion. Multi-layerice accretion results are presented in 2D and 3D for a deterministicmethodology, whereas single-layer 2D results are presented for thestochastic method.
CCS CONCEPTS• Applied computing→ Aerospace.
KEYWORDSComputational Fluid Dynamics, Aircraft Icing, Icing Prediction,Multi-Physics Simulation Software, Chapel Programming Language
Unpublished working draft. Not for distribution.Permission to make digital or hard copies of all or part of this work for personal orclassroom use is granted without fee provided that copies are not made or distributedfor profit or commercial advantage and that copies bear this notice and the full citationon the first page. Copyrights for components of this work owned by others than ACMmust be honored. Abstracting with credit is permitted. To copy otherwise, or republish,to post on servers or to redistribute to lists, requires prior specific permission and/or afee. Request permissions from [email protected] 2021, June 04, 2021, Online© 2021 Association for Computing Machinery.ACM ISBN 978-x-xxxx-xxxx-x/YY/MM. . . $15.00
ACM Reference Format:Hélène Papillon Laroche, Simon Bourgault-Côté,Matthieu Parenteau, and EricLaurendeau. 2021. Development of an Aircraft Aero-Icing Suite UsingChapel Programming Language. In Chapel Implementers and Users Workshop2021, June 04, 2021, Virtual format. 9 pages.
1 INTRODUCTIONAircraft icing involves complex multi-physical phenomena and isa field of great interest in terms of in-flight safety. The modelingof these phenomena using numerical simulations allows a betterunderstanding of the degradation of the aerodynamic performancesdue to ice accretion on exposed surfaces. These numerical simu-lations are even more important in the certification of an aircraftsince it is unlikely, if not impossible, to evaluate all the icing condi-tions foreseen by the Appendix C of FAR part 25 [9] using in-flighttests.
Ice accretion happens as an aircraft passes through a cloud ofsupercooled droplets which leads to thermodynamic exchanges.Therefore, the numerical simulations are complex since the physicalphenomenon involves the airflow, the impingement of the droplets,the thermodynamic exchanges, and the ice growth. Traditionally,multi-physics Computational Fluid Dynamics (CFD) software useFortran, C and C++ languages coupled with Single Program Mul-tiple Data (SPMD) framework to achieve high performance [18]such as IGLOO3D [20], LEWICE3D [29], NSCODE-ICE [7] andFENSAPE-ICE [3]. The challenge is to balance the computationaland the implementation costs while obtaining the required fidelity,as the concept of SPMD can represent additional difficulties in anacademic research laboratory. Parenteau et al. [18] presented a newCFD software named Chapel Multi-Physics Simulation (CHAMPS),which uses the Chapel programming language as an alternative tomore traditional programming languages. This paper presents anextension of CHAMPS for ice accretion predictions over aircraft,highlighting the modularity and the highly productive frameworkprovided by the Chapel programming language.
Section 2 presents an overview of a typical multi-layer icingprocess to introduce the context to an unfamiliar reader. Section 3continues with a brief overview of the implementation of CHAMPSand is followed in Section 4 by the additional considerations forthe data structure brought by the multi-physics simulations. Then,
2021-05-20 18:20. Page 1 of 1–9.
Unpublishedworkingdraft.
Not for distribution.
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
CHIUW 2021, June 04, 2021, Online Papillon Laroche and Bourgault-Côté, et al.
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
Air Flow Solver
Volume Mesh Generation or Deformation
Droplet Solver
Thermodynamic Exchanges
Convective Heat Transfer
andShear Stress
Geometry Evolution
Nlayers
Nlayers,max
No ?=
Yes
Nlayers = 0
Nlayers += 1
Ice Shape Prediction
Initial Conditions and Geometry
Figure 1: Multi-layer Icing Process, adapted from [7, 11]
a stochastic icing approach within CHAMPS is presented alongwith how Chapel’s features are used. Finally, CHAMPS is comparedto experimental data to access its capability to simulate real icingconditions.
2 OVERVIEW OF THE MULTI-LAYER ICINGPROCESS
The multi-layer icing process is declined in five main componentswhich are performed sequentially and repeated until the icing sim-ulation is completed. The complete icing process is well describedby Bourgault-Côté [7]. The flow chart of the process is presentedat Figure 1.
2.1 Continuous Phase : Air Flow SolverThe aerodynamic flow field is involved in the icing process since itdrives the droplet impingement, the convective heat transfer, andthe water runback flow on the geometry [7]. The state-of-the-artis to use the Reynolds-averaged Navier–Stokes (RANS) equations
to solve the continuous phase, as it allows to model compressibleeffects as well as viscous and turbulent flow [7, 11].
This aerodynamic framework requires the discretization of thecomputational domain into a high-quality volume mesh, in order towell resolve the flow field. If the aerodynamic degradation due to icecontamination is sought, as in a multi-layer approach, re-meshingcapacities are needed.
2.2 Disperse Phase : Droplet SolverThe disperse phase consists of the liquid water droplets transportedby the airflow. Ice accretion can occur when these droplets impingea surface, that is any exposed surfaces of the aircraft in the presentcontext (wings, fuselage, nacelle). Therefore, the impingement mapis needed on the surface. The droplet trajectories can be modeledusing Lagrangian or Eulerian methods, the first being the resolutionof the equation of motion for each particle and the second beingthe resolution of a partial differential equation system, as proposedby Bourgault et al. [6].
The latter approach is now the state-of-the-art as the mesh usedby the RANS flow solver is reused for the droplet field resolution,as well as the parallelization of the computations [7].
2.3 Thermodynamic ExchangesThe impingement of the water droplets on the surface of the airfoiland the convective heat transfer induced by the flow result inthermodynamic exchanges. The resolution of these exchanges onthe surface, with mass and energy balances, allows obtaining theaccumulated ice thickness. Unlike the volume resolution of thecontinuous and disperse phases, the thermodynamic model usesthe surface discretization of the geometry. The mass and energybalances are described by Messinger [15], and the resolution of thethermodynamic exchanges can be completed using the Messingermodel, extensions of this model [16, 17, 30] or PDE systems as theShallow-Water Icing model [5, 11].
2.4 Geometry EvolutionThe geometry is deformed by considering the ice accretion map onthe surface to obtain the final ice shape. One of the methods usedto deform the surface grid is the algebraic method, or Langrangianmethod, that moves each node of the surface discretization fol-lowing the ice accumulation map. Other methods include implicitmethods, such as the level-set equation, and grid approaches suchas the hyperbolic grid generation method or advancing front tech-niques [7]. Note that the word geometry is employed here evenif only the surface grid is deformed, as this represents a discretegeometry. An underlying continuous geometry can be re-generatedor deformed based on that surface grid deformation.
2.5 Mesh RegenerationOnce a new geometry definition, discrete or continuous, is obtained,a corresponding volume mesh can be obtained by deformation ofthe previous grid or by full or partial regeneration. This allowsperforming a multi-layer simulation to gradually accumulate theice by smaller layers and to include the impact of that ice in thenext flow and droplet trajectory simulations. When regenerating
2021-05-20 18:20. Page 2 of 1–9.
Unpublishedworkingdraft.
Not for distribution.
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
Development of an Aircraft Aero-Icing Suite Using Chapel Programming Language CHIUW 2021, June 04, 2021, Online
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
the grids, the computational domain changes at each layer, whichincreases the complexity.
3 CHAPEL MULTI-PHYSICS SIMULATION(CHAMPS)
The development of the flow solver of CHAMPS, as well as itsperformances, are well described by Parenteau et al. [18]. Since thescope of this paper is toward the icing simulations, only a briefoverview of the implementation of CHAMPS is presented.
The flow and the droplet fields are solved with a typical cell-centered finite volume approach over 2D and 3D unstructuredmulti-zone grids. The aerodynamic field is obtained by resolvingthe RANS equations, which are closed with the Spalart-Allmaras[23, 24] or the K - 𝜔 SST-V [14] turbulence models. Roe [22] orAUSM [4] schemes are used for the fluxes discretization and thesecond-order spatial accuracy is reached with the computationof the gradients of the flow variables, with the Green-Gauss orWeighted Least Square formulations [4]. Gradient limiters availableto reach second-order accuracy include the formulation of Barth andJespersen [2], Venkatakrishnan [27], Van Leer and Van Albada [4].Time integration is completed with a hybrid Runge-Kutta scheme[13], a Block Symmetric Gauss-Seidel scheme, or a GMRES method.
The droplet impingement field is obtained via the Eulerian dropletequations [6], using an upwind scheme for the convective fluxesdiscretization. The spatial second-order accuracy is reached in asimilar way as for the flow equations. The gradient, limiters andlinear solvers usable for the flow solver are also available to thedroplet solver. In fact, in CHAMPS, solvers and gradients are gen-eralized so that any method developed for a module is immediatelyavailable for the other modules, thus highlighting the reusabilityand modularity of the original structure [18].
The thermodynamic exchanges are solved with an IterativeMessinger model [30], implemented following the new model struc-ture presented at Section 4.3. The geometry evolution is performedwith the Lagrangian method, presented at Section 2.4, or an hyper-bolic scheme [7].
To achieve multi-layer icing simulations, two techniques areavailable for now: i) complete 2D grid regeneration through a 2Dhyperbolic mesh generation method [8], or ii) 2D/3D volume meshdeformation through a radial basis function approach [28].
4 DATA STRUCTURE FOR MULTI-PHYSICSSIMULATIONS
Compared with specialized software for flow simulations, the multi-physics simulations performed with CHAMPS require a more com-plex computational structure.
4.1 Computational domainsCHAMPS is a multi-zone software, meaning that the computationaldomain, i.e. the mesh, is divided into multiple zones to reducethe computational time on multi-core systems. As described byParenteau et al. [18], parallelism on distributedmemory is applied tothese zones, and exchanges are performed at the interfaces betweenthe zones to obtain a consistent solution. Therefore, a suitablestructure has initially been implemented for the flow solver inCHAMPS, taking the requirements of the icing process into account.
Mesh_c
+ gridDomains : domain+ gridArrays : [gridDomain]
MeshFlow_c
+ flowArrays : [gridDomain]+ flowConditions_ : FlowConditions_r+ flowSolver_ : SolverHandleFlow_c
MeshIcing_c
+ dropletArrays : [gridDomain]+ dropletConditions_ : DropletConditions_r+ icingConditions_ : IcingConditions_r+ dropletSolver_ : SolverHandleDrop_c
Figure 2: Overview of theMeshIcing_c class in CHAMPS
Indeed, the generic class GlobalHandle_c handles the distributionof any type of zone over the computational resources [18]. The typefield zoneType_t is therefore used to define the type of simulationto perform, e.g. the resolution of the flow or an icing simulation.Exploiting the common characteristics of the grids used, as the nodecoordinates, the grid metrics, and the connectivity, inheritance of abase class, Mesh_c, is used to ease the multi-physics developments.There are two examples of this handling within CHAMPS thatworth mentioning: i) the MeshIcing_c class and ii) the volume andsurface meshes.
MeshIcing_c class. This class makes use of the fact that the flowand the droplet impingement are solved on the same computationalgrid. Therefore, the MeshIcing_c class inherits of the MeshFlow_cclass, and the required fields for the resolution for the dropletimpingement are added, as the associated arrays and the icingconditions. This structure, illustrated in Figure 2, shows the re-usability of the implemented structure in CHAMPS and allows toaccess easily the flow variables while solving the droplet field.
Volume and surface meshes. The icing process involves both avolume mesh and a surface mesh. The difference between thosetwo components is mainly the topological number of dimensions.Therefore, the specialized computational grids (volume or surface)inherit from the Mesh_c class and the specialized procedures basedon the topological number of dimensions without further addition.In fact, once the computational grid is initialized, the differentsolvers such as the flow solver or the droplet solver are developedto compute on any grid that is loaded. This allows to solve a volumeequation, such as the RANS equations, on a planar grid, which istopologically 2D, and on its extruded 3D equivalent with the samecode and the same functions to obtain exactly the same solution.The possibility to develop for a 3D volume and test on a 2D plane,or the opposite, is provided by object-oriented programming andby the generic features of Chapel and is quite useful in a researchlaboratory.
4.2 Distributed Memory ParallelismThe use of both volume and surface meshes for the same simula-tions brings challenges when distributing the memory to conserveefficiency and scalability. As presented by [18], the distribution of
2021-05-20 18:20. Page 3 of 1–9.
Unpublishedworkingdraft.
Not for distribution.
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
CHIUW 2021, June 04, 2021, Online Papillon Laroche and Bourgault-Côté, et al.
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
Locale 0Locale 1
No redistribution With redistribution
Figure 3: Volume (top) and surface (bottom) zones distribu-tion across the computational nodes
the zones across the computational nodes is handled by the Global-Handle_c class to best distribute the volume grid. The additionalconsiderations brought by the use of the surface come from thefact that the surface mesh associated with the volume mesh on alocale does not necessarily contain the same number of zones as itsvolume counter part. An example of this situation is illustrated inFigure 3, where the computational domain is divided in six volumezones. Three volume zones are distributed on each locale (0 and1), however, with no redistribution, the local 0 contains only onesurface, while the locale 1 contains three surfaces.
Indeed, since the distribution of the zones across the computa-tional nodes is based on the volume mesh, the parallelism can beunbalanced with under-utilized resources, when the solver reachesthe thermodynamic and geometric modules.
To overcome this issue and the associated performance losses, thezones of the surfacemesh are redistributed across the computationalnodes by first deleting the volume GlobalHandle_c object, and allthe volume computational domain, and reading again the grid file,but for the surface that time. A new GlobalHandle_c object is thencreated and the surface zones are automatically distributed with aBlock distribution across all the Locales. This allows to minimizethe under-usage of the resources by weakly ensuring that all theLocales contain a part of the surface zones. It is considered highlyimprobable that a volume grid distributed in N Locales containingM cores would contain less than N surface zones, thus the weakcondition.
Another way to overcome this issue is to split the mesh in a waythat the volume and surface partitioning are balanced. Coinciden-tally, this is achieved when completely regenerating a 2D planargrid with the hyperbolic mesh generation approach due to thenumbering used that is appropriate for the grid splitting algorithm.
ModelHandle_c
+ modelDomains : domain+ modelArrays : [modelDomains]
ViscousModel_c
+ viscousArrays : [modelDomain]
SpalartAllmarasModel_c
+ nut_ : [modelDomain] real
MenterKWSSTModel_c
+ K_ : [modelDomain] real+ w_ : [modelDomain] real
ThermodynamicModel_c
+ thermoArrays : [modelDomain]
Figure 4: Overview of the classes for models in CHAMPS
4.3 Addition of ModelsWith the multiplication of the modeled physics in CHAMPS, a newstructure was introduced: the ModelHandle_c class. First used forthe turbulence models, this structure was then used in the thermo-dynamic module as well as in the geometry evolution module.
The rationale behind theModelHandle_c class is that some physicscan be resolved with multiple models involving different variablesand numerical schemes. Therefore, it is more convenient to wrapthose models in a class and, following the user inputs, instanti-ate the right model as a field of the generic Mesh_c class (or itschildren).
TheModelHandle_c class is the base class, as theMesh_c class forthe computational grids, and specialized models inherit from thisclass. The fields in ModelHandle_c represent the simplest definitionof a model, as the number of variables, the number of elements,and the associated domain and arrays. The fields of the derivedclass depend on the model implemented. For example, a turbulencemodel is needed when resolving the flow. In CHAMPS, few modelswere implemented: the Spalart-Almaras (SA), K-𝜔 STT, Langtry-Menter transitional, and variations of these models. The structurefor those classes is presented in Figure 4.
Despite the modularity brought by this structure, compilationdifficulties were encountered throughout the implementation ofthe new models. One of the main concerns during the growth ofCHAMPS to multi-physic simulations was to keep the generic char-acter of the structure. However, due to the use of object-orientedprogramming with generic objects for the zones and the models,the definition of the methods of the children objects often require atight control with where statements to avoid compilation errors dueto non-existing fields or methods in parents or in siblings (otherchildren from same parents). In Chapel, where statements allow todefine conditions tested at compilation to implement a particularfunction or method. For example, a function could be defined witha where statement on the type of a generic argument to be instan-tiated only when the argument is an integer. Two examples fromCHAMPS of where statements can be seen below, the first beingmore complex as we are forced to use the == operators.� �
1 where globalHandle.type == GlobalHandleFlow_t ||globalHandle.type == BorrowedGlobalHandleFlow_t ||globalHandle.type == GlobalHandleIcing_t ||globalHandle.type == BorrowedGlobalHandleIcing_t
2 where zone.type < MeshFlow_c� �2021-05-20 18:20. Page 4 of 1–9.
Unpublishedworkingdraft.
Not for distribution.
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
Development of an Aircraft Aero-Icing Suite Using Chapel Programming Language CHIUW 2021, June 04, 2021, Online
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
1
2
3
4
5
6
7
8
09/2019 11/2019 01/2020 03/2020 05/2020 07/2020 09/2020 11/2020 01/2021 03/2021
Com
pila
tion
time
[min
]
Time
Compilation time over CHAMPS history
Pre-processor exec. (prep)
1.0
1.4
1.7
1.10
1.13
1.15
1.17
1.19
Flow exec. (flow)Icing exec. (icing)
Chapel 1.19 Chapel1.20
Chapel 1.22
Chapel 1.23
Figure 5: Compilation time of CHAMPS exec along versionhistory
4.4 Compilation timeOne of the main drawbacks of the growth of CHAMPS with newcomponents or modules is the increase in compilation time andrequired memory, especially for the icing executable. Due to thehard limit in memory usage per process on the front nodes of theCompute Canada HPCs, the compilation process was split in twophases, namely i) the generation of the C code from the Chapelfiles and ii) the compilation of the C code. During the history ofCHAMPS, work has been performed at different moments to re-duce the resources required to compile CHAMPS in terms of timeand memory. At its highest point, compilation time for the icingexecutable could take around 15 minutes, whereas memory usagewas seen to reach up to 30GB of memory (RAM). The latter wasmainly due to i) the overuse of generic function arguments in somemodules, where even integers and reals were left without types infunction declarations, and ii) the use of too many modules every-where even when they were not required. Solving these two issues,which were observed for all executables when new modules wereadded by students unfamiliar with the Chapel language, also helpedin reducing the compilation time to acceptable levels in general.
However, for the icing executable into which almost all modulesare involved, more work was required. In particular, it was nec-essary to properly use where statements to limit the duplication ofgeneric functions for multiple flavors of the mesh and model objectsthat are not related, as mentioned before. It restricted the gener-ated C code and thus reduced the compilation time and memory.Figure 5 shows the compilation time for some executables throughthe history of CHAMPS versions. The Chapel version used is alsoindicated.
In Figure 5, each abrupt increase in compilation time is due tothe addition of new components in the code, but for each successiveversion, the length of the code increases. The number of code lineswent from around 8k for version 1.0 to around 48k in version 1.19.The drop in compilation time seen after version 1.17 is due to thespecific modification of the code in order to reduce compilationtime and memory consumption. It can be seen that the effect of thatoptimization operation was lost for some reasons for version 1.19.
One hypothesis lies within the where statements discussed before,but it is not yet verified.
5 STOCHASTIC ICING APPROACHAnother feature added for the multi-physics simulations is thestochastic icing approach. Initially presented by Szilder [25] asthe Morphogenetic model, the rationale of the method has been re-examined by Bourgault-Côté [7]. The approach aims to reproducethe chaotic character of the icing process that is mainly due tothe cloud droplet distribution and the surface irregular roughness.The method is Lagrangian, meaning that it models the ice accre-tion by growing each iced element individually. Furthermore, toreduce the computational cost, the droplets are gathered in clusters,with the assumption that the droplets in a single cluster follow thesame evolution (trajectory and freezing location). The steps are thefollowing:
(1) Insert a droplet cluster upstream of the airfoil at a randomposition;
(2) Resolve the cluster trajectory;(a) If the trajectory impacts the airfoil, generate an element
of ice;(3) Return to step (1) until reaching the stop criterion, which is
the mass of the accumulated ice.Stochasticity is introduced through the impingement (step (1)) andthe freezing (step (2a)) via probabilities and pseudo-random num-bers generation.
Szilder and Lozowski [25] initially proposed to generate theelement of ice (step (2a)) with a random walk model on a Cartesiangrid. Then, Bourgault-Côté proposed a Cartesian advancing front[7].
5.1 Advancing Front AlgorithmThe implementation in CHAMPS differs from Bourgault-Côté’s[7] method as the Cartesian advancing front is replaced by anunstructured advancing front. Therefore, an advancing front gridgenerator is implemented in CHAMPS, following the algorithmsproposed by Löhner and Parikh [12], Peraire et al. [19] and Jin andTanner [10]. The method is based on the dynamic creation of a gridby the generation of triangular (or tetrahedral) elements.
The steps required to complete the process are the following:(1) Discretize the boundaries, which form the initial front;(2) Generate the next element, based on the predefined order of
treatment;(a) Select an existing node or create a new node;(b) Check intersections with existing elements, if true, return
to step (2a);(3) Update the front;(4) Repeat (2) and (3) until reaching the stop criterion.For the stochastic icing, the initial front is the surface discretiza-
tion of the studied geometry. Since the process involves the gen-eration of a mesh, a derived class of Mesh_c, MeshStochastic_c, iscreated to take advantage of the connectivity and metrics computa-tions already available. Furthermore, CHAMPS’ surface and volumemeshes compatibility (Section 4.1) is used as the front initializationis performed in the same way as a surface mesh would be initialized
2021-05-20 18:20. Page 5 of 1–9.
Unpublishedworkingdraft.
Not for distribution.
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
CHIUW 2021, June 04, 2021, Online Papillon Laroche and Bourgault-Côté, et al.
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
(a) Initial front (b) Generation of one element andupdate of the front
(c) Front and mesh after several it-erations
Figure 6: Unstructured advancing front process. The front is represented in red
even if the generated mesh is volumic. The front consists of thefacets which are available to form a new element. These are thefront facets from which the new elements are created.
As seen in Figure 6, the front and the mesh are structures thatchange throughout the generation of the mesh. This involves thatthe data structure enables the insertion and deletion of elements.To that end, the var keyword is used to declare the associated lists,domains, and arrays of MeshStochastic_c. The front is a field ofMeshStochastic_c and takes the form of a list of facet indexes, andthe mesh uses variable domains and arrays. As the element areadded, the mesh domains are extended by redefining the domainassignment and, using the logical re-allocation of Chapel, the as-sociated arrays are automatically resized. The front is managedthrough the use of list.append() and list.remove() procedures. Fur-ther developments are planned to overcome the computational costof these memory manipulations, as the use of tree structures likeChapel’s heap module.
5.2 Stochastic Impingement and FreezingRandomness is first introduced as the droplets are inserted in thecomputational domain. Since the method is Lagrangian, the droplettrajectories are extracted from the Eulerian droplet velocity fieldvia the computation of streamlines from random insertion points.The resolution of the trajectories is performed using the volumicRANS mesh, on which the droplet velocity field was obtained.
The process goes as follows, based on the method proposed byRendall and Allen [21] to compute the droplet ”streamline”, which isits trajectory. A seeding plane is defined upstream of the geometry.Then, a cluster of droplets is inserted on this plane and the initial cellin the RANS mesh is found to extract the initial velocity vector ofthe cluster. From there, the entry point to the next cell is defined asthe position of the closest downstream intersection of the velocityvector and the cell facets. The next cell index is obtained from themesh cell connectivity, and the process is repeated.
The initial position of the droplet is generated with the PC-GRandom module. A PCGRandomStream class is instantiated asa field of the MeshStochastic_c so that the stream of pseudoran-dom numbers stays consistent during the entire process (the seeddo not change). To obtain the next initial position, PCGRandom-Stream.getnext( min, max) is simply called. The min, max fields areused so the pseudorandom number represents a plausible initial
position in the computation domain. To limit unnecessary compu-tations, the min, max fields are derived from the Eulerian dropletvelocity field using an inverse trajectory computation.
Thermodynamic exchanges have yet to be computed, thus, thecluster of droplets freezes upon impact. This limits the frameworkto rime ice cases only.
5.3 Evolution of the Stochastic ProcessIf the trajectory of the cluster intersects a facet of the front, thetrajectory computation stops and a new element is generated withthe advancing front algorithm. The process is presented in Figure 7.The size of the created elements is given as an input. The processstops when the accumulated mass of ice (the sum of the mass ofeach created element) reaches the targeted mass, obtained with theicing conditions.
6 NUMERICAL RESULTS6.1 2D Deterministic IcingRime ice is characterized by lower temperatures, at which thedroplets freeze upon impact. The ice tends to grow as an exten-sion of the geometry following the stagnation line. The test casepresented in this paper is case 241 selected for the 1𝑠𝑡 AIAA IcePrediction Workshop (IPW1) [1]. The conditions for this case arepresented in Table 1 and results obtained with CHAMPS are pre-sented in Figure 8 for five ice layers performed using full meshre-generation using the hyperbolic mesh generation method, asdescribed in Section 3.
6.2 3D Deterministic IcingRecently, the addition of the mesh deformation method using radialbasis functions (RBF) allowed to perform multi-layer ice accretionsimulations in 3D. Considering the complexity of ice shapes, suchsimulations are not often seen in the literature. The current method-ology still has some limitations and for now, only rime cases havebeen tested due to their simpler shapes. Case 241 presented previ-ously in 2D is shown in Figure 9 for five ice layers. The experimentaltest was performed on an extruded airfoil, which allows us to per-form the 3D simulation by extruding the previous 2D grid to obtain10 cells in the third direction with a cell width of approximately0.5% the chord length.
2021-05-20 18:20. Page 6 of 1–9.
Unpublishedworkingdraft.
Not for distribution.
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
746
747
748
749
750
751
752
753
754
Development of an Aircraft Aero-Icing Suite Using Chapel Programming Language CHIUW 2021, June 04, 2021, Online
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
Seeding plane
x0
X []
Y [
]
0.6 0.4 0.2 0 0.2 0.40.4
0.2
0
0.2
0.4
0.6
(a) Insertion and trajectory computation
X []
Y [
]
0.004 0.002 0 0.002 0.004 0.006
0.006
0.004
0.002
0
0.002
(b) Generation of an element upon im-pingement, zoom on the leading edge
X []
Y [
]
0.004 0.002 0 0.002 0.004 0.006
0.006
0.004
0.002
0
0.002
(c) Generation of several elements, zoomon the leading edge
Figure 7: Evolution of the Stochastic Process
X/c []
Y/c
[]
0.05 0 0.05 0.1
0.05
0
0.05
0.1
CleanLayer 1
Layer 2Layer 3Layer 4
Layer 5Exp.
Figure 8: 2D rime ice: Case 241 from IPW1 [1]
Y
Z
Figure 9: 3D rime ice: Case 241 from IPW1 [1]
Table 1: Test Cases Input Parameters
Test Case Case 241, IPW1 Case 01, Trontinet al.
Geometry NACA0012 NACA0012Chord [m] 0.4572 0.5334AoA [◦] 2.0 4.0Mach [-] 0.325 0.325
Temperature [K] 255.20 250.7Pressure [kPa] 92.5 101.325LWC [g/m3] 0.42 0.55MVD[`m] 30 20
Icing Time [min] 5.0 7.0
6.3 2D Stochastic IcingStochastic icing results are presented on the rime case 241 [1] andrime case 01 of Trontin et al. [26]. Conditions are presented inTable 1.
6.3.1 Trontin’s Rime Case 01. The results are presented in Figure 10.The obtained ice shape is compared to the experimental results [26],showing that the stochastic icing process leads in great agreementwith the experiment. Figure 10b is zoomed on the leading edgeof the geometry to highlight mesh generated with the advancingfront method. Features like holes in the ice and ice feathers arecaptured, as observed in the experiments, which can not be modelby deterministic approaches.
6.3.2 IPW1 Case 241. Figure 11 presents the results of ten differentseeds for PRN generator. Ten different ice shapes are overlaid, withthe bluescale corresponding to the likelihood of the results : thedarker the area is, themost probable it is to obtain ice at this position.Thus, the impact of the stochasticity is mainly downstream of thestagnation point, especially on the intrados where ice feathers areobserved. The obtained ice shapes are similar to the experimentalenvelope, which is the maximum combined cross section depictedin pink.
2021-05-20 18:20. Page 7 of 1–9.
Unpublishedworkingdraft.
Not for distribution.
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
CHIUW 2021, June 04, 2021, Online Papillon Laroche and Bourgault-Côté, et al.
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
X [m]
Y [
m]
0.02 0 0.02 0.04 0.060.04
0.03
0.02
0.01
0
0.01
0.02
0.03
Stochastic Approach
Experimental Shape
Clean
(a) Ice Shape
X [m]
Y [
m]
0.006 0.004 0.002 0 0.002 0.004 0.006
0.004
0.002
0
0.002
0.004
0.006
0.008
Stochastic Approach
Experimental Shape
Clean
(b) Zoom on the leading edge
Figure 10: 2D stochastic rime ice: Case 01 from Trontin et al.[26]
7 CONCLUSIONIn this paper, a multi-physics CFD software is implemented withthe Chapel programming language. The flow solver was previouslydeveloped using Chapel’s features to provide a flexible frameworkfor multi-physics simulations. Some considerations are added tothe data structures to meet the requirements of an icing simula-tion while ensuring the proper use of the computational resources.Additional modules are added, such as the droplet solver, the ther-modynamic computations, the geometry deformation process, andthe mesh regeneration, using inheritance to ease the developmentand to make the most of the generic functions and types fromChapel. A stochastic icing is also presented, which uses Chapel’sstandard module to generate PRN. Furthermore, memory manipu-lations as the ice grows are easily performed using domain resizingand list operations, enabling fast prototyping of the unstructuredadvancing front technique.
CHAMPS is validated against rime ice cases of the literaturefor the deterministic and stochastic approaches, showing results
Figure 11: 2D stochastic rime ice: 10 runs of the case 241 fromIPW1 [1], the bluescale represents the likelihood of the re-sult
in great agreement with the experimental data. Future works areexpected to assess the validity of the software on more icing condi-tions.
ACKNOWLEDGEMENTSThis work is supported by the National Sciences and Engineer-ing Research Council of Canada (NSERC), the Fonds de Recherchedu Québec Nature et technologies (FRQNT) and the Canada Re-search Chair in Modelling and Control of Unsteady Aircraft Aero-dynamics. This research was enabled in part by support providedby Calcul Québec (www.calculquebec.ca) and Compute Canada(www.computecanada.ca).
REFERENCES[1] AIAA. [n.d.]. 1𝑠𝑡 AIAA Ice Prediction Workshop.
https://folk.ntnu.no/richahan/IPW/.[2] Timothy J. Barth and Jespersen Dennis C. 1989. The design and application of
upwind schemes on unstructured meshes. In 27𝑡ℎ Aerospace Sciences Meeting.AIAA Paper 1989-0366. https://doi.org/10.2514/6.1989-366
[3] Héloïse Beaugendre, François Morency, and Wagdi G. Habashi. 2005. De-velopment of a Second Generation In-Flight Icing Simulation Code. Jour-nal of Fluids Engineering 128, 2 (02 2005), 378–387. https://doi.org/10.1115/1.2169807 arXiv:https://asmedigitalcollection.asme.org/fluidsengineering/article-pdf/128/2/378/5645781/378_1.pdf
[4] J. Blazek. 2015. Computational Fluid Dynamics: Principles and Application (3𝑟𝑑ed.). Elsevier.
[5] Y. Bourgault, H. Beaugendre, andW. G. Habashi. 2000. Development of a Shallow-Water Icing Model in FENSAP-ICE. Journal of Aircraft 37, 4 (2000), 640–646.https://doi.org/10.2514/6.1999-246
[6] Yves Bourgault, Wagdi G. Habashi, Julien Dompierre, and Guido S. Baruzzi.1999. A finite element method study of Eulerian droplets impingement models.International Journal for Numerical Methods in Fluids 29, 4 (1999), 429–449. https://doi.org/10.1002/(SICI)1097-0363(19990228)29:4<429::AID-FLD795>3.0.CO;2-F
[7] Simon Bourgault-Côté. 2019. Ice Interface Evolution Modelling Algorithms forAircraft Icing. Ph.D. Dissertation. Polytechnique Montréal, Montréal, Canada.
[8] W. M. Chan. 1999. Hyperbolic Methods for Surface and Field Grid Generation.In Handbook of Grid Generation (1𝑠𝑡 ed.), J. F. Thompson, B. K. Soni, and N. P.Weatherill (Eds.). CRC Press.
[9] Federal Aviation Administration. [n.d.]. Eletronic Code of Federal Reg-ulations, Appendix C to Part 25. https://www.ecfr.gov/cgi-bin/text-idx?SID=bbf24e9c782b2057583037ed7c2efe26&mc=true&node=pt14.1.25&rgn=div5#ap14.1.25.0000_0nbspnbspnbsp.c Last accessed: 2018-08-16.
2021-05-20 18:20. Page 8 of 1–9.
Unpublishedworkingdraft.
Not for distribution.
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
Development of an Aircraft Aero-Icing Suite Using Chapel Programming Language CHIUW 2021, June 04, 2021, Online
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
[10] H. Jin and R. I. Tanner. 1993. Generation of unstructured tetrahedralmeshes by advancing front technique. Internat. J. Numer. Methods En-grg. 36, 11 (1993), 1805–1823. https://doi.org/10.1002/nme.1620361103arXiv:https://onlinelibrary.wiley.com/doi/pdf/10.1002/nme.1620361103
[11] Pierre Lavoie. 2017. Modeling of Thin Water Films on Swept Wings in IcingCondition. Master’s thesis. Polytechnique Montréal, MOntréal, Canada.
[12] Rainald Löhner and Paresh Parikh. 1988. Generation of three-dimensional un-structured grids by the advancing-front method. International Journal for Nu-merical Methods in Fluids 8, 10 (1988), 1135–1149. https://doi.org/10.1002/fld.1650081003 arXiv:https://onlinelibrary.wiley.com/doi/pdf/10.1002/fld.1650081003
[13] D. J. Mavriplis and A. Jameson. 1990. Multigrid Solution of the Navier-StokesEquations on Triangular Meshes. AIAA Journal 28, 8 (1990), 1415–1425. https://doi.org/10.2514/3.25233
[14] F. R. Menter. 1992. Improved Two-Equation k-omega Turbulence Models for Aero-dynamic Flows. Technical Report. NASA TM 103975.
[15] B.L. Messinger. 1953. Equilibrium Temperature of an Unheated Icing Surface as aFunction of Airspeed. Journal of the Aeronautical Sciences 1, 20 (Jan. 1953), 29–42.https://doi.org/10.2514/8.2520
[16] T. G. Myers. 2001. Extension to the Messinger Model for Aircraft Icing. AIAAJournal 39, 2 (2001), 211–218. https://doi.org/10.2514/2.1312
[17] S. Özgen and M. Canibek. 2009. Ice Accretion Simulation on Multi-ElementAirfoils Using Extended Messinger Model. Heat and Mass Transfer 45, 3 (2009),305–322. https://doi.org/10.1007/s00231-008-0430-4
[18] Matthieu Parenteau, Simon Bourgault-Côté, Frédéric Plante, Engin Kayraklioglu,and Éric Laurendeau. 2021. Development of Parallel CFD Applications with theChapel Programming Language. (Jan. 2021). https://doi.org/10.2514/6.2021-0749
[19] J Peraire, J Peiró, and K Morgan. 1992. Adaptive remeshing for three-dimensionalcompressible flow computations. J. Comput. Phys. 103, 2 (1992), 269–285. https://doi.org/10.1016/0021-9991(92)90401-J
[20] Emmanuel Radenac, Helene Gaible, Herve Bezard, and Philippe Reulet. 2019.IGLOO3D Computations of the Ice Accretion on Swept-Wings of the SUNSET2
Database, In SAE Technical Paper. https://doi.org/10.4271/2019-01-1935[21] T.C.S. Rendall and C.B. Allen. 2014. Finite-volume droplet trajectories for icing
simulation. International Journal of Multiphase Flow 58 (jan 2014), 185–194.https://doi.org/10.1016/j.ijmultiphaseflow.2013.08.007
[22] P.L. Roe. 1981. Approximate Riemann solvers, parameter vectors, and differenceschemes. J. Comput. Phys. 43, 2 (1981), 357–372. https://doi.org/10.1016/0021-9991(81)90128-5
[23] Philippe R. Spalart and Steve R. Allmaras. 1992. A One-Equation TurbulenceModel for Aerodynamic Flows. In 30𝑡ℎ Aerospace Sciences Meeting and Exhibit.AIAA Paper 1992-0439. https://doi.org/10.2514/6.1992-439
[24] P. R. Spalart and S. R. Allmaras. 1994. A One-Equation Turbulence Model forAerodynamic Flows. Recherche Aerospatiale 94, 1 (1994), 5–21.
[25] Krzysztof Szilder and Edward P. Lozowski. 2004. Novel Two-Dimensional Mod-eling Approach for Aircraft Icing. Journal of Aircraft 41, 4 (July 2004), 854–861.https://doi.org/10.2514/1.470
[26] Pierre Trontin, Ghislain Blanchard, Alexandros Kontogiannis, and PhilippeVilledieu. 2017. Description and assessment of the new ONERA 2D icing suiteIGLOO2D. In 9𝑡ℎ AIAA Atmospheric and Space Environments Conference. AIAAPaper 2017-3417. https://doi.org/10.2514/6.2017-3417
[27] V. Venkatakrishnan. 1995. Convergence to Steady State Solutions of the EulerEquations on Unstructured Grids with Limiters. J. Comput. Phys. 118, 1 (1995).https://doi.org/10.1006/jcph.1995.1084
[28] Holger Wendland. 2004. Scattered Data Approximation. Cambridge UniversityPress, Cambridge. https://doi.org/10.1017/CBO9780511617539
[29] William B. Wright. 2005. Validation Results for LEWICE 3.0. In 43𝑟𝑑 AIAAAerospace Sciences Meeting and Exhibit. AIAA Paper 2005-1243. https://doi.org/10.2514/6.2005-1243
[30] Chengxiang Zhu, Bin Fu, Zhiguo Sun, and Chunling Zhu. 2012. 3D Ice AccretionSimulation for Complex Configuration basing on Improved Messinger Model. InInternational Journal of Modern Physics: Conference Series, Vol. 19. World Scientific,341–350. https://doi.org/10.1142/S2010194512008938
2021-05-20 18:20. Page 9 of 1–9.