This data-driven model is based on the convolutional neural network (CNN) for force estimation in moving boundary problems by regarding the velocity field on a series of cross sections as images. It has three CNN architectures for integrating physical information or attention mechanism. The model performances indicate that the optimized CNN can identify important flow regions and learn empirical physical laws.
- python3.7
- pytorch1.0+cu80
Prepare the input data from the DNS with different flow parameters.
Create a root directory (e.g. data/stationary_plate/npy_files), and case directory (e.g. re300_aoa5_ar2), then prepare the data along the streamwise position in the wake. For the velocity data, its shape is (H, W, 3) with three components.
The data structure looks like
│ data
| stationary_plate
| npy_files
| re300_aoa5_ar2
| npy_velocity_x_ 1.00_index_01000.npy
| npy_velocity_x_ 1.02_index_01000.npy
| npy_velocity_x_ 1.04_index_01000.npy
| ...
| re300_aoa5_ar2
| re300_aoa10_ar2
| ...
The baseline CNN model is adapted from the ResNet.You can run the provided scripts with different model architectures to train and test the model.
$ sh st_data1_resnet9.sh # the baseline
$ sh st_data1_resnet9_aoa.sh # baseline + alpha
$ sh st_data1_resnet9_aoa_spatt.sh # baseline + alpha + attention module
This repository is based on pytorch-cifar100.