CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   OpenFOAM on non-English Ubuntu distribution (https://www.cfd-online.com/Forums/openfoam/71634-openfoam-non-english-ubuntu-distribution.html)

fabian_roesler January 10, 2010 09:25

OpenFOAM on non-English Ubuntu distribution
 
Hi Foamers

I installed OpenFOAM 1.6.x recently on my German Ubuntu 9.04 distribution. Everything went well until I tried to view my simulation results in ParaView. The following error occured:

terminate called after throwing an instance of 'std::length_error'
what(): basic_string::_S_create
/home/fr/OpenFOAM/OpenFOAM-1.6.x/bin/paraFoam: line 83: 13772 Aborted paraview --data=$caseFile

This error is due to the decimal separators in Ubuntu. Everybody using comma instead of points will run into this message.
The way to overcome this error is to switch to point decimal separator.

Add the following line to the .bashrc what will tell Ubuntu to use the American number format:

export LC_NUMERIC=en_US.utf8

Afterwards you have to relog and recompile the PV3FoamReader by doing the following:

cd ~/OpenFOAM/OpenFOAM-xyz/applications/utilities/postProcessing/graphics/PV3FoamReader

./Allwclean

cd ~OpenFOAM/OpenFOAM-xyz

./Allwmake


xyz stands for the OpenFOAM version you use. Now ParaView should run on non-English Ubuntu distributions.

Regards

Fabian

stawrogin January 10, 2010 10:02

Hi Fabian
did you try with:
write "export LC_ALL=C" at the beginning of your paraFoam Startskript (which paraFoam)
please see:
http://www.cfd-online.com/Forums/ope...-paraview.html

stawrogin

fabian_roesler January 11, 2010 06:23

hi stawrogin

No, I did not try that. But export LC_ALL=C changes the whole language set. LC_NUMERIC only changes number-related stuff. Anyway, both things work fine.

Regards Fabian

Wolle January 11, 2010 07:16

Hi Fabian,

yes and no.

Adding the LC_ALL command in the parafoam script changes the complete locales settings - but only for the shell the script runs in!

Your .bashrc hack changes your settings permanently for all you applications... that might cause other conflicts!

Cheers
Wolle


All times are GMT -4. The time now is 07:55.