CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[mesh manipulation] How to create patch after snappyHexMesh?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 12, 2020, 00:37
Default How to create patch after snappyHexMesh?
  #1
Member
 
Sunag R A
Join Date: Jul 2019
Location: Bangalore, India
Posts: 82
Rep Power: 7
sunagra27 is on a distinguished road
Dear All,


I have a sphere created using snappyHexmesh, Now, I am trying to create a cylinder which has a inlet from sphere base and outlet inside the sphere. I am trying to create this using topoSet and createPatchDict. The cylinder is entered into snappyHexMeshDict using stl file.


The problem I am facing here is that once the snappyHexMesh is created after blockMesh, I am getting a cut in the portion of the cylinder inlet which can be seen clearly in the sphere base. I have attached the image for reference. I need that cut portion as closed and use as inlet for cylinder.


How do I get the cut portion as inlet using topoSet..? All I am getting is the surrounding wall as inlet. I have attached the photo for reference.


Image: Inlet_for_cylinder: You can see that after snappyHexMesh for cylinder, the portion is cut, where I need it as a patch for inlet.



inlet_for_cylinder.png






Image: Inlet after topoSet: After using topoSet, I am getting inlet as the surrounding wall. How to get the cut portion as inlet..?





inlet_topoSet.png




Any leads will be helpful,


Regards,


Sunag R A.

Last edited by sunagra27; November 12, 2020 at 00:38. Reason: Spell mistake
sunagra27 is offline   Reply With Quote

Old   November 14, 2020, 16:02
Default
  #2
Senior Member
 
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 6
otaolafr is on a distinguished road
hello,

from what i get, you want to study the following geometry:
a demi sphere that has a small cylinder interesected to it, and you want the flat face of the cylinder as the inlet to the geometry?

either way, if I understood you correctly and thats what you want,
I would recommend using salome to define the different boundaries by groups, then creating surface mesh for the complete body and then it will inherit the groups faces from the geometry to the surface mesh and then export each mesh separatly in a stl.
then you combine all the stls with:
cat *.stl >> combined.stl (command in bash that will combine all the different stls in the current folder)

and then you will have a stl with boundaries pre defined! so you can use it in snappyHex

i addded a attached study from salome with a similar geometry to the one you want so you have a base, also here you have a complete guide from tobias https://www.youtube.com/watch?v=_uom_JPs45I

Study1.zip
otaolafr is offline   Reply With Quote

Old   November 25, 2020, 01:53
Default
  #3
Member
 
Sunag R A
Join Date: Jul 2019
Location: Bangalore, India
Posts: 82
Rep Power: 7
sunagra27 is on a distinguished road
Dear Franco,


Thank you very much for the suggestion and the example file.


With respect to salome, I did download from the salome platform and try to run after extraction. I am getting an error related to libGLX.so file.



I tried to install this file by first finding the library using apt-file find. The file is present in the right directory but during installation it is unable to locate it and so it stopped the salome installation.


Error:


[runSalome running on sharat-lenovo-ideapad-y700-14isk
Searching for a free port for naming service: 2812 - OK
Searching Naming Service + found in 0.1 seconds
Searching /Kernel/Session in Naming Service +SALOME_Session_Server: error while loading shared libraries: libGLX.so.0: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "/media/sharat/DATA/Sunag/Niramai/SALOME-9.5.0/BINARIES-CO7/KERNEL/bin/salome/orbmodule.py", line 181, in waitNSPID
os.kill(thePID,0)
ProcessLookupError: [Errno 3] No such process

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/media/sharat/DATA/Sunag/Niramai/SALOME-9.5.0/BINARIES-CO7/KERNEL/bin/salome/runSalome.py", line 680, in useSalome
clt = startSalome(args, modules_list, modules_root_dir)
File "/media/sharat/DATA/Sunag/Niramai/SALOME-9.5.0/BINARIES-CO7/KERNEL/bin/salome/runSalome.py", line 625, in startSalome
session=clt.waitNSPID("/Kernel/Session",mySessionServ.PID,SALOME.Session)
File "/media/sharat/DATA/Sunag/Niramai/SALOME-9.5.0/BINARIES-CO7/KERNEL/bin/salome/orbmodule.py", line 183, in waitNSPID
raise RuntimeError("Process %d for %s not found" % (thePID,theName))
RuntimeError: Process 9726 for /Kernel/Session not found


--- Error during Salome launch ---
➜ SALOME-9.5.0 Warning, no type found for resource "localhost", using default value "single_machine"][/Error]




Could you provide me any light on this error?


Regards,


Sunag R A.
sunagra27 is offline   Reply With Quote

Old   November 25, 2020, 07:08
Default
  #4
Senior Member
 
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 6
otaolafr is on a distinguished road
Quote:
Originally Posted by sunagra27 View Post
Dear Franco,


Thank you very much for the suggestion and the example file.


With respect to salome, I did download from the salome platform and try to run after extraction. I am getting an error related to libGLX.so file.



I tried to install this file by first finding the library using apt-file find. The file is present in the right directory but during installation it is unable to locate it and so it stopped the salome installation.


Error:


[runSalome running on sharat-lenovo-ideapad-y700-14isk
Searching for a free port for naming service: 2812 - OK
Searching Naming Service + found in 0.1 seconds
Searching /Kernel/Session in Naming Service +SALOME_Session_Server: error while loading shared libraries: libGLX.so.0: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "/media/sharat/DATA/Sunag/Niramai/SALOME-9.5.0/BINARIES-CO7/KERNEL/bin/salome/orbmodule.py", line 181, in waitNSPID
os.kill(thePID,0)
ProcessLookupError: [Errno 3] No such process

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/media/sharat/DATA/Sunag/Niramai/SALOME-9.5.0/BINARIES-CO7/KERNEL/bin/salome/runSalome.py", line 680, in useSalome
clt = startSalome(args, modules_list, modules_root_dir)
File "/media/sharat/DATA/Sunag/Niramai/SALOME-9.5.0/BINARIES-CO7/KERNEL/bin/salome/runSalome.py", line 625, in startSalome
session=clt.waitNSPID("/Kernel/Session",mySessionServ.PID,SALOME.Session)
File "/media/sharat/DATA/Sunag/Niramai/SALOME-9.5.0/BINARIES-CO7/KERNEL/bin/salome/orbmodule.py", line 183, in waitNSPID
raise RuntimeError("Process %d for %s not found" % (thePID,theName))
RuntimeError: Process 9726 for /Kernel/Session not found


--- Error during Salome launch ---
➜ SALOME-9.5.0 Warning, no type found for resource "localhost", using default value "single_machine"][/Error]




Could you provide me any light on this error?


Regards,


Sunag R A.
LOL, I was going to send you the link to a post in salome forum until I saw that it was your post ahahah.
emm... sorry, I am using salome in windows, but I would have a look at this guy, as he installed in linux mint and had to trouble shoot the problems... that I think are similar to yours, also you have a big explanation on how salome can be used (in case that it is not understandable from my file when you will be able to open...).
https://www.youtube.com/watch?v=mhzbiZ-wy68
one last coment about salome. you will have two different modules SHAPER and GEOMETRY almost all of us are using GEOMETRY to create the boundaries, as you dont know how to use any of the two I would recomend you to go with the SHAPER module as GEOMETRY will disapear in 2021.

good luck, and happy foaming
otaolafr is offline   Reply With Quote

Old   January 6, 2021, 02:24
Default
  #5
Member
 
Sunag R A
Join Date: Jul 2019
Location: Bangalore, India
Posts: 82
Rep Power: 7
sunagra27 is on a distinguished road
Thank you for the reply Franco..I did check the video of the link you sent tried to install Salome. But failed with same error.


I am still unable to clear the error and install Salome. I am in touch with Salome group and Linux forum. Hopefully, it will be solved asap.


Let me know if you get any leads.


Thanks and Regards,
Sunag R A.
sunagra27 is offline   Reply With Quote

Old   January 6, 2021, 04:24
Default
  #6
Senior Member
 
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 6
otaolafr is on a distinguished road
Quote:
Originally Posted by sunagra27 View Post
Thank you for the reply Franco..I did check the video of the link you sent tried to install Salome. But failed with same error.


I am still unable to clear the error and install Salome. I am in touch with Salome group and Linux forum. Hopefully, it will be solved asap.


Let me know if you get any leads.


Thanks and Regards,
Sunag R A.
what linux distribution are you using?
if ubuntu (or any debian distribution),
try from the terminal,
Code:
sudo apt-get update
sudo apt-get install net-tools
sudo apt-get install libtbb
best regards
otaolafr is offline   Reply With Quote

Reply

Tags
blockmesh, createpatch, cylinder, snappyhexmesh, toposet


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[mesh manipulation] createpatch not working when using layer addition in snappyHexMesh Dikkeunit OpenFOAM Meshing & Mesh Conversion 0 February 3, 2020 10:46
[Other] dynamicTopoFVMesh and pointDisplacement RandomUser OpenFOAM Meshing & Mesh Conversion 6 April 26, 2018 08:30
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 20:43
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) cfdonline2mohsen OpenFOAM 3 October 21, 2013 10:28
chtMultiRegionFoam Tutorial m.nichols19 OpenFOAM 12 September 9, 2010 12:56


All times are GMT -4. The time now is 16:49.