Wednesday 22 April 2009

A short introduction of Linux/Ubuntu

Definitely you can find loads of information from the Internet on Linux/Ubuntu and how to install them. Not like Microsoft Windows, most Linux distributions are free to get and install. It implies you can save money and meanwhile you could also get rid of the annoying license stuff. The only thing you have to pay, you have to spare some time to change your idea on an operating system in order to get used to this "quite different" one. Of course, if Linux is already your habit, this sentence is not said to you.

Nearly all modern distributions of Linux adopt Graphic User Interface (GUI) as their operating environment for desktop versions, and Ubuntu is no exception. The default desktop environment used in Ubuntu is GNOME. Since programs are also encapsulated into windows which are constructed with similar components as on Windows, such as menus, tool buttons and scrollbar etc, I don't think it is quite different. Actually it is Ubuntu/GNOME that I am writing this post within. Therefore, the aspect we have to change is not the style of operating but lies on the applications we are going to use, because not every program was ported onto Linux, especially those commercial software and games like Microsoft Office and Warcraft etc. Whenever you encounter problems, remember using search engines like Google is a good methodology to crack out solutions and there is a big community there to help you.

Another point which makes Linux different from Windows is the frequently employed text commands executed on terminals. At most times, we use command lines because they are more consistent and fluent than any existing alternative GUI ways to complete the same task. For example, most works can be implemented without leaving the terminal window. Secondly, programs running at a terminal have very clear input and output parameters, which could be helpful whenever diagnosis is necessary. Besides, commands are possible to be linked and composed together to build automatic scripts. These scripts can save lots of time when executing fixed work flows.

Therefore, in the posts here, operations will be expressed in commands as much as possible. It is more accurate and convenient to follow than by saying "move your mouse to somewhere" and "click some items" etc. Taking it further, it is also easy to run commands by copy, paste and hit Enter. I guess it is the most efficient way to see their effect.

Choose open-source CFD platform

Code_Saturne is general purpose CFD software developed by EDF R&D. It is an open-source code distributed under the GNU GPL licence and have been ported to Linux PCs and all UNIX platforms. For PCs, it is easy to install and use if a Linux operating system is already installed, while for those supercomputers or clusters, like Cray and Blue Gene, with help of MPI libraries, Code_Saturne can also utilise the potential of their parallel computing ability. You can find more introduction about Code_Saturne from its official website.

It is commonly known that an entire CFD solution procedure can be split into four sequential steps: geometry modelling, meshing, solving and post-processing. Code_Saturne is a CFD solver and as such it can only manage the solving step. Currently, on my Linux PCs, SALOME is chosen to cope with the geometry modelling and meshing steps, while ParaView is used for the post-processing. Both SALOME and ParaView are also open-source software targeted at numerical simulation.

ParaView is a cross-platform software, whereas SALOME and Code_Saturne are mainly released for Linux. Regarding Linux systems, there are quite a lot of distributions to meet various personal demands and most of them can be freely downloaded from their official website. Among these distributions there are some which can be used to start with if one has no experience about Linux before, such as Ubuntu, openSUSE and Fedora etc. My posts focus on Ubuntu (or its variants) and actually the experiences would also be ported to other distributions.

With all software mentioned above, Ubuntu, SALOME, Code_Saturne and ParaView, a free/open-source platform can then be built to provide CFD solutions. Download sites of these software are listed here for convenience:

Ubuntu
SALOME
Code_Saturne
ParaView

In the following posts I will try to introduce the detailed installation procedure for all of them.

Tuesday 21 April 2009

Resources on free CFD codes

General introduction about CFD from wikipedia:

Computational fluid dynamics

A list of free codes on CFD can be found from CFD-Wiki:

http://www.cfd-online.com/Wiki/Codes

where the commercial codes available are also listed side by side.