CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   problem with chtMultiRegionFoam tutorial... (https://www.cfd-online.com/Forums/openfoam/76961-problem-chtmultiregionfoam-tutorial.html)

Cyp June 9, 2010 09:42

problem with chtMultiRegionFoam tutorial...
 
Hi everybody !

I was trying to run the chtMultiRegionFoam/multiRegionHeater by the ./Allrun command. Some log files are creating, but it look as if nothing happens : the only directory remains the "0" folder.


I try another way (according to an online presentation) executing the following commands:
blockMesh -> OK
setSet -batch makeCellSets.setSet -> here I get the following error message
Code:

setSet: error while loading shared libraries: libreadline.so.5: cannot open shared object file: No such file or directory
Do you have any ideas ?
Thank you for your help,
Cyp

m.nichols19 June 9, 2010 10:35

Try this in Terminal:

Quote:

sudo ln -s /lib/libreadline.so.6.1 /lib/libreadline.so.5
Tell me how that works out

Cyp June 9, 2010 10:37

thank you for your answer

in which directory do I apply your command line ??

m.nichols19 June 9, 2010 10:45

Quote:

Originally Posted by Cyp (Post 262305)
thank you for your answer

in which directory do I apply your command line ??

The home directory. Sorry, I should have mentioned that.

Cyp June 9, 2010 10:58

I still have the same problem...

r08n June 10, 2010 09:39

Try this:

ldd `which setSet`

and see if it can find libreadline.so.5. Is this file really present somewhere in /lib
or /usr/lib?

BTW, I ran this on my PC and it seems that setSet does not even depend on libreadline...
It would be helpful if you could inform that distro/version and OF version you are using
(that's the first thing to do when asking questions like this).

Cyp June 10, 2010 12:04

Hi !

when I type your command, I get :
Code:

libreadline.so.5 => not found
Moreover, when I want to edit the Allrun file, I get the following warning :
Code:

kde4-config: /USER/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib64/libkdecore.so.5)                                                                                                                                       
kde4-config: USER/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib64/libkdecore.so.5)

Is there any link ??


I have a OpenSuSe 11.2 and I run OpenFOAM 1.6

Cyp June 10, 2010 12:13

I saw a similar topic :
http://www.cfd-online.com/Forums/ope...-tutorial.html

but there is no tips that can help me :(

r08n June 10, 2010 12:46

Quote:

Originally Posted by Cyp (Post 262497)
Hi !

when I type your command, I get :
Code:

libreadline.so.5 => not found

Do you have libreadline installed? I cannot give you many details, because I'm not using OpenSuse, but you might try smth like "yum install libreadline5" or so. Search for info
about this lib under O-suse.

Quote:


Code:

kde4-config: /USER/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib64/libkdecore.so.5)                                                                                                                                       
kde4-config: USER/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux64/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib64/libkdecore.so.5)

Is there any link ??
Evidently, your editor tries to use the system libraries (like libkdecore), but libstdc++
is "substituted" by the OF library, because of the OF/etc/bashrc script. Try to open the console, do not source the OF/etc/bashrc, and then run an editor. See if it works.
Make sure sourcing OF/etc/bashr is not included in your (or system-wide) .bashrc script.
Also you may try some text-mode editor, like 'vim' or similar.

These are just some quick guesses, I'm not sure if this helps, but maybe you'll notice smth informative.

Cyp June 11, 2010 11:36

thank you r08n your very good advices. I have installed the libreadline5 librairie, and now my calculation successfully ran.

I encounter a new problem now : I can't view any fields with paraFoam. Do you have any idea ?

r08n June 14, 2010 10:35

Quote:

Originally Posted by Cyp (Post 262651)
I encounter a new problem now : I can't view any fields with paraFoam. Do you have any idea ?

I had a similar problem with viewing fields in multiple regions. The short procedure that worked for me is this:
1) after setting up the geometry with multiple regions (with setSet, setsToZones, splitMeshRegions), a new folder is created 0.001. It contains a separate folder for each region, and each such subfolder contains a folder "polyMesh"; e.g., case_name/0.001/region1/polyMesh/, etc.
2) while running the simulation, appropriate folders for times are created, as usual.
3) Now, after the simulation ends, link or copy the folder "polyMesh" from time 0.001 subfolder of appropriate region into the subfolders of respective regions in other time folders; e.g. 0.001/region1/polyMesh --> 10.001/region1/polyMesh, 0.001/region2/polyMesh --> 10.001/region2/polyMesh, etc. Repeat for all the regions and times like this:

for t in 10.001 20.001 30.001 ...
do
for r in region1 region2 ...
do
ln -s 0.001/$r/polyMesh $t/$r/polyMesh
done
done

4) from within the case folder, run foamToVTK for each region:
foamToVTK -useTimeName -region region1
etc. (repeat for each region). This should create a folder with the structure like this:
case_name/VTK/region1/grid_10.001.vtk etc., i.e., .vtk files for each region and time.
5) run 'paraview' (not paraFoam) and open these *.vtk files.

There are instructions here:
http://openfoamwiki.net/index.php/Ho...rocMultiregion
but it seems that I used a slightly different procedure, as described above. I'm not sure if
I was doing the things right. Any comments?

Cyp June 14, 2010 10:39

thank you very much for your answer !

Indeed, it perfectly works when I use paraview instead of paraFoam

m.nichols19 June 14, 2010 10:58

Hello ro8n,

The following is my procedure for viewing fields in multiple regions in the multiRegionHeater tutorial:

5. Create the remaining constant folders by entering the following commands in Terminal:

mkdir constant/heater
mkdir constant/leftSolid
mkdir constant/rightSolid

6. Softlink the mesh from the first time step of each region to the constant directory of each region by entering the following commands in Terminal:

cd constant/bottomAir
ln -s ../../0.001/bottomAir/polyMesh polyMesh
cd ../../
cd constant/topAir
ln -s ../../0.001/topAir/polyMesh polyMesh
cd ../../
cd constant/heater
ln -s ../../0.001/heater/polyMesh polyMesh
cd ../../
cd constant/leftSolid
ln -s ../../0.001/leftSolid/polyMesh polyMesh
cd ../../
cd constant/rightSolid
ln -s ../../0.001/rightSolid/polyMesh polyMesh
cd ../../

7. Convert the format of each region to VTK by entering the following commands in Terminal:

foamToVTK -region bottomAir
foamToVTK -region topAir
foamToVTK -region heater
foamToVTK -region leftSolid
foamToVTK -region rightSolid

8. Run ParaView by entering the following command in Terminal:

paraFoam

9. Open the following folders in ParaView:

VTK/bottomAir/multiRegionHeater_..vtk
VTK/topAir/multiRegionHeater_..vtk
VTK/heater/multiRegionHeater_..vtk
VTK/leftSolid/multiRegionHeater_..vtk
VTK/rightSolid/multiRegionHeater_..vtk

best regards,
Matt

msarkar June 15, 2010 06:17

Quote:

Originally Posted by r08n (Post 262925)
I had a similar problem with viewing fields in multiple regions. The short procedure that worked for me is this:
1) after setting up the geometry with multiple regions (with setSet, setsToZones, splitMeshRegions), a new folder is created 0.001. It contains a separate folder for each region, and each such subfolder contains a folder "polyMesh"; e.g., case_name/0.001/region1/polyMesh/, etc.
2) while running the simulation, appropriate folders for times are created, as usual.
3) Now, after the simulation ends, link or copy the folder "polyMesh" from time 0.001 subfolder of appropriate region into the subfolders of respective regions in other time folders; e.g. 0.001/region1/polyMesh --> 10.001/region1/polyMesh, 0.001/region2/polyMesh --> 10.001/region2/polyMesh, etc. Repeat for all the regions and times like this:

for t in 10.001 20.001 30.001 ...
do
for r in region1 region2 ...
do
ln -s 0.001/$r/polyMesh $t/$r/polyMesh
done
done

4) from within the case folder, run foamToVTK for each region:
foamToVTK -useTimeName -region region1
etc. (repeat for each region). This should create a folder with the structure like this:
case_name/VTK/region1/grid_10.001.vtk etc., i.e., .vtk files for each region and time.
5) run 'paraview' (not paraFoam) and open these *.vtk files.

There are instructions here:
http://openfoamwiki.net/index.php/Ho...rocMultiregion
but it seems that I used a slightly different procedure, as described above. I'm not sure if
I was doing the things right. Any comments?

Hi Robertas,
I faced same problem to visualize the results from multi-region simulation and followed your instructions to convert the results to VTK format but it did not work for me. It created all region folders within VTK folder and region folder it creates caseName_time.vtk file (caseName/VTK/region/caseName_time.vtk) but I am not able to visualize the field values (like p, T, U etc). Only I can see the mesh. When I uploaded this vtk file in paraview it gives me option to display Solid Color, CellID and cellNormals, no field name like p, U, T etc. I followed your suggestion exactly but I don't know what is wrong there. Please help me to visualize the results. I ran chtMultiRegionFoam solver and I am using OF-1.6.x version (freefoam).

Thanks
M. Sarkar

r08n June 18, 2010 06:05

Quote:

Originally Posted by msarkar (Post 263059)
but I am not able to visualize the field values (like p, T, U etc). Only I can see the mesh. When I uploaded this vtk file in paraview it gives me option to display Solid Color, CellID and cellNormals, no field name like p, U, T etc.

I'm not sure about this problem, just guessing: open any .vtk file with a text editor
and see if there any field data; for example, for the field 'rho' there must be a string like
'rho 1 130 float' and then some numbers in binary (looks like random symbols) or ascii format.

Before running foamToVTK, is there field data (the files for U, T, rho, phi, etc. as appropriate) in the appropriate time and region subfolders (e.g., 20.001/region1/U , etc)?
Are the polyMesh folders in region folders linked to respective region folders in 0.001?
(e.g., 10.001/reg1/polyMesh --> 0.001/reg1/polyMesh; i.e., if there are no mixups between different regions).

These are some quick guesses that came to mind.

Quote:

I followed your suggestion exactly but I don't know what is wrong there.
Don't follow me yet -- I'm still a n00b in these matters... :D Much of what I have written so far is a guesswork which is still in progress...

msarkar June 28, 2010 03:48

Hello Robertas,
I think it was my bad, I did not open right vtk file. Now I am able to visualize the results. Thanks a lot for you post.

Regards
M. Sarkar


All times are GMT -4. The time now is 15:13.