This repository contains the implementation of a Deep Learning Framework based on Conditional Variational Autoencoder (CVAE) for the generation of a non-linear and efficient ROM for the prediction of the transonic aerodynamic simulations, but can be simply used for to the prediction of general non-linear 2D simulations. The description of the problem and the dataset can be found in the paper of of G.Catalani et al. " A comparative study of learning techniques for the compressible aerodynamics over a transonic RAE2822 airfoil". Compared to the paper the Deep Learning framework based on a UNet is replaced with a Conditional Variational Autoencoder.
The model consists of a Convolutional Encoder, a mirrored Convolutional Decoder connected through a latent representation of the data, following the standard VAE framework. In particular, the encoder takes as input the images, in order to approximates the posterior distribution of the latent coordinates, assumed following a Gaussian distribution. The decoder reconstruct the original images from the sampled latent coordinates. The prior distribution of the latent coordinates is assumed to follow a Standard Normal distribution. In order to be used for generation of simulation at given values of the inputs value, the posterior distribution is conditioned on the inputs value: practically both the encoder and decoder accept as additional inputs the labels (in this case [Mach Number, Angle of Attack]). The model is trained by maximizing the Evidence Lower Bound (ELBO): the model loss consists of two terms accounting for the reconstruction loss and for the regularity of the latent space (through the KL divergence between the approximated posterior and the prior). These two terms are weighed by the paramter Beta, which can be modulted.
The database consist of 2D simulations over the RAE 2822 transonic airfoil at Reynolds number is set to 6.5 million, corresponding to a typical cruise flight. Two parameters have been considered in this study:
•Angle of attack: ranging from 0° to 9°.
•Mach number: ranging from (incompressible) to 0.9 (transonic).
The simulations are interpolated on a pixel like grid in order to allow for convolution trhough standard convolutions.
The clone the repository:
git clone [email protected]:giovannicatalani/Aerodynamic-VAE.git
The model uses the PyTorch library. To install dependencies with conda:
conda env create -f env_rom.yml