baler-collaboration / baler

Repository of Baler, a machine learning based data compression tool
https://github.com/baler-collaboration/baler.github.io
Apache License 2.0
30 stars 24 forks source link

Support for 3D CFD files #37

Closed exook closed 7 months ago

exook commented 1 year ago

Implement a 3D convolutional neural network which can run on 3D time series CFD data

singh96aman commented 1 year ago

Could you please send a 3D CFD File to understand the work estimate ? FYI, we'll have to make minor updates in all plots, with writing a new plot routine, I believe

martacamps commented 1 year ago

I've generated a 3D CFD field of a flow around a wall mounted cube.

Here are some images of the flow:

Vertical cut through the middle of the cube image

Horizontal cut through the middle of the cube image

The size of the file is 60 x 39 x 140 points. 60 in z direction, 39 in y direction and 140 in x direction.

And this is a link to the CFD data in .npz format with the data (3D array) and an empty 'names' array, as done for the other CFD data in Baler.

Let me know if you need anything else, for example a different size of the data.

singh96aman commented 1 year ago

Few questions - @martacamps @exook

  1. This is a 60x39x140 dataset vs CFD flow datasets of 60x50x50. FYI I ran the Dense AE model on it and had to make few replacements. Not a question but a comment to make the Dense AE more generic.

  2. Attached is the reconstruction plot from the Dense network. It does show reconstruction but differ from above Marta images so just want to confirm that the plot is working fine.

  3. If above 2 points are fine, we can try the 3D Conv Net in #270

image

martacamps commented 1 year ago

Hi @singh96aman , thank you for working on the CFD branch, looks like good progress on the 3D CFD compression :-).

  1. The reconstruction plots look good, I think the image is the same as my top plot, just with a couple of differences:
    • Different colour scale.
    • Coordinates and flow velocity converted from lattice Boltzmann units to physical units. This simulation has different conversion values than the 60x50x50. The parameters for the 60x39x140 are: dt (time step) = 0.004; dx (cell size) = 0.05. I think there should be somewhere in the plotting script to enter this values, but they shouldn't really affect the quality of the compression.

Also, the plot only shows one slice of the 3D flow. Showing 3D plots to include all the volume would be quite confusing though. One option would be to show an animation, as with the 60x50x50 case, but moving across the z coordinate instead of time. It could also be interesting to calculate the averaged error for all the cells, its minum, maximum etc.