|
[Sponsors] |
[snappyHexMesh] Multi region snapping doesn't work |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 11, 2022, 08:14 |
Multi region snapping doesn't work
|
#1 |
Senior Member
Nico
Join Date: Jan 2022
Location: Germany
Posts: 122
Rep Power: 6 |
Hey all,
i have a geometry of a plate with an angular step and and surrounding fluid volume. The stls were created in python because i exporting them from Ansys led to certain points not matching each other. The stls themself are attached. The result of running snappyHexMesh are also attached. At first they look somewhat okay, but i get 26 wrong faces due to orthogonality. Also the boundaries are a complete mess after spliting the mesh: boundaries fluid: Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 9 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { format ascii; class polyBoundaryMesh; location "constant/fluidcold/polyMesh"; object boundary; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 3 ( wallfluidcold { type wall; inGroups List<word> 1(wall); nFaces 108; startFace 3581709; } wallsolid { type wall; inGroups List<word> 1(wall); nFaces 199224; startFace 3581817; } fluidcold_to_solid { type mappedWall; inGroups List<word> 3 ( wall mappedPatch baffles1 ) ; nFaces 195024; startFace 3781041; sampleMode nearestPatchFace; sampleRegion solid; samplePatch solid_to_fluidcold; } ) // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 9 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { format ascii; class polyBoundaryMesh; location "constant/solid/polyMesh"; object boundary; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 4 ( inletcold { type patch; nFaces 80283; startFace 6892163; } outletcold { type patch; nFaces 80284; startFace 6972446; } wallfluidcold { type wall; inGroups List<word> 1(wall); nFaces 217620; startFace 7052730; } solid_to_fluidcold { type mappedWall; inGroups List<word> 3 ( wall mappedPatch baffles1 ) ; nFaces 195024; startFace 7270350; sampleMode nearestPatchFace; sampleRegion fluidcold; samplePatch fluidcold_to_solid; } ) // ************************************************************************* // Code:
#!/bin/sh cd "${0%/*}" || exit 1 # run from this directory #Color for messages GREEN='\e[0;32m' NC='\e[0m' echo "${GREEN}create background mesh$NC" blockMesh > meshLog echo "${GREEN}create edge mesh$NC" surfaceFeatures >> meshLog echo "${GREEN}run snappyHexMesh$NC" snappyHexMesh -overwrite >> meshLog echo "${GREEN}create baffles for interface$NC" createBaffles -overwrite >> meshLog echo "${GREEN}split mesh along interface$NC" splitMeshRegions -cellZones -defaultRegionName solid -overwrite >> meshLog echo "${GREEN}create singles files for paraFoam$NC" paraFoam -touchAll Thank you! |
|
May 13, 2022, 05:09 |
|
#2 | |
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 15 |
Hi,
Can you explain what you mean by Quote:
If you see the interface, they seem to have the same number of faces. So in that sense they match up. Also, you mention that the mesh quality is not good? Can you post the output of checkMesh as well as the snappyHexMeshDict that you used? Hope this helps. Cheers, Antimony |
||
May 13, 2022, 05:26 |
|
#3 |
Senior Member
Nico
Join Date: Jan 2022
Location: Germany
Posts: 122
Rep Power: 6 |
Hey,
yes i can explain; so for the region fluidcold i want following boundaries as specified in my stl: -inletcold -outletcold -wallfluidcold -fluidcold_to_solid and for the solid region: -wallsolid -solid_to_fluidcold in the code snippets the boundaries appear more then once for each region as well as that in and outlet are somehow in the solid region. I have attached the snappyhexmeshdict and the log of all mesh operations. The checkMesh run is the last entry in the log. Thank you! |
|
May 17, 2022, 06:33 |
|
#4 |
Senior Member
Nico
Join Date: Jan 2022
Location: Germany
Posts: 122
Rep Power: 6 |
Hi Antimony,
have you had any chance to llok in the uploaded files? I would really appreciate some guidance considering my problems. Thank you and have a nice day, Nico |
|
May 18, 2022, 04:17 |
|
#5 |
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 15 |
Hi,
I took a quick look. Seems like you are getting 2 regions which is inline with what you want. And the mesh quality is fine. The 26 faces are marginally beyond the default value of 65 deg, so that really should not be causing any issues. Unfortunately, at the moment it isn't clear where the issue is. Given that you have multiple STLs + baffles, it is difficult to pinpoint without being able to see the case... Have you looked at the conjugate heat transfer tutorial cases as a guide to setting up multiple region simulations? Cheers, Antimony |
|
May 18, 2022, 04:53 |
|
#6 |
Senior Member
Nico
Join Date: Jan 2022
Location: Germany
Posts: 122
Rep Power: 6 |
Hey,
if it helps, i have attached to full case. My main concern is the assignment of the boundaries after spliting the mesh. I have looked up the tutorials before starting this case, especially the shell and tube heat exchanger example. I am somewhat confused why the assignment of the boundaries works there considering the geometry of a shell and tube heat exchanger is quite a bit more complex then two blocks with a chevron step on it. Thank you and have a nice day! |
|
June 21, 2022, 06:26 |
|
#7 |
Senior Member
Nico
Join Date: Jan 2022
Location: Germany
Posts: 122
Rep Power: 6 |
Hi,
i know this is a bit late, but i could pin point the problem considering the multiregion meshing. It seems like the cellZones are not assigned to right region. However i have no idea how to fix this.. Maybe you see this and can enlighten me? |
|
January 19, 2024, 07:11 |
|
#8 | |
New Member
Join Date: Apr 2023
Posts: 1
Rep Power: 0 |
Quote:
I'm currently facing the same problem with the boundaries, were you able to fix it, and if yes how did you do it? Thanks you |
||
January 19, 2024, 07:13 |
|
#9 |
Senior Member
Nico
Join Date: Jan 2022
Location: Germany
Posts: 122
Rep Power: 6 |
Hi, i was unfortunately never able to solve the problem. My conclusion was to not use snappyHexMesh for multi region meshes ever again. I changed to Salome for more complex meshes; easy meshes i have done with GMSH.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Negative initial temperature error (chtMultiRegionFoam) | jebin | OpenFOAM Pre-Processing | 60 | July 17, 2022 05:10 |
[mesh manipulation] Importing Multiple Meshes | thomasnwalshiii | OpenFOAM Meshing & Mesh Conversion | 18 | December 19, 2015 18:57 |
[snappyHexMesh] Multi Region Meshing | bruce | OpenFOAM Meshing & Mesh Conversion | 12 | July 31, 2013 10:09 |
[Commercial meshers] Using starToFoam | clo | OpenFOAM Meshing & Mesh Conversion | 33 | September 26, 2012 04:04 |
[snappyHexMesh] multi region with snappyHexMesh | vikthor | OpenFOAM Meshing & Mesh Conversion | 0 | August 24, 2012 03:47 |