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

[snappyHexMesh] snappyHexMesh for multiregion mehsing

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 10, 2022, 12:41
Default snappyHexMesh for multiregion mehsing
  #1
Member
 
Richardpluff
Join Date: May 2014
Posts: 95
Rep Power: 11
CRI_CFD is on a distinguished road
Dear all,


I have a question regarding snappy (I am using OF9 and fe41).


I have two stl files (let's say block.stl and tool.stl) that are in contact, but I do not know the contact region in advance, that is, I do not have a interface.stl with the surface both stl are sharing.


I need to do a linear elastic computation, with 2 materials (one material per region, that is, per stl) and a contact model at interface between regions.


I read a thousand times multiregion tutorial, but, in my case, interface is never generated (or at least, kept as a patch). I can create the mesh, using setSet create the two regions I need and then by using splitMeshRegions I can divide the mesh into two mesh regions (folders are created, with mappedwalls). But the "global mesh" in constant/polyMesh does not include this interface region.


As a result, when I apply my BCs (in this case, define the contact model) OpenFOAM is unable to find it (no information is giving about the contact model used in runtime), and the simulation crashes after a few iterations. Also, if I import the .foam into Paraview, I can see the regions, but only the global mesh is populated with numerical values (sigma, epsilon, materials...), none of the mesh regions alone are containing the computed values.


What am I doing wrong?

-Is there a way to preserve the interface during snappyHexMesh stage so we can assign a BC (contact) later?

-Or is it mandatory to have a separated stl for that region (for example, I used surfaceBooleanFeatures to extract the intersection between block and tool and then I have included it within the snappyHexMeshDict as a interface.obj in the "regions" section, but interface dissapear from constant/boundary once again)?
-If I delete manually the polyMesh folder (the original one) and keep only the block and tool folders with the result of splitMeshRegions, simulations gives an error. Sounds weird, as mesh has been split into two regions and I supposed the solver will be reading those folders instead of the original polyMesh folder...
-Is there anyway to specify here, when I am meshing all regions (after blockMesh) to keep the interface as a patch?


block
{
level (7 8);
faceZone block;
cellZone block;
mode insidePoint;
insidePoint (-8.025578855102347 -48.471215758782186 87.70237538881355);
}


All the tutorials I have found on the internet have split the mesh regions using splitMeshRegions, but they also have the interface regions within the constant/polyMesh/boundary file



Any help will be really appreacciated. I can share my case if it helps.


I guess snappy is creating the interface in runtime (as it is included as a mappedWall after splitMeshRegions) but for any reason, it doesn't work when I try to establish the contact in 0/U file


Many thanks foamers
CRI_CFD is offline   Reply With Quote

Old   May 11, 2022, 03:24
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,049
Rep Power: 26
Yann will become famous soon enough
Hi,

I am not sure what solver you are using, but AFAIK for standard solvers splitMeshRegions is only used with chtMultiRegionFoam.

We usually mesh the whole domain with snappyHexMesh, each region being defined as a cellZone. Then splitMeshRegions is used to split the mesh into separate regions, and it creates the interfaces between regions (mappedWalls). As you have already seen, these region meshes are written in separate folders (e.g. constant/regionName1/polyMesh). The global mesh in constant/polyMesh remains unchanged.

chtMultiRegionFoam solves each regions using the region meshes. The global mesh in constant/polyMesh is not used by the solver and can be deleted.

This is not really solving your issue but I hope it brings some information you might use to sort this out.

Yann
Yann is offline   Reply With Quote

Old   May 11, 2022, 08:39
Default
  #3
Member
 
Richardpluff
Join Date: May 2014
Posts: 95
Rep Power: 11
CRI_CFD is on a distinguished road
Hi Yann,

Thanks for your reply.

I agree in the folders' creation, but at least the solvers I am testing (elasticSolidFoam, solids4foam...) are failing (solver explodes after a few iterations) and I guess it is related to the fact that contacts are not being recognized (execution log never displays info about contact types and parameters). Also when I switch to Paraview, only former "internal" region is populated with numerical values, but the same fileds are unavailable per each internal mesh region, so I suppose the mesh being used is not the one created by splitMeshRegions.

For my case, regions' separation and interface creation is essential (mechanical response of a multi-domain, multi-material with contacts).

Just to remark that, if I remove the polyMesh folder, solver doesn't run (asks for "point" file, and in general, for files included within contant/polyMesh folder)

The tutorials I have found:
1. use blockMesh to create regions andf interfaces
2. they have an interface defined by an stl and after that they go through the snappy+setSet+splitMeshRegions procdure, but the interface can be seen in constant/polyMesh/boundary)

Thanks for the tips you can provide...
CRI_CFD is offline   Reply With Quote

Old   May 11, 2022, 09:07
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,049
Rep Power: 26
Yann will become famous soon enough
I am afraid I cannot be very helpful since I never used these solvers. I might be unaware of some solver-specific features or workflow.

Maybe you can post the tutorials you are referring to? This might help to get a grasp on the workflow for these solvers.

Yann
Yann is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[CAD formats] Creating waterproof STL using snappyHexMesh or salome Tobi OpenFOAM Meshing & Mesh Conversion 58 May 13, 2020 06:01
[snappyHexMesh] Running snappyHexMesh in parallel - optimizing peterhess OpenFOAM Meshing & Mesh Conversion 2 January 3, 2018 02:54
[snappyHexMesh] Tutorial crashes: snappyHexMesh floating point exception. jasv OpenFOAM Meshing & Mesh Conversion 4 May 10, 2016 02:55
[snappyHexMesh] snappyhexmesh doesn't creat mesh in parallel issue? klausb OpenFOAM Meshing & Mesh Conversion 1 March 7, 2015 11:55
[snappyHexMesh] stitchMesh and snappyHexMesh gdbaldw OpenFOAM Meshing & Mesh Conversion 0 December 23, 2009 02:09


All times are GMT -4. The time now is 20:50.