Skip to content
Snippets Groups Projects
user avatar
a.alguacil-cabrerizo authored
ba8fe555
Name Last commit Last update
data_generation
images
network
README.md

Effects of Boundary Conditions in Fully Convolutional Networks for Learning Spatio-temporal Dynamics (ECML-PKDD 2021)

This repository contains the data, code and additional results of our paper accepted to the Applied Data Science Tracks at ECML-PKDD 2021. If you find this code useful in your research, please consider citing:

@misc{alguacil2021effects,
  title={Effects of boundary conditions in fully convolutional networks for learning spatio-temporal dynamics}, 
  author={Antonio Alguacil and Wagner Gonçalves Pinto and Michael Bauerheim and Marc C. Jacob and Stéphane Moreau},
  year={2021},
  eprint={2106.11160},
  archivePrefix={arXiv},
  primaryClass={cs.LG}
}

The repository is organized as follows:

  • data_generation: code for the generation of the database using Palabos
  • network: implementation of the neural network, train and testing scripts

You can browse the different subfolder to generate the data with an open-source CFD code, train the neural network or test the method.

Network architecture

The employed neural network is a Multi-Scale architecture from this paper. 3 Scales are used, with dimensions N, N/2 and N/4, composed by 17 two-dimensional convolution operations, for a total of 422,419 trainable parameters. ReLUs are used as activation function and replication padding is used to maintain layers size unchanged inside each scale.

Neural network architecture

Computing environment

Hardware and versions of the software used in the study are listed below:

  • CPU: Intel® Xeon® Gold 6126 Processor 2.60 GHz
  • GPU: Nvidia Tesla V100 32Gb, Nvidia GPU Driver Version 455.32
  • Software: Python 3.8.5, PyTorch 1.7.0, pytorch-lightning 1.0.1, numpy 1.19.2 and CUDA 11.1

Explicit BCs enforcing: implementation details

The explicit BCs rules are implemented using Finite Difference (FD) schemes in network/pulsenetlib/neuralnet2d.py:ExplicitBCMultiScaleNet.

Reflecting and Adiabatic BCs (Neumann)

The Neumann BCs reads (for either density or temperature fields):

1

Employing a 1st order finite difference spatial scheme, the missing values can be set as:

1

and:

1

where t represents the temporal dimension and i the spatial dimension.

Absorbing BCs (LODI Chacteristics)

For the absorbing case, non-reflecting boundary conditions are modeled with the simple Locally-One Dimensional Inviscid (LODI) hypothesis, written as

1

where 1 denotes the speed of sound.

Employing first order FD schemes in time and space, the missing boundary values can be written as

1

and

1

where 1 denotes the Courant–Friedrichs–Lewy number, relating the speed of sound, temporal and space steps in explicit schemes.

Additional Results

Dataset 1: Reflecting walls

Initial condition 000, reflecting BCs (dataset D1)

Method Padding it=0 it=40 it=80 it=120 it=160 it=200 it=240 it=280
Ground truth 1 1 1 1 1 1 1 1
Implicit Zeros 1 1 1 1 1 1 1 1
Circular 1 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1 1
Reflect 1 1 1 1 1 1 1 1
Context Zeros 1 1 1 1 1 1 1 1
Circular 1 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1 1
Reflect 1 1 1 1 1 1 1 1
Explicit Zeros 1 1 1 1 1 1 1 1
Circular 1 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1 1
Reflect 1 1 1 1 1 1 1 1
1

Initial condition 014, reflecting BCs (dataset D1)

Method Padding it=0 it=60 it=80 it=120 it=160 it=200 it=240 it=280
Ground truth 1 1 1 1 1 1 1 1
Implicit Zeros 1 1 1 1 1 1 1 1
Circular 1 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1 1
Reflect 1 1 1 1 1 1 1 1
Context Zeros 1 1 1 1 1 1 1 1
Circular 1 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1 1
Reflect 1 1 1 1 1 1 1 1
Explicit Zeros 1 1 1 1 1 1 1 1
Circular 1 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1 1
Reflect 1 1 1 1 1 1 1 1
1

Dataset 2: Periodic walls

Initial condition 000, periodic BCs (dataset D2)

Method Padding it=0 it=40 it=80 it=120 it=160 it=200 it=240 it=280
Ground truth 1 1 1 1 1 1 1 1
Implicit Zeros 1 1 1 1 1 1 1 1
Circular 1 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1 1
Context Zeros 1 1 1 1 1 1 1 1
Circular 1 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1 1
1

Initial condition 001, periodic BCs (dataset D2)

Method Padding it=0 it=40 it=80 it=120 it=160 it=200 it=240 it=280
Ground truth 1 1 1 1 1 1 1 1
Implicit Zeros 1 1 1 1 1 1 1 1
Circular 1 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1 1
Context Zeros 1 1 1 1 1 1 1 1
Circular 1 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1 1
1

Dataset 3: Absorbing walls

Initial condition 000, absorbing BCs (dataset D3)

Method Padding it=0 it=60 it=120 it=180 it=240 it=300 it=360 it=420
Ground truth 1 1 1 1 1 1 1 1
Implicit Zeros 1 1 1 1 1 1 1 1
Circular 1 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1 1
Reflect 1 1 1 1 1 1 1 1
Context Zeros 1 1 1 1 1 1 1 1
Circular 1 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1 1
Reflect 1 1 1 1 1 1 1 1
Explicit Zeros 1 1 1 1 1 1 1 1
Circular 1 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1 1
Reflect 1 1 1 1 1 1 1 1
1

Initial condition 001, absorbing BCs (dataset D3)

Method Padding it=0 it=60 it=120 it=180 it=240 it=300 it=360 it=420
Ground truth 1 1 1 1 1 1 1 1
Implicit Zeros 1 1 1 1 1 1 1 1
Circular 1 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1 1
Reflect 1 1 1 1 1 1 1 1
Context Zeros 1 1 1 1 1 1 1 1
Circular 1 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1 1
Reflect 1 1 1 1 1 1 1 1
Explicit Zeros 1 1 1 1 1 1 1 1
Circular 1 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1 1
Reflect 1 1 1 1 1 1 1 1
1

Initial condition 000, adiabatic BCs (dataset D4)

Method Padding it=0 it=12 it=16 it=20 it=12 it=80 it=100
Ground truth 1 1 1 1 1 1 1
Implicit Zeros 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1
Reflect 1 1 1 1 1 1 1
Context Zeros 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1
Reflect 1 1 1 1 1 1 1
Explicit Zeros 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1
Reflect 1 1 1 1 1 1 1

Initial condition 014, adiabatic BCs (dataset D4)

Method Padding it=0 it=12 it=16 it=20 it=12 it=80 it=100
Ground truth 1 1 1 1 1 1 1
Implicit Zeros 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1
Reflect 1 1 1 1 1 1 1
Context Zeros 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1
Reflect 1 1 1 1 1 1 1
Explicit Zeros 1 1 1 1 1 1 1
Replicate 1 1 1 1 1 1 1
Reflect 1 1 1 1 1 1 1