SVG-Viewer needed.

SVG-Viewer needed.

SVG-Viewer needed.

Overview

The TransAT Tutorial Manual is a self-sufficient document that provides step-by-step instructions on how to setup, execute and visualize results for a fluid flow simulation using TransAT.

The examples included with the TransAT distribution can be found in the Contents. The tutorials are chosen in a manner that they illustrate not only the range of functionalities in TransAT, but also the breadth of its applications.

Tutorial Manual


Contents

1 Starting with TransAT
 1.1 Turbulent Channel Flow
  1.1.1 Prerequisites
  1.1.2 Problem Description
  1.1.3 Problem Setup
  1.1.4 Launching TransATUI
  1.1.5 Opening TransAT window
  1.1.6 Mesh & BCs Tab
  1.1.7 Input Tab
  1.1.8 Execute Tab
   1.1.8.1 Starting the simulation
  1.1.9 Viewing Results in Paraview
   1.1.9.1 Plotting Velocity Vectors
  1.1.10 Results
 1.2 Flow over a Backward Facing Step
  1.2.1 Prerequisites
  1.2.2 Introduction
  1.2.3 Launch TransATUI
  1.2.4 Opening TransAT window
  1.2.5 Mesh & BCs Tab
  1.2.6 Input Tab
  1.2.7 Execute Tab
   1.2.7.1 Starting the simulation
  1.2.8 Visualization of the results
  1.2.9 Results
 1.3 Flow over a Cylinder (Re=20)
  1.3.1 Prerequisites
  1.3.2 Introduction
  1.3.3 Launch TransATUI
  1.3.4 Opening TransAT window
  1.3.5 Geo Tab
  1.3.6 Mesh & BCs Tab
  1.3.7 Input Tab
  1.3.8 Execute Tab
   1.3.8.1 Starting the simulation
  1.3.9 Visualisation of the results
  1.3.10 Results
2 Incompressible Single Phase Flows
 2.1 Block Mesh Refinement: Flow over Cylinder (Re=150)
  2.1.1 Prerequisites
  2.1.2 Introduction
  2.1.3 Creating a template project
   2.1.3.1 Launch TransATUI
  2.1.4 Opening TransAT window
  2.1.5 Geo Tab
   2.1.5.1 Mesh & BCs Tab
   2.1.5.2 Input Tab
   2.1.5.3 Saving the project
  2.1.6 Cylinder flow using a body fitted grid
   2.1.6.1 Creating the project
   2.1.6.2 Mesh & BCs Tab
   2.1.6.3 Execute Tab
   2.1.6.4 Visualisation of the results
  2.1.7 Cylinder flow using a Block Mesh Refinement (BMR) grid with Immersed Surface Technique (IST)
   2.1.7.1 Creating TransAT project
   2.1.7.2 Mesh & BCs Tab
   2.1.7.3 Execute Tab
   2.1.7.4 Starting the simulation
   2.1.7.5 Visualisation of the results
  2.1.8 Results
 2.2 Flow over Buildings
  2.2.1 Prerequisites
  2.2.2 Problem
  2.2.3 Launching TransATUI
  2.2.4 Opening TransAT window
   2.2.4.1 Geo Tab
   2.2.4.2 Mesh & BCs Tab
   2.2.4.3 Input Tab
   2.2.4.4 Execute
   2.2.4.5 Running TransAT
  2.2.5 Visualisation of the results
 2.3 Flow in an obstructed pipe
  2.3.1 Prerequisites
  2.3.2 Problem Description
  2.3.3 Problem Setup
  2.3.4 Launch TransATUI
  2.3.5 Opening TransAT window
  2.3.6 Geo Tab
  2.3.7 Mesh & BCs Tab
  2.3.8 Input Tab
  2.3.9 Execute Tab
   2.3.9.1 Starting the simulation
  2.3.10 Viewing Results in Paraview
  2.3.11 Results
3 Heat Transfer
 3.1 Forced Convection in a Channel with Heated Walls
  3.1.1 Prerequisites
  3.1.2 Introduction
  3.1.3 Launching TransATUI
  3.1.4 Opening TransAT window
  3.1.5 Mesh & BCs Tab
  3.1.6 Input Tab
  3.1.7 Execute Tab
   3.1.7.1 Starting the Simulation
  3.1.8 Visualization of the results
 3.2 Natural Convection in a Closed Cavity
  3.2.1 Prerequisites
  3.2.2 Introduction
  3.2.3 Launch TransATUI
  3.2.4 Opening TransAT window
  3.2.5 Mesh & BCs Tab
  3.2.6 Input Tab
  3.2.7 Execute Tab
   3.2.7.1 Starting the simulation
  3.2.8 Visualization of the results
 3.3 Turbulent Heat Flux Modelling
  3.3.1 Prerequisites
  3.3.2 Introduction
  3.3.3 Launch TransATUI
  3.3.4 Opening TransAT window
  3.3.5 Mesh & BCs Tab
  3.3.6 Input Tab
  3.3.7 Execute Tab
  3.3.8 Visualization of the results
4 Multiphase Flows
 4.1 Dam Break
  4.1.1 Prerequisites
  4.1.2 Launching TransATUI
  4.1.3 Opening TransAT window
  4.1.4 Mesh & BCs Tab
   4.1.4.1 Domain & Grid tab
   4.1.4.2 Blocks
   4.1.4.3 BCs Tab
  4.1.5 Input Tab
   4.1.5.1 Physical Models Tab
   4.1.5.2 Phase Properties Tab
   4.1.5.3 Simulation Type and Control Parameters
   4.1.5.4 Equations
   4.1.5.5 Initial Conditions
   4.1.5.6 Output Management Tab
  4.1.6 Execute Tab
   4.1.6.1 Running TransAT
  4.1.7 Visualisation of the results
   4.1.7.1 Result files
   4.1.7.2 Viewing Results in Paraview
 4.2 Sloshing
  4.2.1 Prerequisites
  4.2.2 Launching TransATUI
  4.2.3 Opening TransAT window
  4.2.4 Mesh & BCs Tab
   4.2.4.1 Domain & Grid
   4.2.4.2 Blocks
   4.2.4.3 BCs Tab
  4.2.5 Input Tab
   4.2.5.1 Physical Models Tab
   4.2.5.2 Phase Properties Tab
   4.2.5.3 Simulation Parameters Tab
   4.2.5.4 Equations Section
   4.2.5.5 Initial Conditions
   4.2.5.6 Output Management Tab
  4.2.6 Execute Tab
   4.2.6.1 Running TransAT
  4.2.7 Visualisation of the results
   4.2.7.1 Result files
   4.2.7.2 Viewing Results in Paraview
 4.3 Bubbles Merging
  4.3.1 Prerequisites
  4.3.2 Introduction
  4.3.3 Launching TransATUI
  4.3.4 Opening TransAT window
  4.3.5 Mesh & BCs Tab
  4.3.6 Input Tab
  4.3.7 Execute Tab
  4.3.8 Visualisation of the results
  4.3.9 Results
 4.4 Film Boiling
  4.4.1 Prerequisites
  4.4.2 Introduction
  4.4.3 Launching TransATUI
  4.4.4 Opening TransAT window
  4.4.5 Mesh & BCs Tab
  4.4.6 Input Tab
  4.4.7 Execute Tab
  4.4.8 Visualisation of the results
  4.4.9 Results
 4.5 Spillway
  4.5.1 Prerequisites
  4.5.2 Run time
  4.5.3 Introduction
  4.5.4 Launching TransATUI
  4.5.5 Opening TransAT window
  4.5.6 Geo
  4.5.7 Mesh & BCs Tab
  4.5.8 Input Tab
  4.5.9 Execute Tab
  4.5.10 Visualization of the results
  4.5.11 Results
5 Particle Tracking
 5.1 Particles in Crossflow
  5.1.1 Prerequisites
  5.1.2 Launch TransATUI
  5.1.3 Opening TransAT window
  5.1.4 Mesh & BCs Tab
  5.1.5 Input Tab
  5.1.6 Execute Tab
   5.1.6.1 Starting the simulation
  5.1.7 Results
 5.2 Particle Separator
  5.2.1 Prerequisites
  5.2.2 Introduction
  5.2.3 Launching TransATUI
  5.2.4 Opening TransAT window
  5.2.5 Geo Tab
  5.2.6 Mesh & BCs Tab
  5.2.7 Input Tab
  5.2.8 Execute Tab
  5.2.9 Visualization of the results
 5.3 Transport of particles in a pipe
  5.3.1 Prerequisites
  5.3.2 Problem Description
  5.3.3 Problem Setup
  5.3.4 Launching TransATUI
  5.3.5 Opening TransAT window
  5.3.6 Geo Tab
  5.3.7 Mesh & BCs Tab
  5.3.8 Input Tab
  5.3.9 Execute Tab
   5.3.9.1 Starting the simulation
  5.3.10 Viewing Results in Paraview
  5.3.11 Results
6 Thermal-Hydraulics Applications
 6.1 Wall Boiling
  6.1.1 Prerequisites
  6.1.2 Introduction
  6.1.3 Launching TransATUI
  6.1.4 Opening TransAT window
  6.1.5 Mesh & BCs Tab
  6.1.6 Input Tab
  6.1.7 Execute Tab
   6.1.7.1 Starting the simulation
  6.1.8 Visualization of the results
  6.1.9 Results
 6.2 Counter current flow in a pipe
  6.2.1 Prerequisites
  6.2.2 Introduction
  6.2.3 Launching TransATUI
  6.2.4 Opening TransAT window
  6.2.5 Geo Tab
  6.2.6 Mesh & BCs Tab
  6.2.7 Input Tab
  6.2.8 Execute Tab
  6.2.9 Visualization of the results
  6.2.10 Results
7 Oil and Gas Applications
 7.1 Separation of oil, gas and water
  7.1.1 Prerequisites
  7.1.2 Introduction
  7.1.3 Launching TransATUI
  7.1.4 Opening TransAT window
  7.1.5 Geo Tab
  7.1.6 Mesh & BCs Tab
  7.1.7 Input Tab
  7.1.8 Execute Tab
  7.1.9 Visualization of the results
  7.1.10 Results
 7.2 Two-phase slug flow in TransAT–OLGA coupled simulation
  7.2.1 Prerequisites
  7.2.2 Introduction
  7.2.3 Creating a Project Folder
  7.2.4 Launching TransATUI
  7.2.5 Opening TransAT window
  7.2.6 Geo
  7.2.7 Mesh & BCs Tab
  7.2.8 Input Tab
  7.2.9 OLGA model setup
  7.2.10 Run OLGA simulation
  7.2.11 Execute Tab
  7.2.12 Visualization of the results
  7.2.13 Results
 7.3 Oil spill
  7.3.1 Prerequisites
  7.3.2 Introduction
  7.3.3 Launching TransATUI
  7.3.4 Opening TransAT window
  7.3.5 Geo
  7.3.6 Mesh & BCs Tab
  7.3.7 Input Tab
  7.3.8 Execute Tab
  7.3.9 Visualization of the results
  7.3.10 Results
8 Rigid Body Motion
 8.1 Flow around a train entering a tunnel
  8.1.1 Prerequisites
  8.1.2 Introduction
  8.1.3 Launch TransATUI
  8.1.4 Opening TransAT window
  8.1.5 Geo Tab
  8.1.6 Mesh & BCs Tab
  8.1.7 Input Tab
  8.1.8 Execute Tab
   8.1.8.1 Starting the simulation
  8.1.9 Visualisation of the results
  8.1.10 Results
9 Advanced Post-processing
 9.1 Water suction
  9.1.1 Prerequisites
  9.1.2 Introduction
  9.1.3 Launching TransATUI
  9.1.4 Opening TransAT window
  9.1.5 Mesh & BCs Tab
  9.1.6 Input Tab
  9.1.7 Execute Tab
  9.1.8 Visualization of the results
 9.2 Forced Convection in an Isothermal Pipe
  9.2.1 Prerequisites
  9.2.2 Introduction
  9.2.3 Launch TransATUI
  9.2.4 Opening TransAT window
  9.2.5 Mesh & BCs Tab
  9.2.6 Input Tab
  9.2.7 Execute Tab
  9.2.8 Visualization of the results
10 TransAT Convergence Control module: SarP
 10.1 Flow past a backward facing step
  10.1.1 Prerequisites
  10.1.2 Introduction
  10.1.3 Launching TransATUI
  10.1.4 Opening TransAT window
  10.1.5 Geo Tab
  10.1.6 Mesh & BCs Tab
  10.1.7 Input Tab
   10.1.7.1 Saving the project
  10.1.8 Simulation in normal mode
   10.1.8.1 Creating the project
   10.1.8.2 Running the simulation
  10.1.9 Simulation in SarP stability mode
   10.1.9.1 Creating the project
   10.1.9.2 Running the simulation
  10.1.10 Visualization of the results
 10.2 Natural Convection in a Square Cavity at Ra = 106
  10.2.1 Prerequisites
  10.2.2 Introduction
  10.2.3 Launching TransATUI
  10.2.4 Opening TransAT window
  10.2.5 Mesh & BCs Tab
  10.2.6 Input Tab
   10.2.6.1 Saving the project
  10.2.7 Simulation in normal mode
   10.2.7.1 Creating the project
   10.2.7.2 Running the simulation
  10.2.8 Simulation in SarP optimisation mode
   10.2.8.1 Creating the project
   10.2.8.2 Running the simulation
  10.2.9 Visualization of the results
 10.3 Droplet Impact on a Flat Plate
  10.3.1 Prerequisites
  10.3.2 Introduction
  10.3.3 Launching TransATUI
  10.3.4 Opening TransAT window
  10.3.5 Mesh & BCs Tab
  10.3.6 Input Tab
  10.3.7 Simulation in normal mode
   10.3.7.1 Creating the project
   10.3.7.2 Running the simulation
  10.3.8 Simulation in SarP optimisation mode
   10.3.8.1 Creating the project
   10.3.8.2 Running the simulation
  10.3.9 Visualization of the results
List of Figures
References

Chapter 1
Starting with TransAT

1.1 Turbulent Channel Flow

1.1.1 Prerequisites

1.1.2 Problem Description

Single-phase flow with heat transfer through a channel is studied. The walls of the channel are kept at a constant temperature of 320 K. Air flows in through an inlet at a velocity of 3 m∕s and an initial temperature of 300 K. The aim is to get a steady-state solution of the temperature profile in the channel. Since the flow is in the turbulent regime, k-ϵ turbulence model is used.

1.1.3 Problem Setup

The problem is setup in 2D.

1.1.4 Launching TransATUI

> transatui.py &

1.1.5 Opening TransAT window

The first step in creating a new TransAT project is naming said project and giving it a location.

After clicking PIC, the Mesh & BCs tab will be opened.

The Geo, Mesh & BCs, Input and Execute tabs at the top of the TransATUI window can now be selected to open the modules to set up a simulation with TransAT.

Geo is a module that can be used to create simple geometries for TransAT. The grid properties are defined in Mesh & BCs tab whilst the physical and numerical parameters of the simulation are defined in the Input tab. When the simulation is ready, the simulation will be started from the Execute tab.

Some general operations such as saving and loading projects or exiting TransAT can be done by clicking Files then selecting the corresponding option.

1.1.6 Mesh & BCs Tab

The computational domain is defined and the mesh is created in the Mesh & BCs tab.

Domain & Grid Tab
  In this section the domain and the computational grid for the simulation will be defined.

Ratios are set to 1.0 to create a uniform mesh.

Note that Nx, Ny, Nz are the number of corner points in the x, y and z directions. The actual number of cells in each direction is the number of corner points in the corresponding direction minus one.

Also note that TransAT is a three-dimensional solver. As a result, at least 1 cell (i.e. 2 nodes) is required in the third dimension, even for two-dimensional or axisymmetrical problems.
Blocks
  The domain must now be decomposed into several blocks so that the simulation can run on several processors. Indeed, each block is allocated to one processor (but a processor can handle several blocks).

The domain is automatically cut into blocks of equivalent sizes. BCs Tab
  The BCs tab allows the user to assign boundary conditions for each of the surfaces present in the domain. A list of the surfaces present in the domain can be seen by selecting All surfaces in the drop-down menu. The appropriate setup for this simulation requires 4 boundary conditions in total.

Now conditions for each of the boundaries should be set.

To assign the Inflow boundary condition to the XMIN 0 surface

The final setup should be similar to Figure 1.1


PIC

Figure 1.1: Boundaries Final Setup


1.1.7 Input Tab

To set up the simulation parameters

Physical Models Tab
  In this tab, the models that will be used during the simulation will be defined.


PIC

Figure 1.2: Physical models


Phase Properties Tab
  To set the fluid properties, Simulation Parameters Tab
  This tab is used to define the numerical properties of the simulation.   Simulation Type and Control Parameters
  The simulation will be run till the flow reaches steady state.   Equations
  In this section the convergence threshold is defined as well as the convection scheme and the solvers used by TransAT. These parameters can be set for each equation individually.


PIC

Figure 1.3: Simulation parameters


Initial Conditions
  In this tab simple initial conditions can be set. In this case, initial values for all the relevant quantities will be set to 0 except the velocity component in the x-direction. Output Management Tab
  In this tab the parameters of the outputs of the simulation are defined.

1.1.8 Execute Tab

This tab is where the simulation is started and controlled.

1.1.8.1 Starting the simulation

1.1.9 Viewing Results in Paraview

The results of the simulation can be seen with the help of the Open-Source Visualisation Tool, ParaView.

> paraview &


PIC

Figure 1.4: Variable Selection Drop-Down Box and the Play button


1.1.9.1 Plotting Velocity Vectors

To create velocity vectors in Paraview, an object is needed to calculate the 2D velocity vector, and a plotting device to display the vector. To this end, the Calculator and the 2D Glyph tools are used.


PIC

Figure 1.5: Calculator Object in Paraview


To get a rough idea about visualisation of TransAT results with ParaView, please refer to the TransAT Paraview Tutorial .

More detailed information can also be found in the Paraview Tutorial on the ParaView website.

1.1.10 Results

Figure 1.6 shows the temperature contours of the converged solution


PIC

Figure 1.6: Temperature contours: channel flow


1.2 Flow over a Backward Facing Step

1.2.1 Prerequisites

1.2.2 Introduction

Single-phase flow over a backward facing step is simulated. The formation of the vortices when flowing over an obstacle is of particular interest. The flow conditions are chosen so that the flow is laminar. The problem is three-dimensional to capture the vortices. The following tutorial also shows how to decompose a computational domain and modify the blocks in TransAT. The setup of the case is as follows:

1.2.3 Launch TransATUI

> transatui.py

1.2.4 Opening TransAT window

The first step in creating a new TransAT project is naming said project and giving it a location.

After clicking PIC, the Mesh & BCs tab will be opened.

The Geo, Mesh & BCs, Input and Execute tabs at the top of the TransATUI window can now be selected to open the modules to set up a simulation with TransAT.

Geo is a module that can be used to create simple geometries for TransAT. The grid properties are defined in Mesh & BCs tab whilst the physical and numerical parameters of the simulation are defined in the Input tab. When the simulation is ready, the simulation will be started from the Execute tab.

Some general operations such as saving and loading projects or exiting TransAT can be done by clicking Files then selecting the corresponding option.

1.2.5 Mesh & BCs Tab

The domain is defined and the mesh is created in the Mesh & BCs tab.

Domain & Grid Tab
  In this section the domain and the computational grid for the simulation will be defined.

Note that Nx, Ny, Nz are the number of corner points in the x, y and z directions. The actual number of cells in each direction is the number of corner points in the corresponding direction minus one. Blocks 

To create a step, the domain has to be split into 4 blocks which can be adjusted to a required dimension.

A block can be selected with the Select Block field by choosing the appropriate block number.

After the deletion operation, the numbering of the blocks will be automatically re-adjusted.

Now the dimensions of the three remaining blocks will be modified in the x-direction. To do so

BCs Tab 

To see the surfaces of all or each of the boundaries, choose a boundary in the drop-down list at the top of the BCs tab. One boundary condition of each type is available to be edited and used from the start. Additional BCs can be created by clicking on PIC. PIC is used to assign a selected BC to a highlighted surface.

Creating Boundary Conditions:
In this case, an inflow is at X min, an outflow at X max, walls are at Y min and Y max, and symmetry boundary conditions at Z min and Z max. Follow the step-by-step a instructions given below to create an inflow boundary condition and to define its properties.

Assigning Boundary Conditions:

After completion of the assignment, the XMin 0 surface will be highlighted in both the the surface tree and the graphical viewer with the corresponding color in the boundary condition table (see the column to the right of the Type column).

Since undefined boundaries are by default set to symmetry, boundary conditions for the ZMin and ZMax boundaries do not have to be defined.

The mesh is now ready.

1.2.6 Input Tab

To set up the simulation parameters,

Physical Models
  In this tab, the equations that will be solved for during the simulation are chosen. Phase Properties 

Since the Multiphase Flow Modelling is turned off, only the Phase 1 fluid properties need to be set up.

Simulation Parameters
  This tab is used to define the numerical properties of the simulation.
Simulation Type: Steady 
Number of Iterations: 800 
 
ENABLE Autorelaxation 
           Relaxation Factor: 0.90

In this example, the value of the Relaxation Factor has been increased compared to the default value of 0.6 in order to increase the speed of convergence of the simulation.

Note that increasing the Relaxation Factor is not a foolproof method to accelerate the convergence of a simulation. Indeed, a simulation may become unstable with high values of the Relaxation Factor. In such a simulation, it might be required to decrease the Relaxation Factor to stabilise it. Equations
  In this section the convergence threshold is defined, as well as the convection scheme and other parameters of the solvers used by TransAT.

Initial Conditions
  In this tab simple initial conditions can be set. In this case, initial values for all the relevant quantities will be set to 0 except the velocity component in the x-direction. Output Management
  The parameters of the simulation outputs are defined in the Output Management tab.

1.2.7 Execute Tab

This tab is where the simulation is started and controlled.

1.2.7.1 Starting the simulation
Running TransAT
  The number of processors on which the simulation will run can be modified by changing the field Number of Processors.

1.2.8 Visualization of the results

The results of the simulation can be seen with the help of the Open-Source Visualisation Tool, ParaView.

> paraview &


PIC

Figure 1.7: Variable Selection Drop-Down Box and the Play button


Plotting Velocity Vectors
  To create velocity vectors in ParaView, an object is needed to calculate the 2D velocity and a plotting device to display the vector. To this end, the Calculator and the Glyph tools are used.


PIC

Figure 1.8: Calculator Object in ParaView


To get a rough idea about visualisation of TransAT results with ParaView, please refer to the TransAT Paraview Tutorial .

More detailed information can also be found in the Paraview Tutorial on the ParaView website.

1.2.9 Results


PIC

Figure 1.9: Velocity vectors: backward facing step flow


1.3 Flow over a Cylinder (Re=20)

1.3.1 Prerequisites

1.3.2 Introduction

A single-phase flow over a cylinder is simulated here where the Reynolds number is Re = 20. The flow can be simulated using a steady simulation. This tutorial is beneficial to understand the basics of multiblock meshes

1.3.3 Launch TransATUI

> transatui.py &

1.3.4 Opening TransAT window

The first step in creating a new TransAT project is naming said project and giving it a location.

After clicking PIC, the Mesh & BCs tab will be opened.

The Geo, Mesh & BCs, Input and Execute tabs at the top of the TransATUI window can now be selected to open the modules to set up a simulation with TransAT.

Geo is a module that can be used to create simple geometries for TransAT. The grid properties are defined in Mesh & BCs tab whilst the physical and numerical parameters of the simulation are defined in the Input tab. When the simulation is ready, the simulation will be started from the Execute tab.

Some general operations such as saving and loading projects or exiting TransAT can be done by clicking Files then selecting the corresponding option.

1.3.5 Geo Tab

A cylinder is needed for the simulation. To create a cylinder

The cylinder needs to be rotated and translated.

You will need to update the mesh, as the cylinder will have moved out of its bounds. To do so

1.3.6 Mesh & BCs Tab

In the Mesh & BCs tab, the domain along with the mesh are defined.

Domain & Grid Tab
  In this section the domain and the computational grid for the simulation will be defined.

You can click PIC at the bottom of the graphical window to display the domain in the XY plane.

Note that Nx, Ny, Nz are the number of corner points in the x, y and z directions. The actual number of cells in each direction is the number of corner points in the corresponding direction minus one. Blocks
  The domain must now be decomposed into several blocks, so that the simulation can run in parallel (i.e. on several processors). Indeed, each block is allocated to one processor (but a processor can handle several blocks).

The domain is automatically split into blocks of equivalent sizes BCs Tab
  The boundary conditions will now be set. An inflow will be defined at the X min boundary, and an outflow at the X max boundary. Other boundaries will be defined as symmetry conditions.


PIC

Figure 1.10: Boundary conditions


1.3.7 Input Tab

To set up the simulation parameters,

The different tabs to define the parameters of the simulation can now be selected. Physical Models
 


PIC

Figure 1.11: Physical models


Phase Properties
  The Phase Properties tab is used to define the phases of the flow. Since the Multiphase Flow Method is turned off, only the fluid properties of Phase 1 need be defined. A custom phase can defined by directly entering the values for its properties.


PIC

Figure 1.12: Phase properties


Simulation Parameters
  This tab is used to define the numerical properties of the simulation.   Simulation Type and Control Parameters
 

A low relaxation factor gives a more stable simulation, while the simulation converges faster with a high value.   Equations
  In the Equations section the convergence threshold is defined as well as the convection scheme and the solvers used by TransAT for each equation.

There is no need to have a strict threshold for pressure because it must comply with the overall criterion to finish the simulation.


PIC

Figure 1.13: Simulation parameters


Initial Conditions
  In this tab simple initial conditions can be set. In this case, initial values for all the relevant quantities will be set to 0 except the velocity component in the x-direction.

Output Management
  The parameters for the outputs of the simulation are defined in the Output Management tab.

1.3.8 Execute Tab

This tab is where the simulation is started and controlled.

1.3.8.1 Starting the simulation
Running TransAT
 

1.3.9 Visualisation of the results

The results of the simulation can be seen with the help of the open-source visualisation tool, ParaView.
Launch ParaView as follows from the project folder using the terminal

> paraview &

To get a rough idea about visualisation of TransAT results with ParaView, please refer to the TransAT Paraview Tutorial .

More detailed information can also be found in the Paraview Tutorial on the ParaView website.

1.3.10 Results


PIC

Figure 1.14: Cylinder Flow: Streamlines


Chapter 2
Incompressible Single Phase Flows

2.1 Block Mesh Refinement: Flow over Cylinder (Re=150)

2.1.1 Prerequisites

2.1.2 Introduction

In this section a single-phase flow over a cylinder will be simulated. The flow around the object is studied and the time signal of the velocity at a monitoring point is the output.
The Reynolds number is Re = 150. Different grids are compared, using Block Mesh Refinement (BMR). This tutorial is beneficial in understanding the possibilities of BMR.

2.1.3 Creating a template project

A first project will be created, where everything but grid properties will be defined. In this way, several grid configurations can be used, using BMR or simple refinement.

2.1.3.1 Launch TransATUI
> transatui.py &

2.1.4 Opening TransAT window

The first step in creating a new TransAT project is naming said project and giving it a location.

After clicking PIC, the Mesh & BCs tab will be opened.

The Geo, Mesh & BCs, Input and Execute tabs at the top of the TransATUI window can now be selected to open the modules to set up a simulation with TransAT.

2.1.5 Geo Tab

A cylinder is needed for the simulation. To create a cylinder

The cylinder needs to be rotated and translated.

You will need to update the mesh, as the cylinder will have moved out of its bounds. To do so

2.1.5.1 Mesh & BCs Tab

In the Mesh & BCs tab, the domain along with the mesh are defined.

Domain & Grid 

The grid is not defined for now, as several grids will be tested further down in this tutorial. BCs Tab
  The boundary conditions must now be set for this case. An inflow will be defined on the X min boundary, and a outflow on the X max. Other boundaries will be defined as symmetry conditions.

The boundary conditions must now be assigned to the corresponding boundary surfaces. An inflow will be defined at the X min boundary, and an outflow will be defined at the X max. The remaining boundaries will be defined as symmetry conditions.

To proceed with the assignment of boundary conditions to surfaces,


PIC

Figure 2.1: Boundary conditions


2.1.5.2 Input Tab
Physical Models
  Phase Properties
  In the Phase Properties tab the phases of the flow are defined.


PIC

Figure 2.2: Phase Properties


Simulation Parameters
  The Simulation Parameters tab is used to define the numerical parameters of the simulation.

Equations
  In this section the convergence threshold is defined, as well as the convection scheme and the solvers to be used by TransAT. Initial Conditions
  In this tab simple initial conditions can be set. In this case, initial values for all the relevant quantities will be set to 0 except the velocity component in the x-direction. Output Management
  The parameters of the outputs of the simulation are defined in the Output Management tab.
2.1.5.3 Saving the project

The template for the simulations is now ready. To save it

2.1.6 Cylinder flow using a body fitted grid

2.1.6.1 Creating the project

Please note: It is important to save different projects in different folders, because results will always be stored in a sub-folder called RESULT. The template will be used for several grids.

The Execute tab is automatically opened.

2.1.6.2 Mesh & BCs Tab
Domain & Grid
 

Note that Nx is the number of corner points meaning that the actual number of cells is Nx - 1. Blocks
  The domain must now be decomposed into several blocks, so that the simulation can run in parallel (i.e. on several processors). Indeed, each block is allocated to one processor (but a processor can handle several blocks).

The domain is automatically split into blocks of equivalent sizes.

The total number of cells in the domain given in the mesh information panel is around 3300. BCs Tab
  The boundary settings applied in the template are not affected by modifying the grid.

2.1.6.3 Execute Tab

This tab is where the simulation is started and controlled. Running TransAT 

2.1.6.4 Visualisation of the results

The results of the simulation can be seen with the help of the open-source visualisation tool, ParaView.

> paraview &

To get more information about visualitsation of TransAT results with ParaView, please refer to the TransAT Paraview Tutorial .

2.1.7 Cylinder flow using a Block Mesh Refinement (BMR) grid with Immersed Surface Technique (IST)

2.1.7.1 Creating TransAT project

Please note: It is important to save different projects in different folders because results will always be stored in a subfolder called RESULT. The template will be used for several grids.

> transatui.py &
2.1.7.2 Mesh & BCs Tab
Domain & Grid 

Note that Nx, Ny, Nz are the number of corner points in the x, y and z directions. The actual number of cells in each direction is the number of corner points in the corresponding direction minus one.

Also note that we will create a BMR grid: the Grid Properties tab only defines the properties of the coarsest mesh. Blocks
  The Blocks tab will be used to create the block mesh refinement (BMR) and decompose the domain into several blocks, so that the simulation can run in parallel (i.e. on several processors). Indeed, each block is allocated to one processor (but a processor can handle several blocks).

With BMR, blocks with finer meshes are created to get a better resolution around areas of interest.

To create a block with a finer mesh around the object

Now blocks will be split so as to be able to use several processors.

The coarse mesh is automatically split into two blocks of equivalent sizes.

The fine mesh is automatically split into two blocks of equivalent sizes.

The total number of cells in the domain given in the mesh information panel is around 2100, which is one third less than the body fitted grid for a comparable mesh quality. BCs Tab
  The boundary settings applied in the template are not affected by modifying the grid.

2.1.7.3 Execute Tab

This tab is where the simulation is started and controlled.

2.1.7.4 Starting the simulation
Run TransAT
 
2.1.7.5 Visualisation of the results

The results of the simulation can be seen with the help of the open-source visualisation tool, ParaView.

> paraview &

To get a rough idea about visualisation of TransAT results with ParaView, please refer to the TransAT Paraview Tutorial .

More detailed information can also be found in the Paraview Tutorial on the ParaView website.

2.1.8 Results


PIC

Figure 2.3: Multiblock and BMR Cylinder Flow (Re=150): Pressure field and Velocity vectors


2.2 Flow over Buildings

2.2.1 Prerequisites

2.2.2 Problem

Turbulent flow over several buildings is simulated.

The following tutorial utilises the Immersed Surface Technology (IST) capability of TransAT, by which solid objects can be incorporated into the fluid flows. The CAD file of the buildings must be imported into the TransATUI, and finally meshed appropriately, before the solution can be executed.
This tutorial is beneficial to learn how to use the multiblock and IST capacities of TransAT.

2.2.3 Launching TransATUI

> transatui.py &

2.2.4 Opening TransAT window

The first step in creating a new TransAT project is naming said project and giving it a location.

After clicking PIC, the Mesh & BCs tab will be opened.

The Geo, Mesh & BCs, Input and Execute tabs at the top of the TransATUI window can now be selected to open the modules to set up a simulation with TransAT.

2.2.4.1 Geo Tab

In this tab, the necessary objects are added to the mesh.

Objects
  Load the geometry file already prepared and located in the TransAT Object Database.

The Buildings need to be positioned at suitable coordinates.

2.2.4.2 Mesh & BCs Tab

In the Mesh & BCs tab, the domain along with the mesh are defined.

Domain & Grid 


PIC

Figure 2.4: Domain with the buildings


Blocks 

The domain must now be decomposed into several blocks, so that the simulation can run in parallel (i.e. on several processors). Indeed, each block is allocated to one processor (but a processor can handle several blocks). Firstly we will add a son block in order to get more refined grid around the buildings.

To create a block with a finer mesh around the object

Now blocks will be split so as to be able to use several processors.

BCs Tab
  The boundary conditions must now be set for this case. An inflow will be defined on the X min boundary, and a outflow on the X max. The bottom surface will be defined as a wall. Other boundaries will be defined as symmetry conditions.

The boundary conditions will now be assigned to the boundaries:

The symmetry boundary condition will now be assigned to all the remaining boundaries.


PIC

Figure 2.5: Boundary conditions


2.2.4.3 Input Tab

To select the models and set up the simulation parameters

Physical Models 


PIC

Figure 2.6: Physical models


Phase Properties
  Since the Multiphase Flow Method is turned off, only the fluid properties of Phase 1 need be defined. Simulation Parameters
  This tab is used to define the numerical parameters of the simulation. Equations
  In the Equations section, the convergence threshold is defined, as well as the convection scheme and other parameters of the solvers used by TransAT.


PIC

Figure 2.7: Simulation Parameters


Initial Conditions
  In this tab simple initial conditions can be set. In this case, initial values for all the relevant quantities will be set to 0 except the velocity component in the x-direction. Output Management
  In the Output Management tab the parameters of the outputs of the simulation are defined.
2.2.4.4 Execute

This tab is where the simulation is started and controlled.

Set Number of Processors to 3.

2.2.4.5 Running TransAT

2.2.5 Visualisation of the results

> paraview &

To create velocity vectors or streamlines in ParaView, an object is needed to compute the three-dimensional velocity field along with a plotting device to display the vector. To this end, the Calculator and the Stream Tracer tools are used.


PIC
Figure 2.8: Selected streamlines over the buildings


To get a rough idea about visualisation of TransAT results with ParaView, please refer to the TransAT Paraview Tutorial .

More detailed information can also be found in the Paraview Tutorial on the ParaView website.

2.3 Flow in an obstructed pipe

2.3.1 Prerequisites

2.3.2 Problem Description

In this tutorial, the Immersed Surface Technology (IST) and Block Mesh Refinement (BMR) feature of TransAT are coupled to simulate a single-phase flow through a pipe in 3D. A disk is fixed at the center of the pipe at 0.2 meters downstream the inlet. Water flows in through an inlet at a velocity of 0.005 m∕s with a laminar profile. The aim is to get a unsteady solution of the velocity profile in the pipe.

2.3.3 Problem Setup

2.3.4 Launch TransATUI

> transatui.py &

2.3.5 Opening TransAT window

The first step in creating a new TransAT project is naming said project and giving it a location.

After clicking PIC, the Mesh & BCs tab will be opened.

The Geo, Mesh & BCs, Input and Execute tabs at the top of the TransATUI window can now be selected to open the modules to set up a simulation with TransAT.

Geo is a module that can be used to create simple geometries for TransAT. The grid properties are defined in Mesh & BCs tab whilst the physical and numerical parameters of the simulation are defined in the Input tab. When the simulation is ready, the simulation will be started from the Execute tab.

Some general operations such as saving and loading projects or exiting TransAT can be done by clicking Files then selecting the corresponding option.

2.3.6 Geo Tab

A pipe geometry and a disk (cylinder) are needed for the simulation.

To create the cylinder geometry:

2.3.7 Mesh & BCs Tab

The computational domain is defined and the mesh is created in the Mesh & BCs tab.

Domain & Grid Tab
  In this section the domain and the computational grid for the simulation will be defined.

Ratios are set to 1.0 to create a uniform mesh.

Note that Nx, Ny, Nz are the number of corner points in the x, y and z directions. The actual number of cells in each direction is the number of corner points in the corresponding direction minus one.

Blocks
  The Blocks tab will be used to create the block mesh refinement (BMR) and decompose the domain into several blocks, so that the simulation can run in parallel (i.e. on several processors). Indeed, each block is allocated to one processor (but a processor can handle several blocks).

With BMR, blocks with finer meshes are created to get a better resolution around areas of interest. In this case, refinement are defined in the vicinity of the internal disk of the pipe.

The domain is automatically cut into blocks of equivalent sizes.

To create a block with a finer mesh around the object

BCs Tab
  The BCs tab allows the user to assign boundary conditions for each of the surfaces present in the domain. A list of the surfaces present in the domain can be seen by selecting All surfaces in the drop-down menu. The appropriate setup for this simulation requires 2 boundary conditions in total.

Now conditions for each of the boundaries should be set.

To assign the Inflow boundary condition to the XMIN 0 surface

Symmetry conditions are applied on the remaining boundary surfaces. Since undefined boundaries are set to symmetry by default in TransAT, no extra operation is required to define the remaining boundary conditions. The final setup should be similar to Figure 2.9


PIC

Figure 2.9: Boundaries Final Setup


2.3.8 Input Tab

To set up the simulation parameters

Physical Models Tab
  In this tab, the models that will be used during the simulation will be defined.


PIC

Figure 2.10: Physical models


Phase Properties Tab
  To set the fluid properties, Simulation Parameters Tab
  This tab is used to define the numerical properties of the simulation.   Simulation Type and Control Parameters
  The simulation will be run unsteady because of the vortex shedding downstream the disk.   Equations
  In this section the convergence threshold is defined as well as the convection scheme and the solvers used by TransAT. These parameters can be set for each equation individually. Set the following parameters.


PIC

Figure 2.11: Simulation parameters


Initial Conditions
  In this tab simple initial conditions can be set. In this case, initial values for all the relevant quantities will be set to 0 except the velocity component in the x-direction. Output Management Tab
  In this tab the parameters of the outputs of the simulation are defined.

2.3.9 Execute Tab

This tab is where the simulation is started and controlled.

2.3.9.1 Starting the simulation

2.3.10 Viewing Results in Paraview

The results of the simulation can be seen with the help of the Open-Source Visualisation Tool, ParaView.

> paraview &
Plotting Velocity Vectors
  To create velocity vectors in ParaView, an object is needed to calculate the 2D velocity and a plotting device to display the vector. To this end, the Calculator and the Glyph tools are used.


PIC

Figure 2.12: Calculator Object in ParaView


To get a rough idea about visualisation of TransAT results with ParaView, please refer to the TransAT Paraview Tutorial .

More detailed information can also be found in the Paraview Tutorial on the ParaView website.

2.3.11 Results

Figure 2.13 shows the temperature contours of the solution


PIC

Figure 2.13: Velocity profile in the pipe


Chapter 3
Heat Transfer

3.1 Forced Convection in a Channel with Heated Walls

3.1.1 Prerequisites

3.1.2 Introduction

This TransAT tutorial provides a simple demonstration of the heat transfer that occurs when a fluid flows inside a channel which walls are heated.

3.1.3 Launching TransATUI

> transatui.py &

3.1.4 Opening TransAT window

The first step in creating a new TransAT project is naming said project and giving it a location.

After clicking PIC, the Mesh & BCs tab will be opened.

The Geo, Mesh & BCs, Input and Execute tabs at the top of the TransATUI window can now be selected to open the modules to set up a simulation with TransAT.

3.1.5 Mesh & BCs Tab

The domain is defined and the mesh is created using this tab.

Domain & Grid
  In this section the domain and the computational grid for the simulation will be defined.

To get higher resolutions in regions such as boundary layers, refinements zones can be created using the Customized Refinement feature of TransAT. In this case, the grid is refined in the vicinity of the top and bottom walls as follows:

Blocks
  In TransAT, the user has the possibility to split the domain into several blocks so that the simulation can run on several processors. Indeed, each block is allocated to one processor (but a processor can handle several blocks). This can be done in the Blocks tab, however for this case, the domain can be left as is. BCs Tab
  The boundary conditions must now be set for this case.

To see the surfaces of all or each of the boundaries, choose a boundary in the drop-down list at the top of the BCs tab. One boundary condition of each type is available to be edited and used from the start. Additional BCs can be created by clicking on PIC. PIC is used to assign a selected BC to a highlighted surface.

Creating Boundary Conditions:
In this case, an inflow is located at X min, an outflow at X max, walls at Y min and at Y max, and symmetry boundary conditions at Z min and Z max. Below is a set of step-by-step instructions to create an inflow boundary condition and define its properties.

The inflow boundary condition has now been created.

Assigning Boundary Conditions:

XMin 0 in the surface tree takes the color of the boundary condition after being assigned.


The mesh is now ready.

3.1.6 Input Tab

To set up the simulation parameters,

Physical Models
 

Note that the reference properties are only for computing the non-dimensional numbers and does not affect the simulations.
Phase Properties
  The Phase Properties tab is where the phases of the flow are defined.

Simulation Parameters
  The numerical parameters of the simulation are set in the simulation parameters tab. Equations Section
  In this tab the convergence threshold is defined, as well as the convection scheme and other parameters of the solvers used by TransAT. Modify the convergence thresholds as follows: Initial Conditions
  In this tab simple initial conditions can be set. In this case, initial values for all the relevant quantities will be set to 0 except temperature. Output Management
  The simulation’s outputs are defined in the Output Management tab. In this example, only the visualization output will be set.

3.1.7 Execute Tab

This tab is where the simulation is started and controlled.

3.1.7.1 Starting the Simulation

Running TransAT
 

3.1.8 Visualization of the results

The results of the simulation can be seen with the help of the Open-Source Visualisation Tool, ParaView.

> paraview &

To get a rough idea about visualisation of TransAT results with ParaView, please refer to the TransAT Paraview Tutorial .

More detailed information can also be found in the Paraview Tutorial on the ParaView website.


PIC

Figure 3.1: Variable Selection Drop-Down Box and the Play button



PIC

Figure 3.2: Temperature Profile of the forced convection problem at steady state


3.2 Natural Convection in a Closed Cavity

3.2.1 Prerequisites

3.2.2 Introduction

This TransAT tutorial provides a simple demonstration of the heat transfer that occurs when a fluid flows inside a closed cavity which walls are heated. The setup is taken from simulations by Theodoridis & Rasoul (2010)

3.2.3 Launch TransATUI

> transatui.py &

3.2.4 Opening TransAT window

The first step in creating a new TransAT project is naming said project and giving it a location.

After clicking PIC, the Mesh & BCs tab will be opened.

The Geo, Mesh & BCs, Input and Execute tabs at the top of the TransATUI window can now be selected to open the modules to set up a simulation with TransAT.

3.2.5 Mesh & BCs Tab

The domain is defined and the mesh is created in the Mesh & BCs tab.

Domain & Grid
  In this section the domain and the computational grid for the simulation will be defined.

The number of cells in the domain and the refinement zones are defined in the Domain & Grid tab

In this case, the mesh is regular: ratios between cells is set to 1. Blocks
  In TransAT, the user has the possibility to split the domain into several blocks so that the simulation can be run on several processors. Indeed, each block is allocated to one processor (but a processor can handle several blocks). The splitting of the domain can be done in the Blocks tab, however for this case, the domain can be left as is. BCs Tab
  The boundary conditions must now be set for this case.

To see the surfaces of all or each of the boundaries, choose a boundary in the drop-down list at the top of the BCs tab. One boundary condition of each type is available to be edited and used from the start. Additional BCs can be created by clicking on PIC. PIC is used to assign a selected BC to a highlighted surface.

Creating Boundary Conditions:
In this case, a heated wall is at X min, a cold wall at X max, walls with zero heat flux at Y min and Y max and symmetry boundary conditions at Z min and Z max. Below step-by-step instructions are given to create the hot wall boundary condition and define its properties.

Assigning Boundary Conditions:

XMin 0 in the surface tree takes the color of the boundary condition after being assigned.


The mesh is now ready.


PIC

Figure 3.3: Boundary conditions


3.2.6 Input Tab

The different tabs to define the parameters of the simulation can then be selected. Physical Models
 

Note that the reference properties are only for computing the non-dimensional numbers and does not affect the simulations.


PIC

Figure 3.4: Physical models


Phase Properties
  The Phase Properties tab is used to define the phases of the flow. Phase properties can be imported from the material library or defined by directly modifying the corresponding fields. Simulation Parameters
  This tab is used to define the numerical properties of the simulation.   Simulation Type and Control Parameters
    Equations
  In this section, the convergence threshold is defined, as well as the convection scheme and other parameters of the solvers used by TransAT.


PIC

Figure 3.5: Simulation parameters


Initial Conditions
  In this tab simple initial conditions can be set. In this case, initial values for all the relevant quantities will be set to 0 except velocity components in the x- and y- directions and temperature. Output Management
  In this tab the parameters of the simulation outputs are set. For this example, only the visualization output will be defined.

3.2.7 Execute Tab

This tab is where the simulation is started and controlled.

3.2.7.1 Starting the simulation

Running TransAT
  The number of processors on which the simulation will be run can be changed by modifying the value of the field Number of Processors.

3.2.8 Visualization of the results

The results of the simulation can be seen with the help of the Open-Source Visualisation Tool, ParaView.
Launch Paraview as follows from your project folder using the XTerminal

> paraview &

To get a rough idea about visualisation of TransAT results with ParaView, please refer to the TransAT Paraview Tutorial .

More detailed information can also be found in the Paraview Tutorial on the ParaView website.


PIC

Figure 3.6: Variable Selection Drop-Down Box and the Play button



PIC

Figure 3.7: Temperature Profile of the natural convection problem at steady state


3.3 Turbulent Heat Flux Modelling

3.3.1 Prerequisites

3.3.2 Introduction

In this TransAT tutorial the turbulent heat flux (THF) model is employed to model the heat transfer in a heated pipe by explicitely solving for the turbulent heat fluxes. The setup for this test case is related to the experimental data of Steiner (1971) for Re = 5000.

3.3.3 Launch TransATUI

> transatui.py &

3.3.4 Opening TransAT window

The first step in creating a new TransAT project is naming said project and giving it a location.

After clicking PIC, the Mesh & BCs tab will be opened.

The Geo, Mesh & BCs, Input and Execute tabs at the top of the TransATUI window can now be selected to open the modules to set up a simulation with TransAT.

3.3.5 Mesh & BCs Tab

The domain is defined and the mesh is created using this tab.

Domain & Grid
  In this section the domain and the computational grid for the simulation will be defined.


PIC

Figure 3.8: Domain and Grid settings


Blocks
  The grid will now be decomposed into 4 blocks, so that the simulation can be run on up to 4 processors.

The domain is automatically cut into 4 blocks of equivalent number of cells.


PIC

Figure 3.9: Block decomposition


BCs Tab
  The boundary conditions must now be set for this case.

To see the surfaces of all or each of the boundaries, choose a boundary in the drop-down list at the top of the BCs tab. One boundary condition of each type is available to be edited and used from the start. Additional BCs can be created by clicking on PIC. PIC is used to assign a selected BC to a highlighted surface.

Creating Boundary Conditions:
In this case, an inflow is located at the X min surface, an outflow at the X max surface, a wall at the Y max surface and symmetry boundary conditions at Y min, Z min and Z max surfaces. The wall in Y max will be cut into two adiabetic sections at the entry and exit of the pipe and a heated section at the center using Sub-BCs. Below is a set of step-by-step instructions to create an inflow boundary condition and define its properties.

The inflow boundary condition has now been created.

The YMAX boundary will be split using the SubBC functionnality. Follow the instructions below to split the wall between heated and adiabatic sections.

Assigning Boundary Conditions:

XMIN 0 in the surface tree takes the color of the boundary condition after being assigned.


PIC

Figure 3.10: BCs window


The mesh is now ready.

3.3.6 Input Tab

To set up the simulation parameters,

Physical Models
 

Note that the reference properties only matter for the computation of non-dimensional numbers and do not affect the simulations.


PIC

Figure 3.11: Physical Models window


Phase Properties
  The Phase Properties tab is where the phases of the flow are defined. Simulation Parameters
  The numerical parameters of the simulation are set in the simulation parameters tab. Equations Section
  In this tab the convergence threshold is defined, as well as the convection scheme and other parameters of the solvers used by TransAT. Modify the convergence thresholds as follows:

Initial Conditions
  In this tab simple initial conditions can be set. In this case, the velocity components and the temperature are initialised to the same values as the ones prescribed at the inflow over the whole domain. Pressure is initialised to 0 Pa over the domain.

Output Management
  The simulation’s outputs are defined in the Output Management tab. In this example, only the visualization output will be set.

3.3.7 Execute Tab

This tab is where the simulation is started and controlled. The simulation will now be saved and the necessary files (grid file, boundary conditions file, etc.) to run the simulation generated.

Running TransAT
 

3.3.8 Visualization of the results

The results of the simulation can be seen with the help of the Open-Source Visualisation Tool, ParaView.

> paraview &

To get a rough idea about visualisation of TransAT results with ParaView, please refer to the TransAT Paraview Tutorial .

More detailed information can also be found in the Paraview Tutorial on the ParaView website.


PIC

Figure 3.12: Temperature contour once steady state is reached


Chapter 4
Multiphase Flows

4.1 Dam Break

In this tutorial, the use of custom initial conditions and two–phase flow simulations are introduced. This is a step by step guide on how to simulate the flow of water after a dam breaks.

4.1.1 Prerequisites

4.1.2 Launching TransATUI

> transatui.py &

At the top of the TransATUI window, the tabs Geo, Mesh & BCs, Input or Execute are the different modules to set up and run a case.

4.1.3 Opening TransAT window

The first step in creating a new TransAT project is naming said project and giving it a location.

After clicking PIC, the Mesh & BCs tab will be opened.

The Geo, Mesh & BCs, Input and Execute tabs at the top of the TransATUI window can now be selected to open the modules to set up a simulation with TransAT.

4.1.4 Mesh & BCs Tab

In the Mesh & BCs tab, the domain along with the mesh are defined.

4.1.4.1 Domain & Grid tab

The number of cells in the domain and the refinement zones is also defined the Domain & Grid tab. In this case, a uniform mesh will be created for the simulation.


PIC

Figure 4.1: Domain & Grid tab


4.1.4.2 Blocks

The domain must now be decomposed into several blocks, so that the simulation can run in parallel (i.e. on several processors). Indeed, each block is allocated to one processor (but a processor can handle several blocks).

The domain is automatically split into blocks of equivalent sizes.

4.1.4.3 BCs Tab

The boundary conditions are defined in the BCs tab. In this case a wall and a symmetry boundary condition will be used.   By clicking PIC next to each defined boundary condition, it is possible to modify different parameters at the walls such as the temperature or the heat flux. In this case, no modifications are required in the basic tab since we only solve for the flow. However, some changes may be needed in the interface tracking tab. The model used for this simulation does not use a film at the interface between the wall and the fluids. In TransAT such a model can be achieved by setting a negative value to the film thickness.

  The next step is to assign each surface to the corresponding boundary condition.

After the assignment of all the boundary conditions, the window should be similar to Figure 4.2.


PIC

Figure 4.2: Boundaries tab


4.1.5 Input Tab

The simulation parameters can be set up by clicking the Input tab at the top of the TransATUI. The parameters of the simulation can then be defined by selecting and completing the different tabs.

4.1.5.1 Physical Models Tab


PIC

Figure 4.3: Physical models


4.1.5.2 Phase Properties Tab

The flow is constituted of two phases for which physical properties have to be defined.

Properties for the different phases:

Phase 1 
   Density   : 1.0 
   Viscosity : 1.70e-05   (constant) 
 
Phase 2 
   Density   : 1000.0 
   Viscosity : 0.0017    (constant)


PIC

Figure 4.4: Phase properties


4.1.5.3 Simulation Type and Control Parameters
4.1.5.4 Equations

4.1.5.5 Initial Conditions
  In TransAT, the user has the possibility to create custom initial conditions. For two–phase flow simulations especially, the initial gas–liquid interface topology has to be specified by the user. In this case, this is achieved in TransAT using an XML file initialconditions.xml.   For this specific case, the only variables that are being initialized are simply the ones that are solved for, i.e. velocity, pressure, and the Level-Set function which defines the topology of the gas–liquid interface.   At the initial time step, pressure and velocity are set to 0 throughout the domain.   As for the two phases, they are initially confined in two distinct areas. The liquid is confined in a rectangular area and the gas occupies the rest of the domain. The interface between the two fluids is defined by the Level-Set function which is positive for one fluid and negative for the other. To create the initial interface, a rectangular shape is defined in the Levet-set node of initialconditions.xml.   To be able to use custom initial conditions in this case, the file initialconditions.xml has to be placed in the project folder. For this case, a ready-made initial conditions file available in the TransAT Tutorials folder will be used to initialise variables over the domain. More information can be found on the generation of custom initial conditions in the Custom Initial Conditions chapter of the TransAT User Manual .
cp <TransAT Installation directory>/Tutorials/4.1\ -\ dam_break/initialconditions.xml .

Please note: : do not make a copy/paste from this document to the terminal, since characters from pdf files will not be understood. Directly type the command into the terminal instead.

The simulation must now be re-loaded to take into account the initial conditions settings set in initialconditions.xml.

4.1.5.6 Output Management Tab

4.1.6 Execute Tab

This tab is where the simulation is started and controlled.

4.1.6.1 Running TransAT

4.1.7 Visualisation of the results

4.1.7.1 Result files

TransAT creates a folder RESULT to save the results of the simulation:

4.1.7.2 Viewing Results in Paraview

The results of the simulation can be seen with the help of the Open-Source Visualisation Tool, Paraview. To plot the data:

> paraview &

In Figure 4.5 and Figure 4.6 the initial and the final states of the two–phase systems are plotted. The contour object which is the white line on Figure 4.5 and Figure 4.6 represents the liquid-gas interface.

To get a rough idea about visualisation of TransAT results with ParaView, please refer to the TransAT Paraview Tutorial .

More detailed information can also be found in the Paraview Tutorial on the ParaView website.


PIC

Figure 4.5: Density contour plot at the initial time step



PIC

Figure 4.6: Density contour plot after 0.6 s


4.2 Sloshing

In this tutorial, the use of custom initial conditions and two–phase flow simulations are continued. This is a step by step guide on how to simulate sloshing of water inside a domain.

4.2.1 Prerequisites

4.2.2 Launching TransATUI

> transatui.py &

4.2.3 Opening TransAT window

The first step in creating a new TransAT project is naming said project and giving it a location.

After clicking PIC, the Mesh & BCs tab will be opened.

The Geo, Mesh & BCs, Input and Execute tabs at the top of the TransATUI window can now be selected to open the modules to set up a simulation with TransAT.

4.2.4 Mesh & BCs Tab

In the Mesh & BCs tab, the domain along with the mesh are defined.

4.2.4.1 Domain & Grid

In this section the domain and the computational grid for the simulation will be defined.

The number of cells in the domain and the refinement zones are defined in Grid Properties tab. For this case, a uniform mesh will be create (i.e. cell ratios equal to 1)


PIC

Figure 4.7: Domain & Grid tab


4.2.4.2 Blocks

The domain must now be decomposed into several blocks, so that the simulation can run in parallel (i.e. on several processors). Indeed, each block is allocated to one processor (but a processor can handle several blocks).

The domain is automatically split into blocks of equivalent sizes.

4.2.4.3 BCs Tab

The boundary conditions are defined in the BCs tab. In this case a wall and a symmetry boundary condition will be used.

To set up the boundary conditions,

  By clicking PIC next to each defined boundary condition, it is possible to modify different parameters at the walls such as the temperature or the heat flux. In this case, no modifications are required in the basic tab since we only solve for the flow. However, some changes may be needed in the interface tracking tab. The model used for this simulation does not use a film at the interface between the wall and the fluids. In TransAT such a model can be achieved by setting a negative value to the film thickness.   The next step is to associate each boundary surface with its corresponding boundary condition.

The window should look similar to Figure 4.8 after the assignment of all the boundary conditions.


PIC

Figure 4.8: Boundaries tab


4.2.5 Input Tab

The simulation parameters can be set up by clicking the Input at the top of the TransATUI. The parameters of the simulation can then be defined by selecting and completing the fields of the different tabs.

4.2.5.1 Physical Models Tab


PIC

Figure 4.9: Physical models


4.2.5.2 Phase Properties Tab

The flow is constituted of two phases which physical properties have to be defined.

The properties of the fluid can be manually defined, however they can remain default for this simulation.


PIC

Figure 4.10: Phase Properties


4.2.5.3 Simulation Parameters Tab
4.2.5.4 Equations Section
4.2.5.5 Initial Conditions
  In TransAT, the user has the possibility to create custom initial conditions. For two–phase flow simulations especially, the initial gas–liquid interface topology has to be specified by the user. This is achieved in TransAT using an XML file initialconditions.xml.   For this specific case, the only variables that are being initialized are simply the ones that we are solving for, i.e. velocity and pressure, and the Level-Set function which defines the topology of the gas–liquid interface.   For this case, the aim as far as initial conditions are concerned, is to define where in the domain, each phase should be. To gain the best perspective on the sloshing effect, the simulation starts simply with phase 2 (water) in the lower half of the domain and phase 1 (air) in the upper half. The initiated Vibrating Body Force will then cause the entire body of both fluids to vibrate with a frequency of 0.4 Hz and a change in velocity of both fluids should be witnessed almost immediately.   To be able to use custom initial conditions in this case, the file initialconditions.xml has to be placed in the project folder. For this case, a ready-made initial conditions file available in the TransAT Tutorials folder will be used to initialise variables over the domain. More information can be found on the generation of custom initial conditions in the Custom Initial Conditions chapter of the TransAT User Manual .
cp <TransAT Installation directory>/Tutorials/4.2\ -\ sloshing/initialconditions.xml .

Please note: : do not make a copy/paste from this document to the terminal, characters from pdf files will not be understood. Directly type the command into the terminal instead.

The simulation must now be re-loaded to take into account the initial conditions settings set in initialconditions.xml.

4.2.5.6 Output Management Tab

4.2.6 Execute Tab

This tab is where the simulation is started and controlled.

4.2.6.1 Running TransAT

4.2.7 Visualisation of the results

4.2.7.1 Result files

TransAT creates a folder RESULT to save the results of the simulation:

4.2.7.2 Viewing Results in Paraview

The results of the simulation can be seen with the help of the Open-Source Visualisation Tool, Paraview. To plot the data:

> paraview &

In Figure 4.11 and Figure 4.12 the initial and the final states of the two–phase systems are plotted. The contour object which is the white line on Figure 4.11 and Figure 4.12 represents the liquid-gas interface. To get a rough idea about visualisation of TransAT results with ParaView, please refer to the TransAT Paraview Tutorial .

More detailed information can also be found in the Paraview Tutorial on the ParaView website.  


 

PIC

Figure 4.11: Density contour plot at the initial time step
 


PIC

Figure 4.12: Density contour plot after 2.5 s

4.3 Bubbles Merging

4.3.1 Prerequisites

4.3.2 Introduction

This is a step by step guide on how to simulate the merging of two bubbles in three-dimensions. This tutorial will show the user how to define a multiphase problem using Level-Set method and how to define initial conditions in TransAT.

The initial setup can be seen in Figure 4.13.


PIC

Figure 4.13: Bubble merge problem: initial conditions


4.3.3 Launching TransATUI

To launch the TransATUI user interface, TransATUI,

> transatui.py &

4.3.4 Opening TransAT window

The first step in creating a new TransAT project is naming said project and giving it a location.

After clicking PIC, the Mesh & BCs tab will be opened.

The Geo, Mesh & BCs, Input and Execute tabs at the top of the TransATUI window can now be selected to open the modules to set up a simulation with TransAT.

4.3.5 Mesh & BCs Tab

In the Mesh & BCs tab, the domain along with the mesh are defined.

Domain & Grid 

To define the number of cells in the domain and the refinement zones,

The chosen mesh in this case is regular so the ratios between cells will be set to 1.

Blocks
  The domain must now be decomposed into several blocks so that the simulation can be run on several processors. A processor can handle several block but each block is to be allocated to one processor. To decompose the domain into several blocks,

The domain will automatically be cut into blocks of equivalent sizes. BCs Tab
  The boundary conditions must now be set for this case. Here a simple wall boundary condition will be defined for all boundaries.

The mesh is now ready.

To save the settings,

4.3.6 Input Tab

In this tab the simulation parameters are set up. It gives access to the different sub-tabs where the parameters of the simulation are defined. For this tutorial, the parameters will be set such that a two-phase flow can be simulated with the Level-Set interface-tracking method. Physical Models 

The values for surface tension and gravity in this example were arbitrarily chosen for the sake of computational time. Phase Properties
  In the Phase Properties tab, the properties of different phases of the flow are defined. In this case, the first phase is air whilst the second one is water.

To assign the corresponding fluid properties to the different phases

Simulation Parameters
  In the Simulation Parameters tab, the numerical parameters of the simulation are defined, such as the type of simulation to be run and the way of computing the time steps. Equations
  The user can define the convergence threshold, the solvers and the numerical schemes to be used for each equation using the Equations tab. Initial Conditions
  For two–phase flow simulations, the initial gas–liquid interface topology has to be specified by the user. Two bubbles with radius of 1mm are initially located at center coordinates, c1 = (2.25,1.5,2.0)mm and c2 = (1.75,3.8,2.0)mm.
The initial conditions can be set in TransAT through the use of the initialconditions.xml XML file.   To be able to use custom initial conditions in this case, the file initialconditions.xml has to be placed in the project folder. For this case, a ready-made initial conditions file available in the TransAT Tutorials folder will be used to initialise variables over the domain. More information can be found on the generation of custom initial conditions in the Custom Initial Conditions chapter of the TransAT User Manual .
> cp <TransAT_Tutorial_Folder>/4.3\ -\ bubblemerge/initialconditions.xml .

Please note: : do not make a copy/paste from this document to the terminal, since characters from pdf files will not be understood. Directly type the command into the terminal instead.

The simulation must now be re-loaded to take into account the initial conditions settings set in initialconditions.xml.

Output Management
  The Output Management Tab is used to define the output of the simulation, in particular the format of the visualization files, the variables to be output, as well as the frequency at which the output files will be produced.

4.3.7 Execute Tab

The Execute tab is where the simulation is started and controlled.

Running TransAT
  The Number of Processors to be used can be chosen in the corresponding field. In this case for 3 blocks, 3 processors is an appropriate value to use for the number of processors.

4.3.8 Visualisation of the results

Viewing Results in Paraview
  The results of the simulation can be seen with the help of the open-source visualisation tool, ParaView.
> paraview &

To get a rough idea about visualisation of TransAT results with ParaView, please refer to the TransAT Paraview Tutorial .

More detailed information can also be found in the Paraview Tutorial on the ParaView website.

4.3.9 Results


PIC PIC PIC

Figure 4.14: Bubble merge problem: bubble surface


4.4 Film Boiling

4.4.1 Prerequisites

4.4.2 Introduction

In this tutorial film boiling of a liquid is modeled. A vapor layer spreads over the lower wall, which is kept at a constant superheated temperature. The liquid is kept at the saturation temperature. The heat transfer from the wall causes phase change from the liquid to vapor. The vapor film grows in size and due to the subsequent hydrodynamics, a plume begins to form. As heat is being transfered, the plume grows then detaches from the film. This test case is similar to the setup from Gibou et al. (2007).

Note that for this problem, properties of the phases have been arbitrarily determined, in order to reduce the computational time while still capturing the correct physical behaviors.

The problem setup is given as follows:

4.4.3 Launching TransATUI

The TransATUI (TransAT User Interface) is a versatile and complete platform where the meshing, problem setup and execution of a given simulation can be carried out.

> transatui.py

4.4.4 Opening TransAT window

The first step in creating a new TransAT project is naming said project and giving it a location.

After clicking PIC, the Mesh & BCs tab will be opened.

The Geo, Mesh & BCs, Input and Execute tabs at the top of the TransATUI window can now be selected to open the modules to set up a simulation with TransAT.

4.4.5 Mesh & BCs Tab

The domain is defined and the mesh is created in the Mesh & BCs.

Domain & Grid
  In this section the domain and the computational grid for the simulation will be defined.

Also note that although the problem setup is two-dimensional, 1 cell (i.e. 2 corner points) is required in the third dimension since TransAT is a three-dimensional solver. This very same rule must also be applied for the setup of axisymmetric problems.


PIC

Figure 4.15: Domain & Grid tab


Blocks
  To allow parallel computation, the domain must be split into several blocks.

The block decomposition should be similar as Figure 4.16.


PIC

Figure 4.16: Block Decomposition


BCs Tab
  The surfaces of each or all boundaries can be displayed by selecting the corresponding boundary in the drop-down list at the top of the BCs tab. One boundary condition of each type is available to be edited and used from the start. Additional BCs can be created by clicking on PIC. The PIC button assigns a selected boundary condition to a highlighted surface.
Creating Boundary Conditions:
In this case, a heated wall is at Y Min and an outflow at Y max. Other boundary conditions are symmetry boundary conditions. Below, step-by-step instructions are given to create the wall boundary condition and to define its properties.
Note that in this tutorial temperature and pressure must be understood as relative properties, with the saturation temperature being set as 0K and the outflow pressure as 0Pa.

Assigning Boundary Conditions:

Once the the assignment is done, the surface Y min 0 will be highlighted in the graphical window on the right.


After assigning all the surfaces to their boundary conditions, the BCs tab should be similar to Figure 4.17.


PIC

Figure 4.17: Boundary tab after assignment of surfaces to boundary conditions


The mesh is now ready.

4.4.6 Input Tab

To set up the simulation parameters

Physical Models
  In this tab, the models that will be used during the simulation are defined.