Saturne 3.2 coupled with syrthes 4.1.1 under Ubuntu 12.04 LTS
Preparing your Ubuntu distro:
Install Ubuntu 12.04
run updates, remember to activate the option "not supported updates (precise-backports)" and reboot
from Software Center install : Synaptic package manager
from Synaptic package manager install : nautilus-open-terminal
Restart Nautilus : open a terminal (ctrl+alt+t) = killall nautilus
Now if you right-click on a folder you can launch the terminal directly into the folder (avoiding the boring part of typing cd /...)
Saturne and Syrthes libraries
from synaptic install in order (including subpackets required)
[NB: this list may be outdated due the subsequenting version and some files may be old/unuseful, if you have problem compiling saturne or syrthes be sure to have all of this libraries with their upgraded version installed]
g++
gfortran
libqwt5-qt4
libqwt5-qt4-dev
pyqt4-dev-tools
python-qt4-dev
zlib1g
zlib1g-dev
mpi-default-bin
mpi-default-dev
libblas-dev
libxml2-dev
libscotchparmetis-dev
ptscotch
libscotch-dev
libptscotch-dev
libhdf5-openmpi-dev
h5utils
hdf5-tools
libcgns-dev (ver 3.1 or superior)
cgns-convert
libmed-dev
libmedc-dev
libmedimport-dev
cmake
make
flex
libicu-dev
lib32icu48
libcppunit
Libxml++2.6-dev
libglibmm-2.4-dev
libglib2.0-dev
libglib2.0-bin
libglib2.0-0
automake
automake1.10
autotools-dev
pkg-config
If you have a problem with libcgns-dev from synaptic you have to add the followers repository:
deb http://it.archive.ubuntu.com/ubuntu/ quantal main universe restricted multiverse
deb http://security.ubuntu.com/ubuntu quantal-security main universe restricted multiverse
deb http://it.archive.ubuntu.com/ubuntu/ quantal-updates main universe restricted multiverse
deb http://it.archive.ubuntu.com/ubuntu quantal-backports main restricted universe multiverse
deb http://archive.canonical.com/ubuntu quantal partner
Preparing Saturne 3.2 Environment
Download Code_Saturne 3.2 extract the content in your home folder (/home/user/) where user is your ubuntu username.
create a folder in /home/user/CS3.2 , we will compile saturne here. It’s always nice to have saturne compiled in a different directory than the extracted one.
Install Syrthes
Download 4 syrthes4.1.1 packages from the EDF site http://chercheurs.edf.com/logiciels/syr ... 80982.html
download the files for Ubuntu and put them in a folder.
you should have 4 file named:
sytrhes4.1.1-ubuntu.tgz.part00.zip
sytrhes4.1.1-ubuntu.tgz.part01.zip
sytrhes4.1.1-ubuntu.tgz.part02.zip
sytrhes4.1.1-ubuntu.tgz.part03.zip
now open a terminal in that folder and enter (check on the edf site the right commands/version)
gunzip -S .zip syrthes4.1.1-ubuntu.tgz.part*.zip
cat syrthes4.1.1-ubuntu.tgz.part* >> syrthes4.1.1-ubuntu.tgz
tar xvfz syrthes4.1.1-ubuntu.tgz
At the end you should have a folder “syrthes4.1.1-ubuntu”. Put it in your /home/user
edit the file setup.ini that is placed in /home/user/syrthes4.1.1-ubuntu/src/syrthes-install/
SYRTHES will compile all the needed libraries in his folder.
You have to change the setup.ini for ple and the blas at the end of the file (needed later for coupling):
blas USE=yes PATH=/usr
ple USE=yes PATH=/home/user/CS3.2/libple
syrthescfd INSTALL=yes
Now open a terminal in /home/user/syrthes4.1.1-ubuntu/src/syrthes-install/ and type:
python syrthes_install.py
At the end you have succesfully installed syrthes4.1.1.
ATTENTION
If you have problem telling the “ple” part you can compile Syrthes the first time without ple THEN after installing code_saturne RECOMPILE Syrthes with the ple option as explained before
ATTENTION
If you have problem/errors with the MED libraries compiling change the setup.ini to use the med in the SALOME directory (SALOME is a pre-post processor, very adviced to work with these softwares)
med USE=yes PATH=/home/user/salome_7.3.0/med-3.0.7
Compile Saturne3.2
You have to set the main libreries (cgns, hdf5,med,mpi) synched with SYRTHES. The best way is to reuse the libraries that SYRTHES uses.
Open a terminal in /home/user/CS3.2 and write
/home/user/ code_saturne-3.2.2 /configure + instructions on where to find libraries
EXAMPLES
Tell to saturne where SYRTHES is.
configure --with-mpi=/home/user/syrthes4.1.1-ubuntu/extern-libraries/opt/openmpi-1.4.3/arch/Linux_x86_64
Other libraries useful to link between the 2 softwares.
--with-metis=PATH --with-scotch=PATH --with-hdf5=PATH --with-cgns=PATH --with-med=PATH --with-med=PATH
You need hdf5-1.8.10 !! A good way is to find most of the librariers except for mpi inside the SALOME folder ( SALOME is the multiplatform preprocessor)
configure --with-mpi=/home/user/syrthes4.1.1-ubuntu/extern-libraries/opt/openmpi-1.4.3/arch/Linux_x86_64 --with-metis=/home/user/syrthes4.1.1-ubuntu/extern-libraries/opt/metis-5.0.2/arch/Linux_x86_64 --with-scotch=/home/user/syrthes4.1.1-ubuntu/extern-libraries/opt/scotch_5.1.12b/arch/Linux_x86_64 --with-hdf5=/home/user/salome_7.3.0/hdf5-1.8.10 --with-med=/home/user/salome_7.3.0/med-3.0.7
if your ending lines are like these ( or similar depending on what you need) :
Zlib (gzipped file) support: yes
MPI (Message Passing Interface) support: yes
MPI I/O support: yes
MPI2 one-sided communication support: yes
OpenMP support: no
BLAS (Basic Linear Algebra Subprograms) support: yes
Libxml2 (XML Reader) support: yes
ParMETIS (Parallel Graph Partitioning) support: no
PT-SCOTCH (Parallel Graph Partitioning) support: yes
ADF support: no
CCM support: no
HDF (Hierarchical Data Format) support: yes
CGNS (CFD General Notation System) support: yes
MED (Model for Exchange of Data) support: yes
MED MPI I/O support: no
MEDCoupling support: no
SALOME GUI support: yes
SALOME Kernel support: no
Dynamic loader support (for YACS): yesSYRTHES 3 coupling support: no
Warning: CGNS version used is 2.5, which is deprecated.
in future versions, CGNS >= 3.1 will be required.
you can now enter (it may take long) :
make
and next, remember to be su (sudo) :
sudo make install
Congratulations you succesfully installed Code_Saturne3.2
LINK TOGETHER SYRTHES AND CODE_SATURNE
Go to /usr/local/etc and open a terminal
sudo gedit code_saturne.cfg
now you simply put these 3 lines in your file:
[install]
syrthes = /home/user/syrthes4.1.1-ubuntu/arch/Linux_x86_64
[run]
save and exit.
How to create a coupled case
Open a terminal (ctrl+alt+t) and digit:
code_saturne create -s studyname -c fluid --syrthes=solid
now in your home directory you can find the directory studyname.
Put your meshes in the MESH folder, then you can edit by gui both your CFD domain opening a
terminal in /home/user/studyname/fluid/DATA/ and running:
./SaturneGUI
create a new file and setup your CFD case.
Than for the SYRTHES part open a terminal (ctrl+alt+t) and source :
source /home/user/syrthes4.1.1-ubuntu/arch/Linux_x86_64/bin/syrthes.profile
then:
syrthes.gui
create a new data file (.syd) inside the “solid” folder of your study folder
After setting both fluid and solid domain launch the case running from
./runcase_coupling
from a terminal in /home/user/studyname/
REMEMBER
You have to edit the runcase_coupling telling the name of the .syd file, the number of cpus for each domain (fluid/solid) and the total number of cpu’s. By default the simulation will run with 1-1 cpu.
MPI BUG FIX (optional)
Now the last step, you have to edit :
/home/user/syrthes4.1.1-ubuntu/arch/Linux_x86_64/share/syrthes/syrthes.py
at the line 1391 we have to define manually s4bin and s4home, change line 1391 and 1392 as it follows :
s4bin = '/home/user/syrthes4.1.1-ubuntu/arch/Linux_x86_64/bin'
s4home = '/home/user/syrthes4.1.1-ubuntu/arch/Linux_x86_64'
save and exit
ATTENTION
It may happen that a simulation won’t start due to :
syrthes: syr_cfd_coupling.c:1183: _interpolation_init: Assertion `ple_locator_get_n_exterior(ip->locator) == 0' failed.
You can however by-pass the problem using a saturne c routine which is called cs_user_coupling.c
then specify the coupling between Code_Saturne and SYRTHES there, and then you activate
the option
bool allow_non_matching = true;
This should cope with meshes that are not fully coincident between solid and fluid (bringing you some flexibility) !
Warning: if you specify the coupling through the c code, make sure you do not specify it through the GUI any more (otherwise you would specify two coupling at the same location and this would induce not very pleasant behaviour)
This tutorial has been written by Andrea “pisolino” (andrea.pisa@polito.it) and Andrea “biko86” (andrea.colosimo@polito.it) fellowship researchers for Politecnico di Torino Italy, collecting all the tips and helps inside the forum http://code-saturne.org/forum.
A special thank to Yvan Fournier and Christophe Peniguel for all the support, without them this guide wouldn’t have been written.
Feel free to improve this step by step guide and sorry for our poor english.
Guide to couple Saturne & SYRTHES
-
- Posts: 118
- Joined: Mon Feb 20, 2012 2:07 pm
Re: Guide to couple Saturne & SYRTHES
Thank you for this tutorial !
Do not hesitate to add an illustration of your coupled calculations!
Regards,
PS: I moved the topic to a more appropriate section.
Do not hesitate to add an illustration of your coupled calculations!
Regards,
PS: I moved the topic to a more appropriate section.
Re: Guide to couple Saturne & SYRTHES
Wow, that is a beautiful post. Thank you very much!
Re: Guide to couple Saturne & SYRTHES
Sticky in the installation forum?
/C
/C
Re: Guide to couple Saturne & SYRTHES
Hello to everyone
I got a question about last "attention"
I edited cs_user.c file, but I don't know how to run it. I turned off conjugate in syrthes gui and temperatures in saturne gui. If I use runcase I got same eroor like in attention.
Is that possibility to set coupling with not exactly coincidece meshes in nodes, or szould I have perfectly projected nodes from fluid to solid and c script is only possibility in non coincidence case?
regards
Maciek
I got a question about last "attention"
I edited cs_user.c file, but I don't know how to run it. I turned off conjugate in syrthes gui and temperatures in saturne gui. If I use runcase I got same eroor like in attention.
Is that possibility to set coupling with not exactly coincidece meshes in nodes, or szould I have perfectly projected nodes from fluid to solid and c script is only possibility in non coincidence case?
regards
Maciek
-
- Posts: 4164
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Guide to couple Saturne & SYRTHES
Hello,
This question belongs in the "usage" section of this forum, not in the "discussion" part.
Please also provide details as per the forum usage recommendations post.
To answer one of your questions, Code_Saturne and Syrthes meshes are not required to be conforming. The other questions are not clear, and I don't know what file you are referring to when you mention cs_user.c (there is no file of that name in the base code; you can add whatever user files you want, but others can't guess what it may contain).
Regards,
Yvan
This question belongs in the "usage" section of this forum, not in the "discussion" part.
Please also provide details as per the forum usage recommendations post.
To answer one of your questions, Code_Saturne and Syrthes meshes are not required to be conforming. The other questions are not clear, and I don't know what file you are referring to when you mention cs_user.c (there is no file of that name in the base code; you can add whatever user files you want, but others can't guess what it may contain).
Regards,
Yvan
Re: Guide to couple Saturne & SYRTHES
THank you for response.
Sory for doing mess, I am completly new in this forum, I don't know how to move topic to other setcion.
To precise my question refers to this part of tutorial-
I enabled "bool allow_non_matching = true; "
Now I don't know how to execute coupling simulation using cs_user_coupling.c rather then by described with gui way (gui setup, ./runcase command to start).
I wonder if refining mesh could help with my error, or should I try with cs_user_coupling.
Last is to say only, that I have completly no experience with programing, and so on. I am pure mechanic guy.
Thank You for response one more time and sorry for mess
best regards
Maciek
Sory for doing mess, I am completly new in this forum, I don't know how to move topic to other setcion.
To precise my question refers to this part of tutorial-
I edited cs_user_coupling.c that I enabled coupling simulation (I changed "if (false)" "if (true) with changing name of mesh and name of boundary region of my case).ATTENTION
It may happen that a simulation won’t start due to :
syrthes: syr_cfd_coupling.c:1183: _interpolation_init: Assertion `ple_locator_get_n_exterior(ip->locator) == 0' failed.
You can however by-pass the problem using a saturne c routine which is called cs_user_coupling.c
then specify the coupling between Code_Saturne and SYRTHES there, and then you activate
the option
bool allow_non_matching = true;
This should cope with meshes that are not fully coincident between solid and fluid (bringing you some flexibility) !
Warning: if you specify the coupling through the c code, make sure you do not specify it through the GUI any more (otherwise you would specify two coupling at the same location and this would induce not very pleasant behaviour)
I enabled "bool allow_non_matching = true; "
Now I don't know how to execute coupling simulation using cs_user_coupling.c rather then by described with gui way (gui setup, ./runcase command to start).
I wonder if refining mesh could help with my error, or should I try with cs_user_coupling.
Last is to say only, that I have completly no experience with programing, and so on. I am pure mechanic guy.
Thank You for response one more time and sorry for mess
best regards
Maciek
-
- Posts: 4164
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Guide to couple Saturne & SYRTHES
Hello,
You can use the GUI to set a a coupled simulation, but the last section (Calculation management/Prepare batch calculation) does not apply (yet) to coupled simulations.
So you need to exit the GUI (or use another terminal), and run either runcase_coupling
or runcase depending on your Code_Saturne version in the "study" directory (the directory containing both the Code_Saturne and Syrthes cases.
Regards,
Yvan
You can use the GUI to set a a coupled simulation, but the last section (Calculation management/Prepare batch calculation) does not apply (yet) to coupled simulations.
So you need to exit the GUI (or use another terminal), and run either runcase_coupling
or runcase depending on your Code_Saturne version in the "study" directory (the directory containing both the Code_Saturne and Syrthes cases.
Regards,
Yvan
Re: Guide to couple Saturne & SYRTHES
Ok, problem solved, I set up everything one more time and now it does work.
Thank you very much;).
Thank you very much;).
Re: Guide to couple Saturne & SYRTHES
Hi Andrea:
Great tutorial!
However, I tried to build Syrthes 4.1.1 with the latest Code Saturne Beta 4.0 build 7136 and I get the following errors:
Did the argument counts change in any of these routines in libple?
Great tutorial!
However, I tried to build Syrthes 4.1.1 with the latest Code Saturne Beta 4.0 build 7136 and I get the following errors:
Code: Select all
make[1]: *** [exe] Error 1
make: *** [syrthesmed] Error 2
syr_cfd_coupling.c:1077:3: error: unknown type name ‘ple_mesh_elements_closest_t’
syr_cfd_coupling.c:1110:36: error: incompatible type for argument 1 of ‘ple_locator_create’
syr_cfd_coupling.c:1110:36: error: too many arguments to function ‘ple_locator_create’
syr_cfd_coupling.c:1168:24: error: incompatible type for argument 5 of ‘ple_locator_set_mesh’
syr_cfd_coupling.c:1168:24: error: too few arguments to function ‘ple_locator_set_mesh’
make[1]: *** [/opt/syrthes4.1.1-ubuntu/build//syr_cfd_coupling.o] Error 1
make: *** [syrthescfd] Error 2
../syrthescfd.log:syr_cfd_coupling.c:1077:3: error: unknown type name ‘ple_mesh_elements_closest_t’
../syrthescfd.log:syr_cfd_coupling.c:1110:36: error: incompatible type for argument 1 of ‘ple_locator_create’
../syrthescfd.log:syr_cfd_coupling.c:1110:36: error: too many arguments to function ‘ple_locator_create’
../syrthescfd.log:syr_cfd_coupling.c:1168:24: error: incompatible type for argument 5 of ‘ple_locator_set_mesh’
../syrthescfd.log:syr_cfd_coupling.c:1168:24: error: too few arguments to function ‘ple_locator_set_mesh’
../syrthescfd.log:make[1]: *** [/opt/syrthes4.1.1-ubuntu/build//syr_cfd_coupling.o] Error 1
../syrthescfd.log:make: *** [syrthescfd] Error 2
Did the argument counts change in any of these routines in libple?