Geri Dön

A fast 3d flow field prediction around bluff bodies using deep learning

Derin öğrenme kullanılarak küt cisimler etrafındaki 3 boyutlu akış alanının tahmini

  1. Tez No: 826860
  2. Yazar: FARHAD NEMATI TAHER
  3. Danışmanlar: DOÇ. DR. ABDUSSAMET SUBAŞI
  4. Tez Türü: Yüksek Lisans
  5. Konular: Makine Mühendisliği, Mechanical Engineering
  6. Anahtar Kelimeler: Belirtilmemiş.
  7. Yıl: 2023
  8. Dil: İngilizce
  9. Üniversite: İstanbul Teknik Üniversitesi
  10. Enstitü: Lisansüstü Eğitim Enstitüsü
  11. Ana Bilim Dalı: Makine Mühendisliği Ana Bilim Dalı
  12. Bilim Dalı: Isı-Akışkan Bilim Dalı
  13. Sayfa Sayısı: 106

Özet

Makina öğrenmesinin bir alt dalı olan derin öğrenme, akışkanlar mekaniği alanında akış alanı tahmini, akış kontrolü ve optimizasyonu, akışkan-yapı etkileşimleri ve görüntü tabanlı akış analizi gibi çeşitli uygulamalara sahiptir. Bu tez çalışmasında, derin öğrenme modeli kullanarak türbülanslı bir dış akışta 3-boyutlu akış alanının (hız ve basınç dağılımlarının) tahmin edilmesi amaçlanmaktadır. Bu çalışma için PoinNet derin öğrenme mimarisi seçilmiş olup, konvolüsyonel sinir ağlarının aksine, verilerin interpolasyonuna ihtiyaç duymamakta ve düzensiz ağların düğüm noktalarını doğrudan girdi olarak kullanabilmekte ve bu sayede sayısal çözümün hassasiyetini koruyabilmektedir. Bu model, ağ yapısının koordinatlarını girdi olarak almakta ve verilen girdi noktalarında karşılık gelen basınç ve hız değerlerini tahmin etmektedir. Ağın eğitim aşaması için gerekli olan veriler Hesaplamalı Akışkanlar Dinamiği (HAD) simülasyonları ile üretilmiştir. Kenar uzunluğu 30 mm olan bir eşkenar dörtgen prizma temel şekil olarak seçilmiştir. Eşkenar dörtgen prizma; uç açısı (α), eğim açısı (β), dönel açı (θ) ve z-yönündeki uzunluk (D) olmak üzere dört geometrik parametreye sahiptir. Bu parametrelerden sadece α ve β değiştirilerek 961 farklı eşkenar dörtgen pirizması içeren küçük bir veri seti oluşturulurken, tüm geometrik parametreler dikkate alındığında 3511 farklı şekilden oluşan büyük bir veri kümesi elde edilmiştir. Koordinat sistemi şeklin ağırlık merkezinde olacak şekile oluşturulmuştur. Tet-hibrit ağ yapısı karmaşık geometriler için kolay uygulanabilirliği nedeniyle tercih edilmiştir. Sınır tabakalarındaki değişimleri doğru bir şekilde yakalamak için cisme yakın bölgelerde daha sık bir ağ yapısı oluşturulmuştur. Simülasyonlar Ansys-Fluent kullanılarak gerçekleştirilmiştir. Farklı türbülans modellerinin hem doğruluk hem de hesaplama süresi göz önünde bulundurularak kapsamlı bir şekilde test edilmesinin ardından Standart k-ε epsilon türbülans modeli seçilmiştir. Çalışma kapsamında iş akışkanı olarak sabit termodinamik özelliklere sahip oda sıcaklığındaki hava seçilmiştir. Hesaplama alanının, giriş sınır şartı olarak 4.87 m/s serbest akış hızı ve çıkış sınır şartı olarak da çıkış (outflow) sınır şartı kullanılmıştır. Cismin duvarlarında kaymama sınır şartı uygulanırken, yan duvarlara sıfır kayma gerilmesi (zero-shear stress) koşulu uygulanmıştır. Her bir simülasyonun ayarlanması, koşturulabilmesi ve sonuçların dışa aktarılabilmesi işlemlerinin otomatize edilebilmesi için ANSYS_AAS araç kutusu kullanarak Ansys-Fluent ile MATLAB programları konuşturulmuştur. Simülasyon sonuçlarının derin öğrenmede kullanılabilmesi için tüm sonuçların bir matriste toplanması ve verilerin manipüle edilmesi gerekmektedir. Bu kapsamda; öncelikle akış alanı tahmini yapılacak cismin yakın komşuluğundaki 10,000 noktanın seçileceği bir algoritma oluşturulmuştur. Daha sonra x, y ve z yönlerindeki hız ve basınç olmak üzere dört farklı değişkenin tek bir derin öğrenme ağı üzerinden tahmini yapılacağı için farklı alt ve üst değere sahip her bir değişkenin eşit katkı sağlaması için veriler min-max yöntemi kullanılarak 0.1 ila 0.9 aralığında normalize edilmiştir. PointNet mimarisi üzerinde, 3-boyutlu akış alanını tahmin edebilmek için çeşitli değişiklikler yapılmıştır. Her bir cisim için x, y ve z koordinatları ağın girdileri; x, y, ve z yönündeki hızlar ve basınç ise ağın çıktıları olarak belirlenmiştir. Bu kapsamda herbir cisim için ayrı ayrı 10,000×3 boyutunda bir giriş matrisi ağa girmekte ve tamin sonucunda da 10,000×4 boyutunda bir matris ağ tarafından üretilmektedir. Ağın eğitilmesi süreci, kayıp fonksiyonunu en aza indirecek model parametrelerinin belirlenmesidir. Küçük ve büyük olmak üzere iki farklı veri seti için ağlar ayrı ayrı eğitilmiştir. Bu kapsamda veriler karıştırıldıktan sonra küçük veri seti için verilerin %80'i eğitim, %10'u doğrulama ve %10'u da test verisi olarak ayrılırken; büyük veri seti için verilerin %65.5'i eğitim, %20.5'i doğrulama ve %14'ü de test verisi olarak ayrılmıştır. Çalışma kapsamında; ağın eğitilmesi ve test edilmesinde TensorFlow ve Keras kütüphaneleri kullanılmıştır. Eğitim sürecinde, İstanbul Teknik Üniversitesi bünyesinde bulunan Ulusal Yüksek Başarımlı Hesaplama Merkezi (Uhem) tarafından sağlanan kaynaklar kullanılmıştır. Derin öğrenme modelinin hiperparametrelerini (başlangıç öğrenme hızını, her Çok Katmanlı Algılayıcıdaki (MLP) katman sayısını ve farklı katmanlardaki nöron sayısını) optimize etmek için Bayes optimizasyonu yaklaşımı kullanılmıştır. Farklı katmanlar ve nöron sayıları için olası kombinasyonların sayısının oldukça fazla olması nedeniyle, maksimum deneme sayısı 80 ile sınırlanmıştır. Ayrıca, maksimum EPOCH sayısı da 50 olarak belirlenmiştir. Eğitim süreci, küçük olan veri seti (961 örnek) için 5000 EPOCH sürerken, büyük veri seti (3511 örnek) için 1400 EPOCH sürmüştür. Büyük veri seti, küçük veri setine göre aynı kayıp değerlerine ulaşma konusunda daha hızlı bir yakınsama hızı sergilemiştir. Ancak artan hesaplama yükü ve yakınsamada daha fazla ilerlemenin olmaması nedeniyle bu aşamada eğitimi sonlandırılmıştır. Küçük veri seti için nihai eğitim ve doğrulama kayıp değerleri sırasıyla 1.25×10-4 ve 1.34×10-4 olarak, 4600. EPOCH'ta elde edilmiştir. Büyük veri seti için de en iyi elde edilen eğitim ve doğrulama kayıp değerleri sırasıyla 3.08×10-4 ve 2.54×10-4 olarak, 1400. EPOCH'ta elde edilmiştir. Eğitim aşamasından sonra, ağın genel tahmin yeteneği her iki veri seti için ayrı ayrı test edilmiştir. Küçük veri seti için ağ tarafından daha önce görülmemiş 96 örnek denenmiştir. Bu deneme için kayıp değeri 1.38×10-4 olarak belirlenmiştir. Benzer şekilde, büyük veri seti için 490 örnek için ağın tahminleme performansı test edilmiştir. Bu test soucunda ise kayıp değeri 2.59×10-4 olarak belirlenmiştir. Bu değerlendirmelere ek olarak Noktasal Göreceli Hata Yüzdesi (REP) ve Ortalama Göreceli Hata Yüzdesi (AREP) ayrıca derin öğrenme modelinin performansını değerlendirmek için dikkate alınmıştır. Bu değerlendirmelerle birlikte eğitilen ağların 3-boyutlu akış alanlarını yüksek bir hassasiyet seviyesiyle doğru bir şekilde tahmin ettiği ve Hesaplamalı Akışkanlar Dinamiği (CFD) simülasyonlarına kıyasla tahin süresinin oldukça kısa olduğu sonucuna varılmıştır. Dolayısıyla derin öğrenmenin; 3-boyutlu akış alanını doğru ve hızlı bir şekilde tahmin etme yeteneği göz önüne alındığında, mühendislik süreçlerini hızlandırma, tasarımları optimize etme, hesaplama maliyetlerini azaltma ve mühendislik tasarımı gibi alanlarda daha hızlı karar verme potansiyelinini yüksek olduğu sonucuna varılmıştır.

Özet (Çeviri)

Deep learning, as a subset of machine learning, has various applications in the field of fluid mechanics, including flow prediction, flow control and optimization, fluid-structure interactions, and image-based fluid flow analysis. This study focuses specifically on flow prediction, aiming to estimate the behavior of flow field, such as velocity and pressure distributions, in an external turbulent flow using a deep learning model. The chosen deep learning architecture for this study is PoinNet, originally designed for machine vision and capable of processing unordered point clouds. Unlike convolutional neural networks, PoinNet does not require data interpolation, allowing direct utilization of unstructured grid system nodes as input, thus preserving the accuracy of the numerical solution. This model takes spatial coordinates of the grid system as input and produces the corresponding pressure and velocity quantities at the given input points. Computational Fluid Dynamics (CFD) is employed to generate the required dataset for the training phase. A right rhombic prism with a side edge of 30 mm is selected as the base shape, with four variable geometrical parameters: Tip Angle (α), Inclination Angle (β), Rotation Angle (θ), and length in the specific direction (D). By varying only α and β, a smaller dataset consisting of 961 models is generated, while considering all parameters results in a larger dataset of 3511 different samples. The coordinate system is established at the center of mass of the solid shape. A Tet-hybrid unstructured grid system is generated in the computational domain due to its ease of implementation in complex domains. A finer mesh is created around the object, accompanied by inflation layers applied to the object's walls to accurately capture the gradients in boundary layers. Considering the significant number of simulations involved, striking a balance between accuracy and computational time is crucial, leading to an effort to minimize the number of cells while maintaining reasonable accuracy. The numerical solutions are obtained using Ansys-Fluent. After thorough testing of various turbulent models, considering both accuracy and computational time, the Standard k-ε epsilon turbulence model with a coupled pressure-velocity coupling scheme is adopted for the turbulent flow computations. Air under room temperature conditions, with constant thermophysical properties, is chosen as the working fluid. The upstream velocity is set to a constant value of 4.87 m/s. Velocity inlet and outflow boundary conditions are applied at the inlet and outlet of the computational domain, respectively. Meanwhile, no-slip and zero-shear stress conditions are imposed on the walls of the bluff body and the side walls of the domain, respectively. Given the impracticality of manually setting up all the models, exporting the solution data, and saving the results of numerical solutions in Ansys-Fluent, it is coupled with MATLAB using the ANSYS_AAS toolbox and launched in AAS mode to automate the simulation procedure. A MATLAB code and a Text User Interface (TUI) journal file are developed to provide Fluent settings for each case. The node-based solution data is exported as an ASCII file format for each sample. Before concatenating all the exported files into a 3D array to form the dataset, some data manipulations are required. Firstly, it is unnecessary to predict the entire CFD domain with the neural network since the area of interest is limited to the region close to the object. Additionally, computational resources impose limitations on the number of inputs. Therefore, a specific algorithm is employed to filter out some points, restricting the number of inputs to 10,000. Secondly, a single network is utilized to predict the results for four different variables, each with different ranges. To ensure equal contributions of output variables in determining network weights, data normalization is essential. After making the velocity and pressure variables dimensionless, the adjusted min-max method was utilized to scale them in the range of 0.1 to 0.9. The PointNet neural network architecture has been modified to establish a mapping from the coordinates of the unstructured nodes in a 3D grid system as input to the corresponding values of the velocity components and pressure at the related nodes. This is a nonlinear regression problem that is modeled by a supervised learning neural network. An input array of size 10,000×3 goes through the network, and an output array of size 10,000×4 is produced. The 3 represents the coordinates of each node, and the 4 represents the number of predicted parameters, which are velocity components and pressure. The training process involves optimizing the 11,231,821 trainable parameters in the model by minimizing the loss function. After shuffling the samples, the data for both datasets are partitioned into training, validation, and testing subsets, with proportions of 80%, 10%, and 10% for the smaller dataset with 961 models, and 65.5%, 20.5%, and 14% for the larger dataset with 3511 models, respectively. The implementation, training, and testing of the neural network have been carried out using the TensorFlow framework and the Keras library in this study. The training process utilized the resources provided by UHem; the National Center for High-Performance Computing located at Istanbul Technical University. Prediction of a 3D flow field in a proper manner requires an increased number of input points. Consequently, the original PointNet architecture was modified to meet this challenge. The architecture was adjusted by changing the number of layers and the number of neurons. To optimize the hyperparameters of the deep learning model, such as the initial learning rate, the number of layers in each Multi-Layer Perceptron (MLP), and the number of neurons in different layers, a Bayesian optimization approach is employed. Constraints are applied to the number of layers and neurons in each MLP to define the search area in the Bayesian method. Due to the extensive number of possible combinations for different layers and neuron numbers, limitations were imposed on the maximum number of trials, restricting it to 80 tests. Additionally, the maximum number of epochs is set to 50. The training process spanned 5000 epochs for the smaller dataset (961 samples) and 1400 epochs for the larger dataset (3511 samples). The larger dataset demonstrated a faster convergence speed in reaching the same loss values compared to the smaller dataset. However, due to the increased computational burden and the absence of further improvement in convergence, it was necessary to terminate the training at this stage. The final training and validation loss values for the smaller dataset are 1.25×10^(-4) and 1.34×10^(-4), respectively, which were obtained at epoch 4600. For the larger dataset, the best achieved training and validation loss values are 3.08×10^(-4) and 2.54×10^(-4) at epoch 1400, respectively. After the training phase, the generalizability of the network was tested using both datasets. For the smaller dataset, the network was evaluated using 96 previously unseen samples in the test subset. The test loss value for the smaller dataset is 1.38〖×10〗^(-4), which is slightly larger than the validation loss. No abnormalities are evident in this evaluation. Similarly, the larger dataset underwent testing with a test subset comprising 490 samples. For this dataset, the test loss value was measured at 2.59〖×10〗^(-4). This evaluation also indicates promising performance and aligns with the trends observed in the smaller dataset evaluation. Point-wise Relative Error Percentage (REP) and Average Relative Error Percentage (AREPs) were also considered to evaluate the performance of the deep learning model. The average error of the entire test set is close to the minimum value, indicating that most of the samples in the test subsets have a relative error value close to the minimum value. The model is further evaluated through comparisons made between predicted data and numerical simulations. This evaluation involves analyzing velocity and pressure distribution contours, error distribution contours, correlation charts, and determination coefficients for each output parameter. The model's performance in accurately predicting 3D flow fields with a satisfactory level of precision is impressive. Moreover, the network's ability to generate predictions significantly faster than conventional CFD solvers while maintaining excellent to reasonable accuracy is a notable advantage. The ability to obtain accurate and fast flow field predictions has the potential to enhance engineering processes, optimize designs, and reduce computational costs. It opens up opportunities for more efficient simulations and facilitates quicker decision-making in fields such as fluid dynamics, aerodynamics, and engineering design.

Benzer Tezler

  1. A numerical approach for predicting hemodynamic characteristics of 3D aorta geometry under pulsatile turbulent blood flow conditions using fluid-structure interaction

    Sıvı-yapı etkileşimini kullanarak pulsatil türbülanslı kan akışı koşullarında 3B aort geometrisinin hemodinamik karakteristiklerini öngörmek için sayısal bir yaklaşım

    AHMET SAAT

    Yüksek Lisans

    İngilizce

    İngilizce

    2022

    BiyomühendislikBoğaziçi Üniversitesi

    Makine Mühendisliği Ana Bilim Dalı

    PROF. DR. SALİM KUNT ATALIK

  2. Numerical burnback analysis of three dimensional solid propellant grains

    Üç boyutlu katı yakıt çekirdeklerinin sayısal geriye yanma analizi

    YUSUF ATA

    Yüksek Lisans

    İngilizce

    İngilizce

    2015

    Havacılık MühendisliğiOrta Doğu Teknik Üniversitesi

    Havacılık Mühendisliği Ana Bilim Dalı

    YRD. DOÇ. DR. DİLEK FUNDA KURTULUŞ

  3. A Three dimensional finite element model for current analysis and contaminant transport in coastal seas

    Kıyısal deniz akıntıları ve kirlilik taşınımı için üç boyutlu sonlu elemanlar modeli

    SERVER LEVENT YILMAZ

    Yüksek Lisans

    İngilizce

    İngilizce

    2003

    Makine MühendisliğiBoğaziçi Üniversitesi

    Makine Mühendisliği Ana Bilim Dalı

    DOÇ. DR. HALUK ÖRS

  4. Radyal pompaların kavitasyon performansının hesaplanması ve iyileştirilmesi

    Computation and improvement of the cavitation performance of radial flow pumps

    MEHMET KAYA

    Doktora

    Türkçe

    Türkçe

    2020

    Makine Mühendisliğiİstanbul Teknik Üniversitesi

    Makine Mühendisliği Ana Bilim Dalı

    PROF. DR. ERKAN AYDER

  5. Digital video stabilization with SIFT flow

    SIFT akışı ile sayısal video sabitleme

    İNCİ MELİHA BAYTAŞ

    Yüksek Lisans

    İngilizce

    İngilizce

    2014

    Elektrik ve Elektronik Mühendisliğiİstanbul Teknik Üniversitesi

    Elektronik ve Haberleşme Mühendisliği Ana Bilim Dalı

    PROF. DR. MELİH PAZARCI