How to extract raw data from OpenFOAM using sampleDict

We often need to take the data on a specific point. In OpenFOAM we can use sampleDict utility.

In the sampleDict file, we can add the following line for extracting data on a set of specific points.

curve // name of the file (can be any name)
type cloud; //type cloud for arbitrary ponits
axis xyz; // the points are scattred in xyz direction
points // list of points
(3.93 0.28 0.7897)
(5.93 0.28 1.2)
(7.93 0.28 2.2)

Sound from high-Reynolds number flow over bluff bodies

– This paper aims to investigate the aerodynamic sound generated from flow over bluff bodies at a high Reynolds number. By taking circular and square cylinders as two representative geometries for the cross-section of bluff bodies, this study aims to clarify the difference in flow formation and sound generation between the two types of bluff bodies. Furthermore, the possibility for a downstream flat plate to be used as sound cancellation passive mechanism is also discussed in this study.

– Sound source from the near field is numerically solved by using the Unsteady Reynolds-Averaged Navier Stokes equations. While for the sound at far-field, the compact sound theory of Curle’s analogy is used.

– Magnitude of the generated sound is dominant by the aerodynamic forcer fluctuations, i.e. lift and drag, where the lift fluctuation gives the strongest influence on the sound generation. The square cylinder emits 4.7 dB higher than the sound emitted from flow over the circular cylinder. This relates to the longer vortex formation length for the case of square cylinder that provides space for more vortex to dissipate. It is suggested that downstream flat plate is possible to be applied for a sound cancellation mechanism for the case of circular cylinder, but it would be more challenging for the case of square cylinder.

Practical implications
– This study include implications for the development of noise reduction study especially in high-speed vehicles such as the aircrafts and high-speed trains.

– This study identified that there is possible method for sound cancellation in flow over bluff body cases by using passive control method, even in flow at high Reynolds number.

email me (researchsukri[at] if you want the copy of the paper.

SnappyHexMesh: How to get a smooth mesh

This post explains briefly how can we get a smooth mesh when using the snappyHexMesh in OpenFOAM 2.0.

The main ingredient is the ‘surfaceFeatureExtract’ utility.

Here are the steps:

1- blockMesh: the BCs can be defined here, example: inlet and outlet patches.

2- extract the surface edge from the .stl file, example: tank.stl
command : “surfaceFeatureExtract -includedAngle 150 -writeObj constant/triSurface/tank.stl features”

this utiliy will create .eMesh file in /constant/triSurface/ : example tank.eMesh

3- in the snappyHexMeshDict, edge refinement is made by referring the eMesh file name, example: tank.eMesh.

4- run the snappyHexmesh utility.



This post is about how to calculate yPlus in OpenFOAM.

1) with wall function; simply type ‘yPlusRAS’
2) without wall function;
i- type wallShearStress
ii- calculate manually: y+ = sqrt(wallShearStress/rho) * y/nu
y = height of the cell near to the wall
nu = kinematic viscosity.

1_ simply type ‘yPlusLES’



This post is for OpenFOAM user.

Most of the times, we need to import CAD drawing to OpenFOAM, especially for the complex geomtery. The dimension in the drawing somehow may changes after we imported into OpenFOAM.

with ‘transformPoints’ utilitiy, we can manipulate the coordinate of the imported file to our requirement. Refer to this site for complete explanation:

Example: if we want to scale the CAD drawing to a factor of 0.01 in x and y directions:

>> tranformPoints -scale ‘(0.01 0.01 1)’

if the surface is not smooth (due to the sudden change in geometry) use surfaceFeatureExtractDict, e.g.: tutorials/mesh/snappyHexMesh/flange

or snapEdgeDict


/*——————————–*- C++ -*———————————-*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.7                                   |
|   \\  /    A nd           | Web:               |
|    \\/     M anipulation  |                                                 |
version     2.0;
format      ascii;
class       dictionary;
location    “constant”;
object      snapEdgeDict;





// only move those points that are closer to the features than the tolerance*| edge length |
tolerance 1.9;

// 1.0 = move the points to the edge, 0 = dont move the point
// under-relaxation works better with many iterations to capture corners
relaxation 0.1;

// number of iterations to move points towards edge
nIterations 15;

// set to yes if edges inside a patch should be included
// set to no if only the edges of the patch should be moved
// in general: set this to no to get optimal mapping of inlet/outlet patches
// this ensures that wall-faces and inlet/outlet-faces are mapped to correct positions
includeInterior yes;

// resolve all features with greater angle than this
featureAngle 90.0;

// do not snap edges with an angle greater than this to the feature line
excludeEdgeAngle 60;

// used when selecting between multiple edges to map to the same position
// if the angle is above this value
//     the choice will be based on which edge has the smallest angle to feature line
// otherwise
//     the choice will be based on which edge is closest
parallelAngle 50.0;

// allow for small overlap when fitting the edges to feature lines
fitFactor 1.0e-2;



Sustainable Malaysia High Speed Train System

Today, as an initiative to bid the Malaysia High Speed Train Project, Japanese government and Japanese trade associations have organised a free seminar on high speed Rail. The seminar is also to commemorate the 50th anniversary of Shinkansen.

The successful of Shinkansen is amazing.  It’s no doubt that Shinkansen has increased the GDP growth rate of Japan (0.3%), contributed to the regional development and the most preferable mode of transport for travel distance up to 1000Km. For year ended March 31, 2014, JR EAST (one of the Shinkansen operator), has made annual operating revenue of $27billion and without any subsidies from the government.

Can Malaysia High Speed train be as successful as the Shinkansen. Do Malaysia need to buy the Japanese technology so that the successfulness of the Billion dolar project can be guaranteed.

If we look one of the main factor for the successful of the Shinkansen in Japan is on the ownership of the technology.  High speed train technology is not only involved interdisciplinary technologies (rolling stock, safety, track technology, signal system, electricity, environmental impact and etc ) but also require the advanced technology.  In average, in every 10years, one new series of Shinkansen has evolved. This fast growing and sustainable development of the Shinkansen technology is supported strongly by Japanese research institutes. One of them is Railway Technical Research Institute (RTRI).

What elements that Malaysia will look in choosing the right technology is still not been finalised. If Malaysia just need the high speed railway system, then  the construction of the Malaysia high train will be easy, quick and will be very much similar to the system in the country that the technology is originally being bought from.

But, Malaysia also, is believed, to look into the sustainable elements. Technology transfer is important for this kind of billion dollar project.  Malaysia like to have their own people involve in the research and development of its high speed train project. This should come with specific targets, and one of the target should be able to export Malaysia own High Speed train technology in the next few years. To achieve this target, a research centre specifically for High Speed Train Technology, similar to RTRI in Japan,  should be setup.