Monday, 7 December 2009

SALOME, on the way to cross-platform

SALOME running on Mac OS X

Unfortunately, I don't have a Mac machine and thus I didn't get any experience on a Mac, because of its big price :(. However, I do suggest you read here if you want to use SALOME on Mac OS X. There is also a nice picture which might bring some hope if you are facing problems.



SALOME version 5.1.2 for Windows platform

Although I knew SALOME was ported onto Windows platform, I didn't try, because regarding such a huge and complicated software package, I don't expect more. However, I also admit that if the Windows version can run well, it is significantly helpful to those who are not familiar with Linux enough. Then I tried this Windows version and, surprisingly, found it works like a charm. Python, C/C++, QT and all of the cross-platform languages and libraries do give us an option to create programs which is compatible with both Linux and Windows simultaneously. It is totally awesome.

Ok, let's look at this SALOME for Windows. From

http://files.salome-platform.org/cea/adam/salomewindows/download/

the zip package (and a patch file) can be downloaded. Unpack the package to wherever you like, run the bat file release\salome.bat, and SALOME will be launched. Its appearance is exactly the same as in Linux. I tried to load a python script I previously wrote. It worked very well.

The patch file salome_utils.py should be copied to the directory release\modules\KERNEL_INSTALL\bin\salome.

Do you want a go?

SALOME version 5.1.3 for tests on Windows

SALOME version 5.1.3 is recently released by CEA/DEN, EDF R&D and OPEN CASCADE on 14th Dec. 2009. As mentioned, it is a public maintenance release that contains planned major and minor improvements plus bug fixes against SALOME version 5.1.2. Read the news for more details and the download page is here.

According to the message published on the SALOME forum, A SALOME 5.1.3 for tests on Windows came to be available on 18th Dec. 2009. The download address is still at http://files.salome-platform.org/cea/adam/salomewindows/download/. The previous version 5.1.2 was moved to the directory "old". Addtionally, a list of known problems can be found at http://sites.google.com/site/wikisalomeplatform/Home/salome-windows/salome-windows-errata.

Probably, for those who are looking forward to using SALOME on Windows, screenshots could bring more pleasant surprises. The screenshots below were taken from Windows 7.



You can also compile SALOME on windows if you like. See a howto at http://sites.google.com/site/wikisalomeplatform/Home/salome-windows/5-1-3/howto-compile.

Sunday, 6 December 2009

Gambit and Fluent on 64 bit Ubuntu

Installation

It seems that Gambit doesn't include a 64 bit version. However, 32 bit Gambit can be installed and used on a 64 bit Ubuntu (I tried on a Ubuntu 9.10 amd64). When trying to launch it, there will be an error saying the ARCH is not compatible. The solution is exporting a variable "FLUENT_ARCH" before the go.

:/$ export FLUENT_ARCH="lnx86"

Then Gambit will not complain about the uncompatible architecture.

Different from Gambit, Fluent does include a 64 bit version. But remember the variable FLUENT_ARCH has to be switched back before trying to run a 64 bit Fluent; (similarly, if the Fluent used is also a 32 bit version, the variable value "lnx86" has to be kept).

:/$ export FLUENT_ARCH="lnamd64"

To avoid the inconvenience, launch scripts can be written to simplify the procedure.

Besides, another potential problem which could be encountered when trying to launch Fluent within Ubuntu 9.10 is the lack of libstdc++.so.5 is complained. This library was actually provided via package libstdc++5, which is however abandoned after Ubuntu 9.10. However, it can still be found from a Debian source, by which I downloaded the package libstdc++5_3.3.6-18_amd64.deb and fixed the error.

Tutorial

A helpful tutorial on Gambit and Fluent can be found from here, although it is using Windows.

UDF (User Defined Functions) is important for extending the flexibility of Fluent. A programming guide of UDF can be found from this pdf file, and this is the complete UDF manual.

Example

An interesting wave tank example was found from a useful post. It is for a solution of the 2D laminar fluid flow in a tank with oscillating motion of a wall by using multi-phase models. More instructions on this example can be found from the Fluent website, from which related mesh files can also be downloaded.

A detailed set up procedure of the example was described in this pdf file as well.

Saturday, 5 December 2009

Installation of SALOME 5.1.2 on (K)Ubuntu 9.10 64 bit

NEW - A post "Installation of SALOME 5.1.3 on Ubuntu 10.04 (64 bit)" was recently published and recommended if you have already updated to Ubuntu 10.04.

I recently upgraded my Ubuntu 9.04 to the latest 9.10 x86_64 version. In this post I use Kubuntu 9.10 64 bit platform for example to share ideas on some problems you might also encounter when trying to install SALOME 5.1.2. These solutions are compatible with SALOME 5.1.3 and Ubuntu 9.10 as well.

You are recommended to read the basic instructions on how to install SALOME on Ubuntu from "Installation of SALOME 5.1.1 on Ubuntu 9.04", because this post follows that one and only involves the newly fixed problems on 9.10.

1. Error when installing SWIG-1.3.31

This time I didn't compile Code_Saturne before installing SALOME, and I therefore encountered errors complaining the system lacks g++ compiler, since it is impossible to install SWIG from binaries and it has to be built from sources.

The solution is simply installing the compilers:

:/$ sudo apt-get install build-essential

When compiling Code_Saturne, don't need to install the package again.

2. Error when installing HXX2SALOME_5.1.2

The error also occurred when installing SALOME, saying

gzip: stdout: Broken pipe

The reason for this error is because the tar (version 1.22-1) in Ubuntu 9.10 includes a regression. This problem has already been corrected in versions 1.22-1.1 and later, which however are currently not part of Ubuntu 9.10.

In order to solve this, the newer version deb package for proper architecture can be downloaded from Launchpad and installed. For example, I installed tar_1.22-2_amd64.deb and fixed the error.

3. Error related to libg2c.so.0

After fixed the last two errors, although the installation was completed, a warning dialog popped out, saying a mandatory library "libg2c.so.0" was not found. Actually this library file is essential to the mesh module, and if it is absent, the successfully installed mesh module cannot even be initialised.



libg2c is a Fortran/C library. Within previous versions of (K)Ubuntu, it could simply be installed via apt-get (apt-get install libg2c0), but 9.10 does not have this package anymore (or at the moment).

By searching the package, libg2c0 can be found and downloaded. It is worth noting that the package depends on gcc-3.4-base, which is, of course, outdated. Then ignore the dependency, in another word, force to install the package libg2c0.

:/$ sudo dpkg --force-depends -i libg2c0_3.4.6-8ubuntu2_amd64.deb

Now the mesh module could then function.