Convolutional Autoencoders and Clustering for Low-dimensional Parametrization of Incompressible Flows
The design of controllers for general nonlinear PDE models is a diffcult task because of the high dimensionality of the partially discretized equations. It has been observed that the embedding of nonlinear systems into the class of linear parameter varying systems (LPV) gives way to apply linear theory and methods from numerical linear algebra for controller design. The feasibility of the LPV approach hinges on the dimension of the inherent parametrization. In this work we propose and evaluate combinations of convolutional neural networks and clustering algorithms for very low-dimensional parametrizations of incompressible Navier-Stokes equations.
-
Traning session:
-
train.py
->centroids.py
->icae_train.py
- CAEs: 5 cases (reduced dimension [2,3,5,8,12])
- k-means clustering: 15 cases (reduced dimension [2,3,5,8,12] x number of clusters [5,30,100])
- iCAEs: 10 cases (reduced dimension [2,3,5,8,12] x number of clusters [5,30])
-
-
Evaluation session:
- Reconstruction errors:
evaluation.py
(POD, CAE, CAE100, iCAE5, iCAE30) - Approximation graphs:
trajectory.py
(POD, CAE, iCAE30) - 2-,3-dimensional
$\rho$ distributions:dist2d3d.py
(CAE)
- Reconstruction errors:
-
Directory information:
- data: train data, test data, and POD-mode data
- models: pretrained models and centroid data
- results: result images
-
Used libraries:
- os, argparse, tqdm, time, matplotlib, numpy, sklearn, torch
-
We provide everything including our pretrained models (pretrain.zip) and data. You can check the results without retraining after decompressing pretrain.zip in the "models" folder.
-
If you want to compute everything from scratch (note that this may take several hours), use
source runitall.sh
- Reynolds number: 40
- Train data: 400 snapshots in [0,10]
- Evaluation data: 800 snapshots in [0,10]
- Snapshot size
$n_v$ : 5922 (2x47x63)
The datasets and pretrained models are available via .
- batch_size: 64
- numer of epoch: 4000
- latent variable dimension
$n_\rho$ : 2, 3, 5, 8, 12 - learning rate: 1e-3 (1e-4 if
$n_\rho=2$ )
python train.py --latent_size 12 --num_epochs 3000 # --latent_size 3, 5, 8
python train.py --latent_size 2 --num_epochs 4000 --lr 1e-4
python centroids.py
- number of epoch: 15000
- latent variable dimension
$n_\rho$ : 2, 3, 5, 8, 12 - number of clusters
$k$ : 5, 30 - learning rate: 1e-3
python icae_train.py --latent_size 12 --num_clusters 5 # --latent_size 2, 3, 5, 8
- All the pretrained models and centroid data must be prepared.
python evaluation.py
python trajectory.py --latent_size 2 # 3, 5, 8, 12
python dist2d3d.py