Simulation Result From Tecplot Analyse

  1. Introduction
  2. Matrix interpolating
    1. scipy.interpolate.griddata

Introduction

This project is analyse a 3D space, such as an engine. There is a flammable liquate shot into this space burned with air. The goal is using Convolutional Neural Network(CNN) to analysis wheter there are some voxels unusual. The data I got is a 21132,300 array. They are describing a 0.1m0.1m*0.1m cube space. The first three columns are the 3 directions distance from origin point. They locates totally 132,300 points in this cube space. The following cubes are the valures for every point. For example, the temperature, pressure, liquite speed, etc. Therefore, there are two steps for this project. 1st: build up the dataset. 2nd: tranning and test with CNN.


Matrix interpolating

The first idea I have is converting the input data into 3D matrixes with different values. For example, a matixes each pixel is describing temperter in this space. These matrixes will be similar with the 3D images I worked before. Getting close to the coordinates, they are not perfect numbers. For the X coordinate, the biggest number is 1.000000015E-01 and the first non-zero number is 2.722533187E-03.If we treat 2.722533187E-03 as the smallest unit, there are 36.73 units compare with 1.000000015E-01. Which is not integer. Also the totally point 36^3 is much smaller than 132,300. I checked how many different numbers in each coordinates. Turns out X has 30,305, Y has 97, Z has 30,466 different elements in their list. To reach this goal, transfer into a matrix, there are some functions I need to study for.

scipy.interpolate.griddata

numpy has some functions can convert 1D arraies into 1 nD array. However, the task actually is writing data into a 3D array. Therefore, scipy.interpolate is necessary.
Link to griddata
This function is used to interpolate unstructured D-D data. It included 3 method. The source cod is not very long. To understand it, I checked the functions emploied in it. They are scipy.spatial.cKDTree (it is same with KDTree now), numpy.argsort, numpy.asarray, numpy.meshgrid, numpy.linspace.

Link to NearestNDInterpolator
Link to LinearNDInterpolator
Link to CloughToucher2DInterpolator


###


If you have any questions, please contact with tianluwu@gmail.com