development of an aircraft aero-icing suite us- ing chapel

19
Development of an Aircraft Aero-Icing Suite Us- ing Chapel Programming Language el` ene Papillon Laroche, master student SimonBourgault-Cˆot´ e, Research associate Matthieu Parenteau, Ph. D. candidate ´ Eric Laurendeau, Professor

Upload: others

Post on 20-Jun-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Development of an Aircraft Aero-Icing Suite Us- ing Chapel

Development of an Aircraft Aero-Icing Suite Us-ing Chapel Programming Language

Helene Papillon Laroche, master studentSimon Bourgault-Cote, Research associateMatthieu Parenteau, Ph. D. candidateEric Laurendeau, Professor

Page 2: Development of an Aircraft Aero-Icing Suite Us- ing Chapel

POLYTECHNIQUE MONTREAL Aircraft Icing Simulations Why Use Chapel? Data Structure Challenges Results Outcomes

Table of contents

1 Aircraft Icing Simulations

2 Why Use Chapel?

3 Data Structure

4 Challenges

5 Results

6 Outcomes

Aircraft Aero-Icing Suite Using Chapel – H. Papillon Laroche et al. 2/19

Page 3: Development of an Aircraft Aero-Icing Suite Us- ing Chapel

POLYTECHNIQUE MONTREAL Aircraft Icing Simulations Why Use Chapel? Data Structure Challenges Results Outcomes

Aircraft Icing Phenomena

Impact of the ice accumulation

• Ice accretion leads to changes in the airfoil geometry;

• Performances are greatly affected by these changes → Security issues.

Aircraft Aero-Icing Suite Using Chapel – H. Papillon Laroche et al. 3/19

Page 4: Development of an Aircraft Aero-Icing Suite Us- ing Chapel

POLYTECHNIQUE MONTREAL Aircraft Icing Simulations Why Use Chapel? Data Structure Challenges Results Outcomes

Overview of Aircraft Icing Modelisation

Complex multi-physical phenomena• Airflow field and droplets impingement → volume mesh;

• Thermodynamic exchanges and geometry evolution → surface mesh;

• Evolution in time of the computational domains (since the geometry changes).

Aircraft Aero-Icing Suite Using Chapel – H. Papillon Laroche et al. 4/19

Page 5: Development of an Aircraft Aero-Icing Suite Us- ing Chapel

POLYTECHNIQUE MONTREAL Aircraft Icing Simulations Why Use Chapel? Data Structure Challenges Results Outcomes

Why Use Chapel?

Challenges of multi-physics simulations

We have to balance :

• the fidelity of multiple solvers;

• the performances → computational costs;

• the productivity → addition of multiple physical models.

Chapel was initially used for the implementation of a flow solver : Chapel Multi-Physics Simulation(CHAMPS) [2].

Benefits from Chapel’s features

• Productivity → fast prototyping with high level syntax;

• Natively distributed → Overcome the barrier of entry of parallel distributed programming in anacademic context (2 years) [2];

• Modularity → Generic classes and records to reuse structures;

• Memory management strategies.

Aircraft Aero-Icing Suite Using Chapel – H. Papillon Laroche et al. 5/19

Page 6: Development of an Aircraft Aero-Icing Suite Us- ing Chapel

POLYTECHNIQUE MONTREAL Aircraft Icing Simulations Why Use Chapel? Data Structure Challenges Results Outcomes

Data Structure for Multi-Physics Simulations

Overview of what was previously implemented• Object oriented structure with generic base classes;

• Multi-zones structure suitable for distributed memory computations withinterface exchanges (communication between computational nodes) [2].

What we added to complete the multi-physic framework• Treatment of the surface mesh;

• Extension of the multi-zones structure to the additional modeled physics.

Aircraft Aero-Icing Suite Using Chapel – H. Papillon Laroche et al. 6/19

Page 7: Development of an Aircraft Aero-Icing Suite Us- ing Chapel

POLYTECHNIQUE MONTREAL Aircraft Icing Simulations Why Use Chapel? Data Structure Challenges Results Outcomes

Challenges of Multi-Physic Simulations

Surface and Volume meshesDistribution of the zones across the computational nodes→ to better distribute the volume mesh.

• Adapted for the flow and droplet solvers (resolution on the volume mesh);

• Can lead to an unbalanced distribution across the computational nodes for thethermodynamic exchanges and the geometry evolution.

Locale 0Locale 1

No redistribution With redistribution

Locale 0Locale 1

No redistribution With redistribution

Aircraft Aero-Icing Suite Using Chapel – H. Papillon Laroche et al. 7/19

Page 8: Development of an Aircraft Aero-Icing Suite Us- ing Chapel

POLYTECHNIQUE MONTREAL Aircraft Icing Simulations Why Use Chapel? Data Structure Challenges Results Outcomes

Challenges of Multi-Physic Simulations

How can we re-balance the distribution and reduce under-utilized resources?

Locale 0Locale 1

No redistribution With redistribution

Locale 0Locale 1

No redistribution With redistribution

Distribution handlingThe GlobalHandle c generic class handles the distribution across the Locales of thecomputation domain (mesh) [2]:• Difference between surface and volume meshes → the number of topological dimensions;

• GlobalHandle c is generic as the mesh type is a type alias of the class → it works for anynumber of topological dimensions;

• The re-distribution of the surface mesh re-uses the GlobalHandle c, as the distribution of thevolume mesh.

Aircraft Aero-Icing Suite Using Chapel – H. Papillon Laroche et al. 8/19

Page 9: Development of an Aircraft Aero-Icing Suite Us- ing Chapel

POLYTECHNIQUE MONTREAL Aircraft Icing Simulations Why Use Chapel? Data Structure Challenges Results Outcomes

Challenges of Multi-Physic SimulationsHow can we re-balance the distribution and reduceunder-utilized resources?

Locale 0Locale 1

No redistribution With redistribution

Locale 0Locale 1

No redistribution With redistribution

Re-distribution handling1 Delete the instance of GlobalHandle c(VolumeMesh) → by simply exiting the

scope since everything uses owned memory management;

2 Instantiate again a GlobalHandle c, but with the surface mesh (after reading thelatter);

3 With this instance of GlobalHandle c, the surface zones are automaticallydistributed with a Block distribution across all the Locales.

Aircraft Aero-Icing Suite Using Chapel – H. Papillon Laroche et al. 9/19

Page 10: Development of an Aircraft Aero-Icing Suite Us- ing Chapel

POLYTECHNIQUE MONTREAL Aircraft Icing Simulations Why Use Chapel? Data Structure Challenges Results Outcomes

Challenges of Multi-Physic Simulations

The addition of modeled physics (turbulence, droplet impingement, thermodynamicexchanges and geometry evolution) required a flexible structure to enable a productiveframework.

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]

Aircraft Aero-Icing Suite Using Chapel – H. Papillon Laroche et al. 10/19

Page 11: Development of an Aircraft Aero-Icing Suite Us- ing Chapel

POLYTECHNIQUE MONTREAL Aircraft Icing Simulations Why Use Chapel? Data Structure Challenges Results Outcomes

Challenges of Multi-Physic Simulations

ModelHandle c → simple hierarchical structure but ...

Compilation difficulties encountered throughout theimplementation of the new models.

• Combination of object-oriented programming andgeneric objects for the zones and the models;

• Definition of the methods of the children objects often require a tight controlwith where statements to avoid compilation errors due to non-existing fields ormethods in parents or in siblings.� �

1 where globalHandle.type == GlobalHandleFlow_t || globalHandle.type ==

BorrowedGlobalHandleFlow_t || globalHandle.type == GlobalHandleIcing_t ||

globalHandle.type == BorrowedGlobalHandleIcing_t

2 where zone.type < MeshFlow_c� �Aircraft Aero-Icing Suite Using Chapel – H. Papillon Laroche et al. 11/19

Page 12: Development of an Aircraft Aero-Icing Suite Us- ing Chapel

POLYTECHNIQUE MONTREAL Aircraft Icing Simulations Why Use Chapel? Data Structure Challenges Results Outcomes

Challenges of the Chapel Implementation

One of the main drawbacks of the growth of CHAMPS with new components or mod-ules is the increase in compilation time and required memory, especially for the icingexecutable.

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

Aircraft Aero-Icing Suite Using Chapel – H. Papillon Laroche et al. 12/19

Page 13: Development of an Aircraft Aero-Icing Suite Us- ing Chapel

POLYTECHNIQUE MONTREAL Aircraft Icing Simulations Why Use Chapel? Data Structure Challenges Results Outcomes

Challenges of the Chapel implementation

At its highest point, the compilation time could take around 15 minutes, whereasmemory usage was seen to reach up to 30GB of memory (RAM).

Why?Simple causes (introduced by unfamiliar students withthe Chapel language):

• The overuse of generic function arguments in some modules;

• The use of too many modules everywhere even when they were not required.

Complex causes :

• The addition of new components in the code (new modules);

• The duplication of generic functions for multiple flavors of the mesh and modelobjects (even outside programmed combinations).

Aircraft Aero-Icing Suite Using Chapel – H. Papillon Laroche et al. 13/19

Page 14: Development of an Aircraft Aero-Icing Suite Us- ing Chapel

POLYTECHNIQUE MONTREAL Aircraft Icing Simulations Why Use Chapel? Data Structure Challenges Results Outcomes

Challenges of the Chapel implementation

How to reduce the compilation costs?

• Split the compilation in two phases for memory

usage:

1 the generation of the C code from the Chapel

files;

2 the compilation of the C code.

• Address the overuse of generic functions

arguments and modules;

• Properly use where statements to limit the

duplication of generic functions. 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

What remains?• The optimization operation performed after version 1.17 was lost for some reasons in version 1.19;

• An hypothesis lies within the where statements discussed before, but it is not yet verified.

Aircraft Aero-Icing Suite Using Chapel – H. Papillon Laroche et al. 14/19

Page 15: Development of an Aircraft Aero-Icing Suite Us- ing Chapel

POLYTECHNIQUE MONTREAL Aircraft Icing Simulations Why Use Chapel? Data Structure Challenges Results Outcomes

ResultsTwo approaches are available in CHAMPS :• Deterministic;• Stochastic.

Aircraft Aero-Icing Suite Using Chapel – H. Papillon Laroche et al. 15/19

Page 16: Development of an Aircraft Aero-Icing Suite Us- ing Chapel

POLYTECHNIQUE MONTREAL Aircraft Icing Simulations Why Use Chapel? Data Structure Challenges Results Outcomes

Results

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.

2D rime ice: Case 241 from IPW1 [1]

Y

Z

3D rime ice: Case 241 from IPW1 [1]

Aircraft Aero-Icing Suite Using Chapel – H. Papillon Laroche et al. 16/19

Page 17: Development of an Aircraft Aero-Icing Suite Us- ing Chapel

POLYTECHNIQUE MONTREAL Aircraft Icing Simulations Why Use Chapel? Data Structure Challenges Results Outcomes

Results

X [m]

Y [

m]

­0.02 0 0.02 0.04 0.06­0.04

­0.03

­0.02

­0.01

0

0.01

0.02

0.03

Stochastic Approach

Experimental Shape

Clean

2D rime ice: Case 01 from [3] 2D rime ice: Case 241 from IPW1 [1]

Aircraft Aero-Icing Suite Using Chapel – H. Papillon Laroche et al. 17/19

Page 18: Development of an Aircraft Aero-Icing Suite Us- ing Chapel

POLYTECHNIQUE MONTREAL Aircraft Icing Simulations Why Use Chapel? Data Structure Challenges Results Outcomes

Outcomes

In an academic context• Allows the graduate students to focus on the physics they model;• Enables fast prototyping of various physic models;• Aircraft icing is still not well understood.

Participation to the 1st Icing Prediction Workshop• Brings together organizations to compare icing predictions;• Code-to-code comparisons to CFD software using more traditional programming

languages (Fortran, C, C++);• Ansys FENSAP-ICE, NASA LEWICE, ONERA IGLOO3D;

• Allows us to assess the fidelity of CHAMPS compared to more traditional CFDsoftware.

Aircraft Aero-Icing Suite Using Chapel – H. Papillon Laroche et al. 18/19

Page 19: Development of an Aircraft Aero-Icing Suite Us- ing Chapel

POLYTECHNIQUE MONTREAL Aircraft Icing Simulations Why Use Chapel? Data Structure Challenges Results Outcomes

Reference I

[1] AIAA.1st AIAA Ice Prediction Workshop.https://folk.ntnu.no/richahan/IPW/.

[2] Matthieu Parenteau, Simon Bourgault-Cote, Frederic Plante, Engin Kayraklioglu, and Eric Laurendeau.Development of parallel cfd applications with the chapel programming language.January 2021.

[3] Pierre Trontin, Ghislain Blanchard, Alexandros Kontogiannis, and Philippe Villedieu.Description and assessment of the new ONERA 2D icing suite IGLOO2D.In 9th AIAA Atmospheric and Space Environments Conference. AIAA Paper 2017-3417, June 2017.

Aircraft Aero-Icing Suite Using Chapel – H. Papillon Laroche et al. 19/19