Karmaşık geometriler için eğrisel koordinatlarda sonlu hacimler yöntemi ile korunum denklemlerinin iki boyutlu çözülmesi
Solving curvilinear form of governing equations in 2D complex geometries with finite volume method
Yazar: TAMER ŞENER
Danışman: PROF. DR. AHMET CİHAT BAYTAŞ
İstanbul Teknik Üniversitesi / Fen Bilimleri Enstitüsü / Uçak Mühendisliği Ana Bilim Dalı / Uçak ve Uzay Mühendisliği Bilim Dalı
Derece: Yüksek Lisans, 2018
Konu: Uçak Mühendisliği = Aircraft Engineering

Özet:
Mühendislik endüstrisinde akış alanının doğru şekilde tayin edilmesi aerodinamik performans değerleri açısından önemli rol oynamaktadır. Gelişen bilgisayar uygulamaları ve algoritmalarla bir geometri içindeki akış alanının doğru hesaplanmasının önünü açmaktadır. Bununla beraber bu alandaki gelişmeler hesaplama kesinliğini de deneysel çalışmalara yaklaştırmaktadır. Mühendislik uygulamalarındaki bu gelişmeler deneysel çalışmaların yerine kesinliği kabul edilebilir fakat daha az maliyetli olan hesaplamaları yöntemlerin kullanımını artırmıştır.
Mühendislik uygulamalarındaki akışların neredeyse tamamı karmaşık geometrilerde gerçekleşmektedir ve geliştirilen programların bu geometrilerde de verimli çalışması gerekmektedir. Korunum denklemlerinin çözümünden önce benzer şekilde çözüm ağının da karmaşık geometrilere uygun şekilde oluşturulması gerekmektedir. Çözüm ağının oluşturulması için çeşitli yöntemler literatürde bulunabilir. Fakat bu çözüm yöntemleri uygulanırken geometri kesiti değiştirildiği taktirde program içerisinde geometriye göre değişiklikler yapmak gerekebilir. Bu sebeple bu tez kapsamında geometri kesiti ile geometriye bağlı ağ üreten bir alt program geliştirilmiştir. Böylece geometri değişiklikleri için sadece geometri kesitinin verilmesi yeterli olacaktır. Bu alt programda eliptik ağ üretimi yöntemi kullanılmıştır.
Karmaşık geometriye uygun olarak korunum denklemlerinin çözümü için birçok yöntem literatürde bulunabilir. Fakat bu yöntemler içerisinde sonlu hacimler yöntemi bu tez kapsamında kullanılmıştır. Bunun için öncelikle korunum denklemleri eğrisel koordinat sistemine dönüştürülmüştür ve koordinat sisteminden bağımsız çözüm üretecek hale getirilmiştir. Böylece korunum denklemleri kartezyen, silindirik ya da polar koordinat sistemleri yerine geometriye bağlı bir koordinat sisteminde çözülmüştür. Korunum denklemlerinin bu dönüşümü neticesinde karmaşık geometrilerde çözüm mümkün hale gelmiştir. Sonuç olarak bu dönüşümlerle beraber sadece kesit alanı verilen bir geometri içerisinde korunum denklemleri çözülmüştür. 
Tez kapsamında geliştirilen program literatürde verilen çeşitli geometrilerde test edilmiş ve sonuçlar kıyaslanmıştır. Bu program sıkışmaz akış koşullarında korunum denklemlerini karmaşık geometri içinde çözmek için kullanıldığı gibi benzer şekilde karmaşık geometrilerde doğal ve zorlamalı taşınım için kullanılmıştır. Elde edilen sonuçlar ile literatürdeki sonuçların uyum içerisinde olduğu görülmüştür.
Sonuç olarak sunulan tez için sıkıştırılamaz akış koşullarında, geometriden bağımsız çalışan bir program geliştirilmiştir. Program kullanıcıdan sadece uygulama geometrisini ve akış sınır koşullarını istemektedir; böylece kullanım kolaylığı hedeflenmiştir.

Abstract:
With the enhancements of the computational methods for fluid dynamics computer simulations took place of the experiments during the design process. Those enhancements and the developments of the computer hardware provides accurate results for the flow area. Since it is cheaper and faster compared to experiments usage of flow simulations is preferred both in the industry and academy.
Most of the flows in nature occur over or inside the complex geometries. That is why it is important to generate a programme which is applicable to complex geometries rather than a programme which can only applicable to straight geometries. Also, the method to generate nodes to solve governing equations must automatically work on any geometry as far as ease of application is concerned. Even though a lot of methods to generate mesh over a geometry can be found in the literature, the elliptical grid generation method is preferred. This method uses only the cross-section of the geometry to generate the mesh and the node number both in x and y directions as input. Because these are the only input to generate mesh over any geometry automatically and the algorithm works fast this method is used in this thesis.
After mesh generation, selection of the method to discretize the governing equations must be done. There are two options in the literature to solve governing equations in the literature, one is the finite element method and the other is the finite volume method. Finite element method can be used over complex geometries and it can be work on both triangular and rectangular meshes. In order to use this method, after mesh generation element connectivity matrix must be generated, yet to use finite volume method does not require to generate this extra matrix to solve the governing equations. Also, the finite volume method is more advantageous to use in high-velocity flows and provides more accurate results when used. That is why in this thesis, the finite volume method is used. After that, the grid arrangement or in other words where to locate vectors and where to locate scalars must be determined. Although staggered grid arrangement provides non-oscillating pressure field without any need of interpolation it is not feasible to use as far as coding efficiency is concerned. That is why non- staggered grid arrangement is preferred in this thesis and to prevent pressure oscillations linear interpolation is applied to find vector quantities at the cell surfaces. Choosing this grid arrangement both scalars and vectors stored at the same locations instead of storing scalars at the cell centres and vectors at the cell faces.
Governing equations to be solved can be solved in their conventional forms over the geometry or they can be translated to curvilinear coordinates. There are a variety of papers in the literature that uses cartesian coordinate forms of the governing equations. However, usage of curvilinear coordinates directly calculates flow rates over the cell faces without any vector transformation. That is why in this thesis curvilinear transformations applied on the governing equations. In the transformed forms of the momentum equations, covariant velocities are selected as main variables since covariant velocities are perpendicular to the cell faces.
Governing equations that are to be solved over the domain transferred to the curvilinear coordinate system. This coordinate system is basically a coordinate system that follows the geometry and changes direction in accordance with the mesh that was generated. To open this matter, this coordinate system does not have a constant direction and that has different directions for different nodes. Transformation to the body-fitted coordinate system means also that equations will be solved in a physical plane that in which the fluid flows changes to a calculation plane. In the calculation plane, nodes are evenly distributed and the mesh is structured as it is in the physical plane.
Transformation of every term in the governing equation also transforms their form to weak form. Weak form means that the coordinate system does not have a constant direction and additional source terms arise due to that issue. To solve that problem of additional source terms arises due to the non-orthogonality of the body-fitted coordinate system and obtain the strong form of the equations an approach from one of the references applied during this thesis. This approach considers the coordinate system as if it does not change direction and freezes all the coordinate system at the point of calculation. At the point of calculation, all the covariant velocities that are used in the equations projected in the direction of velocities. As a result, at the point of calculation, all the velocities have the same direction and strong form of the equation is obtained. The additional source terms arise due to non-orthogonality of the coordinate system are also obtained with these projected velocities explicitly. Original velocities deviated from the frozen direction of the calculation point as a number of their original values and projected values. Thus it is said that this deviation is a result of curvilinearity and this term is additional source term.
Considering the matters discussed above a computer programme is generated using FORTRAN that generates mesh and solves governing equations using the cross-section of the geometry. The programme was used to solve momentum, energy and continuity equations for the fluid flow problem inside several channels and natural convection problems with the SIMPLER algorithm to couple pressure and velocity. For channel flows, the code first tested in a straight channel using cartesian coordinates and velocity profile at the outlet compared with the analytical solution. This proves that the method used in this thesis is applicable to any coordinate system. The velocity profile obtained is fitted to the analytical solution. After that, two complex geometries used for incompressible channel flow. First, a gradually expanding channel used to obtain a solution for Reynolds numbers of 10 and 100. Pressure on the channel wall for this problem is obtained by linear interpolation and this pressure values on the wall drawn to compare the solutions with the literature. Both of the pressure values are well suited with the literature for Reynolds numbers of 10 and 100. After that expanding and narrowing channel that can found in the literature used to test the generated code. For that problem, streamlines depicted and separation and reattachment points are compared with the literature. The programme can sense separation greatly with the comparison to the experimental study but reattachment point cannot be found that well. This can be because mesh generation is made without any stretching on the wall and grid size kept constant inside the solution space. Also, in order to improve sensing reattachment point, a turbulent model can be used. After validating the momentum solutions using channel flows in the literature, energy solutions are desired to be validated. In order to do that, the algorithm is used for natural convection problems in a square cavity and linearly expending cavity. Both of the problems are solved dimensionless and both of the cavities have one hot wall and one cold wall. Also, the upper and lower walls of those cavities are given adiabatic. For both problems, isotherms and velocity vectors are calculated for different Rayleigh numbers, from 100 to 100000, and results depicted. For the square cavity, local Nusselt numbers and mean Nusselt numbers are compared with literature. After this comparison, the algorithm is validated and results for linearly expanding cavity presented.  
To conclude, a FORTRAN programme generated to solve governing equations in complex geometries and this programme tested for several cases. Using the body-fitted coordinate system provides flexibility for selection of geometry since the presented algorithm requires only the function of cross-section. Programme generated requires only boundary conditions for fluid flow, and cross-section of the geometry. As a result, the presented programme provides accurate solutions of governing equations of mass, momentum and energy for any geometry given. This provides an opportunity to users to obtain solutions in complex geometries.