Research & NTHU

Simulation of Thermal Flows in ANSYS Fluent

In this tutorial, I will explore the case of a pipe (or a channel) further adding in the temperature boundary conditions. The concept of hydrodynamic and thermal boundary layers would be described in this tutorial using an example from the book of Cengel – Heat and Mass Transfer. I will also teach you how you can plot any variable such as velocity or temperature across any cross-section. This tutorial shall serve as a beginner level introductory lesson for a student.

Part 1:

Part 2:

(Read this post on MultiEMOtions Android App)

Research & NTHU

First open book exam experience: Post-exam

Well, luckily I had gone through some of the past exam papers(which I guess were closed book because of their simplicity) and there were some questions today which were modified from their past counter parts to include some difficulty, a lot of difficulty actually. For instance, we were asked to derive the difficult cases while we were taught the simpler ones.

During the exam, I tried to strike every question conceptually as correct as possible so that my process would be right at least. There is this thing in such exams: you have books, but what you need more than books is your brains. Result is pending and I expect that my first encounter was not so bad. I at least hope for passing marks LOL.

Research & NTHU

First open book exam experience: Pre-exam

I have been studying from almost 18 years now. I do not clearly remember about my early childhood but after my grade 3, I am pretty sure about how things went in my academic life. “Consulting” a book or a piece of paper during exam was termed as cheating (LOL), it still does if your books contain the questions and their answers directly. After coming to Taiwan, I have experienced “open one A4 sheet” exam in my previous semester where we were allowed to carry one A4 sheet with us and apparently, we wanted to write all 300 pages of our book on that single sheet. What a pity!

This semester, today is gonna be my first open book exam. I am excited about it, no place for nervousness because I am prepared for it. I have practiced the theory, derivations and some numerical. One thing I am assuming about this exam is that it is gonna be conceptual and fundamental. Why? Because it is open book. Teacher is gonna make the question paper keeping this in mind. I have always loved knowing and relying on my concepts rather than mugging up the creepy formulas to save time.

I am writing this blog post right now while my exam will start in some two hours. Because I think I am all prepared (over confidence?). Be it or a good or bad one, I know that I am gonna give my everything DURING exam, that is what really matters for me. Let’s see how it goes! Wooo-hoo!

Research & NTHU

Moving towards Adaptive mesh refinement

In CFD, mesh plays a critical part in solving any problem. If I talk about the type of meshes, it could be many depending on the way you see it. Meshes can be uniform or non-uniform, structured or unstructured, rectangular or polyhedral etc. Be it any kind of mesh, its density is also very significant. By density, I mean the mesh size. How many grid points you are using to cover your physical domain? In problems where solution is smooth, comparatively fewer grid points could work well but in the areas where solution changes rapidly, such as shocks, turbulence, boundaries etc., a coarser grid can not capture it very nicely.  You need fine grids in such areas.

After solving unsteady flows using artificial compressibility method I am shifting my attention towards adaptive mesh refinement (AMR). Why? Because the moment I read the first paper by Marsha Berger about it, I felt positive and excited about it. The idea appeared very cool and very motivating to me. In AMR, we adaptively place fine meshes in the areas where finer meshes are required and coarser meshes in their required places. From adaptive, I mean that the mesh could change throughout the domain with time. This technique could save computational costs as compared to the case in which you are forced to use finer mesh in all the domain.

At this time, I have understood a little part of it. I am trying to get to know it better and write my codes. Below is my presentation from this week, you could get an idea about what I have understood so far.

AMR

Research & NTHU

Unsteady artificial compressibility method

In some past post, I have talked about how we can use artificial compressibility method to solve Navier Stokes equations for steady, incompressible and viscous flow. After completing this task, I am moving on to solve unsteady cases. There is just a slight modification for that. It is not so difficult however not so easy as well.

The method that I am using considers two time steps: pseudo and physical (real). For every real time step, iterations (rather subiterations) are done in pseudo time steps till the local steady solution is achieved. It is better described pictorially in the presentation that I have attached for reference. Because of using C, it is easier for me to use explicit methods because handling matrix in C is difficult. I am still on the go right now as I am waiting for the results.

Unsteady Artificial Compressibility Method

Research & NTHU

Artificial compressibility method for the simulation of fluid flow

Flow is all around as well as inside us. Air, water, blood, these are the most common types of fluid we can witness easily. But how are they governed? What makes them flow the way they do? Motion of rigid bodies can be governed by the laws of motion but how are they applied to something like a fluid? The answer lies in the fundamental process of flow. Whenever a flow happens, mass and momentum are conserved. WHY? If you have one glass of water, then you can always drink a maximum of one glass of water, not more or less than that. Similar goes with the momentum according to what Newton had said. No external force acting implies no change in momentum.

So what do I get after all this conservation thing? From conservation of mass, I got what is called as continuity equation. And from momentum conservation, I get Navier-stokes equations. Let’s consider water for further considerations. Water is more or less incompressible. In incompressible case, these equations tend to be a little dramatic. HOW? Before that, we need to know that the parameters of our interest are pressure and the components of velocity. So, in a three dimensional case, we have four unknowns: pressure and three velocities. On the other hand, we have four equations: one for continuity and three for Navier-stokes equation. Then where lies the problem? A little trouble happens because pressure does not appear in the continuity equation for incompressible fluids. We have four equations and four unknowns but one unknown does not appear in an equation at all. That is why incompressible case is considered to be difficult than the compressible flow case where we don’t face such problem.

Artificial compressibility method was developed in 1967 by A.J. Chorin. He tweaked the continuity equation to include pressure such that in the steady case, this equation does not get affected by pressure while till then, pressure can play it’s part. THAT SIMPLE! This method is a beauty of science and mathematics as this looks mathematically beautiful and physically easy to grasp. I have recently used this method to solve the case of a lid-driven cavity flow and this is my code.