|
[Sponsors] |
[snappyHexMesh] addLayers for a multiRegion mesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 12, 2020, 03:30 |
addLayers for a multiRegion mesh
|
#1 |
New Member
Francesca Mangani
Join Date: Oct 2019
Posts: 7
Rep Power: 6 |
Hi everybody,
I would like to understand if it is possible to add layers on a surface which is internal to the mesh. Infact I'm doing a mesh in order to use chtMultiRegionFoam, splitting it with splitMeshRegions. Therefore my boundaries are those of the block produced by the blockMesh, but I would like to add layers on the surface of my object, which is cointained in this block. I would be really grateful to those who can give me any hint! |
|
August 5, 2020, 12:49 |
|
#2 |
New Member
Sammy Breen
Join Date: Jul 2020
Posts: 4
Rep Power: 5 |
Greetings,
I have the same problem, did you find a solution? Thank you very much! |
|
August 5, 2020, 13:15 |
|
#3 |
New Member
Sammy Breen
Join Date: Jul 2020
Posts: 4
Rep Power: 5 |
Nevermind I found the solution.
You can use the region0_to_region1 patches. So for example if you have the regions heater and air you can use heater_to_air as a patch for addLayers. |
|
December 24, 2020, 07:59 |
|
#4 |
Senior Member
julien
Join Date: Dec 2018
Posts: 107
Rep Power: 7 |
Hello,
I try to mesh the interface between 2 regions with sHM. I try to do your way. But snappy told me that the interface fluid_to_solid is not defined in the log file. I tried to mesh only castellation and snap first, do a splitMeshRegions -cellZones -overwrite And mesh layers after that with no success. I see on the forum that one solution is to copy paste each mesh obtained with castellation and snap = true and mesh it again in constant/polymesh with layers = true. Repeat it for each regions. It is not very attractive, is there a more trivial way to do this? Best regards |
|
December 24, 2020, 08:20 |
|
#5 |
New Member
Sammy Breen
Join Date: Jul 2020
Posts: 4
Rep Power: 5 |
Hello,
I think you might have used the wrong patch name in your layers definition. I used the name of the patch interface between the fluid and solid region. Try looking up the name in paraview maybe. Hope i could help you and have nice holidays. |
|
December 27, 2020, 15:58 |
|
#6 |
Senior Member
julien
Join Date: Dec 2018
Posts: 107
Rep Power: 7 |
Hello,
Thank you for your answer. I am stuck since severals days on this. Why don't you use the standard refinementSurface ? You don't specify faceZone and faceZone? HTML Code:
refinementSurfaces { solid { // Surface-wise min and max refinement level level (2 2); regions { solid_fluid { level (3 3); } } faceZone solid; //insideFaces cellZone solid; //insideZone cellZoneInside inside; } fluid { // Surface-wise min and max refinement level level (0 0); faceZone fluid;//insideFaces cellZone fluid; //outsideZone cellZoneInside inside; } In my case I have a curved interface between solid and fluid regions, so I need to snap. I use the correct patch name fluid_to solid (patch name that it would be created with the splitMeshRegions -cellZones command. HTML Code:
addLayersControls { relativeSizes false; // Per final patch (so not geometry!) the layer information layers { fluid_to_solid { nSurfaceLayers 6; finalLayerThickness 1.05; } wall { nSurfaceLayers 6; finalLayerThickness 1.05; } } It seems that the mesh at the interface is not conform. The stl files are generated with Salome and are watertight and conform. Quote:
Have a nice Christmas Julien Last edited by julieng; December 27, 2020 at 16:02. Reason: bad image insertion |
|
December 27, 2020, 16:10 |
|
#7 |
Senior Member
julien
Join Date: Dec 2018
Posts: 107
Rep Power: 7 |
||
December 28, 2020, 03:59 |
|
#8 |
Senior Member
julien
Join Date: Dec 2018
Posts: 107
Rep Power: 7 |
Hello,
I found this post very close of mine. Trouble with snappy and boundary layers As in your example it is used a typo like this one to define the location in mesh without faceZone, cellZone, cellZoneInside, features locationsInMesh ( ((1.4 0.05 0.05) fluid) ((1.6 0.05 0.05) solid) ); The problem is that I have an error when I try this way: HTML Code:
--> FOAM FATAL IO ERROR: keyword locationInMesh is undefined in dictionary "C:/PROGRA~1/BLUECF~1/OFUSER~1/run/SNAPPY~1/CHCD7B~1/system/snappyHexMeshDict.castellatedMeshControls" file: C:/PROGRA~1/BLUECF~1/OFUSER~1/run/SNAPPY~1/CHCD7B~1/system/snappyHexMeshDict.castellatedMeshControls from line 98 to line 271. From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const in file db/dictionary/dictionary.C at line 566. FOAM exiting bluecfdcore Openfoam 5. What do you think? Julien |
|
December 28, 2020, 04:08 |
|
#9 |
Senior Member
julien
Join Date: Dec 2018
Posts: 107
Rep Power: 7 |
I see that this function is not implemented in the Openfoam fundation versions !!
Multiple meshed components missing Is there a possibility toadd layers at the interface solid-fluid with the foundation version of Openfoam ? Last edited by julieng; December 28, 2020 at 04:09. Reason: add link |
|
December 29, 2020, 07:51 |
|
#11 |
Senior Member
julien
Join Date: Dec 2018
Posts: 107
Rep Power: 7 |
Hello,
Thank you for your answer. I am looking for a "standard" procedure being able to mesh every cases I will test. Not only this geometry. Best regards |
|
December 29, 2020, 08:02 |
|
#12 |
Senior Member
julien
Join Date: Dec 2018
Posts: 107
Rep Power: 7 |
Can anyone tell me what is wrong with my typo of layer section, for calling the interface between fluid and solid in my snappyHexMeshDict file?
Last edited by julieng; December 29, 2020 at 08:03. Reason: bad wording |
|
December 29, 2020, 15:04 |
|
#13 |
Senior Member
julien
Join Date: Dec 2018
Posts: 107
Rep Power: 7 |
||
February 22, 2021, 14:43 |
|
#14 | |
New Member
Christian
Join Date: Dec 2019
Posts: 3
Rep Power: 6 |
Quote:
Hello julieng, nice to hear you could solve the problem. Could you sum up the successful workflow? Because i'm in the same position like you at the beginning and i followed your steps but still can't get layers at the interface area. Here's my workflow. 1. use sHM with castellatedMesh and snap both "true", addLayers is "false" 2. use "splitMeshRegions -cellZones -overwrite" 3. use sHM with castellatedMesh and snap both "false" and addLayers "true" but there're still no layers at the interface. I'm using OpenFoam 8. With kind regards Christian |
||
May 26, 2021, 14:15 |
|
#15 |
New Member
Milton Keynes
Join Date: Feb 2021
Posts: 1
Rep Power: 0 |
I am having same issue and still no success copying files from fluid region to contact/polymesh and setting addlayers to true and the other two to false. I have given the right name of the created interface patch to the addlayercontrols section of snappyhexmesh, but still nothing. Someone could explain the right steps to solve it? Many thanks
|
|
September 8, 2021, 07:14 |
Workflow
|
#16 |
New Member
Aaron Endres
Join Date: Jun 2016
Posts: 12
Rep Power: 9 |
Hi,
this is a workflow, which worked for me in OpenFoam 9: Code:
blockMesh foamDictionary -entry "castellatedMesh" -set "true" system/snappyHexMeshDict foamDictionary -entry "snap" -set "true" system/snappyHexMeshDict foamDictionary -entry "addLayers" -set "false" system/snappyHexMeshDict snappyHexMesh -overwrite splitMeshRegions -cellZones -overwrite rm -r constant/polyMesh foamDictionary -entry "castellatedMesh" -set "false" system/snappyHexMeshDict foamDictionary -entry "snap" -set "false" system/snappyHexMeshDict foamDictionary -entry "addLayers" -set "true" system/snappyHexMeshDict echo 'snappyHexMesh: coolant layers' mv constant/coolant/polyMesh constant snappyHexMesh -overwrite mv constant/polyMesh constant/coolant echo 'snappyHexMesh: metal layers' mv constant/metal/polyMesh constant snappyHexMesh -overwrite mv constant/polyMesh constant/metal Code:
addLayersControls { relativeSizes true; minThickness 1e-10; finalLayerThickness 0.67; expansionRatio 1.5; layers { metal_to_coolant { nSurfaceLayers 2; } coolant_to_metal { nSurfaceLayers 2; } } } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] SnappyHexMesh/splitMeshRegion : region1 in zone "-1" | GuiMagyar | OpenFOAM Meshing & Mesh Conversion | 3 | August 4, 2023 12:38 |
[snappyHexMesh] Add Mesh Layers doesnt work on the whole surface | Kryo | OpenFOAM Meshing & Mesh Conversion | 13 | February 17, 2022 07:34 |
[snappyHexMesh] snappyHexMesh does not create any mesh except one for the reference cell | Arman_N | OpenFOAM Meshing & Mesh Conversion | 1 | May 20, 2019 17:16 |
[snappyHexMesh] Creating multiple multiple cell zones with snappyHexMesh - a newbie in deep water! | divergence | OpenFOAM Meshing & Mesh Conversion | 0 | January 23, 2019 04:17 |
[snappyHexMesh] SnappyHexMesh no layers and no decent mesh for complex geometry | pizzaspinate | OpenFOAM Meshing & Mesh Conversion | 1 | February 25, 2015 07:05 |