|
[Sponsors] |
[snappyHexMesh] Removes patches needed in boundary file |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 8, 2020, 15:00 |
Removes patches needed in boundary file
|
#1 |
New Member
Join Date: Jun 2020
Posts: 5
Rep Power: 6 |
Hello,
I am having some trouble with SnappyHexMesh removing several zero-sized patches. The patches I need are inlet and outlet, and I am unsure as to why they are zero sized, as I defined them firstly using Salome so they were different solids in the .stl file and then set the refinement levels to 1, as you can see below: Code:
/ castellatedMesh on; snap off; addLayers off; geometry { CAC { type triSurfaceMesh; file "CAC.stl"; regions { CAC {name Solid; } } } ChargeAir { type triSurfaceMesh; file "ChargeAir.stl"; regions { ChargeAir {name ChargeAir; } inlet {name inlet; } outlet {name outlet; } } } CoolAir { type triSurfaceMesh; file "CoolAir.stl"; /* regions*/ /* {*/ /* CoolAir { name CoolAir; }*/ /* }*/ } }; // ============================================================== CASTELLATION ============================================================== \\ castellatedMeshControls { MaxLocalCells 10000000; // Max number of cells per CPU core MaxGlobalCells 20000000; // Max number of cells to use before deletion minRefinementCells 0 ; // Allowable number of bad cells during refinement MaxLoadUnbalance 0.006; nCellsBetweenLevels 4; // expansion factor between high & low refinement zone allowFreeStandingZoneFaces false; features ( {file "CAC.eMesh"; levels ((1 1));} {file "ChargeAir.eMesh"; levels ((1 1));} {file "CoolAir.eMesh"; level 1;} ); refinementSurfaces { "CAC_*" { level (1 1); faceZone CAC; cellZone CAC; cellZoneInside inside; regions { Solid { level (1 1); patchInfo { type wall; } } } } "ChargeAir_*" { level (1 1); faceZone ChargeAir; cellZone ChargeAir; cellZoneInside inside; regions { inlet { level (1 1); patchInfo { type patch; } } outlet { level (1 1); patchInfo { type patch; } } ChargeAir { level (1 1); patchInfo { type wall; } } } } CoolAir { level (1 1); faceZone CoolAir; cellZone CoolAir; cellZoneInside inside; } } refinementRegions { } locationInMesh (0 0.02 0.02); resolveFeatureAngle 0; } When I run splitMeshRegions, I get a boundary file which looks like this: Code:
4 ( defaultFaces { type empty; inGroups List<word> 1(empty); nFaces 9693; startFace 1822857; } oldInternalFaces { type empty; inGroups List<word> 1(empty); nFaces 34081; startFace 1832550; } CAC_to_ChargeAir { type mappedWall; inGroups List<word> 1(wall); nFaces 741841; startFace 1866631; sampleMode nearestPatchFace; sampleRegion ChargeAir; samplePatch ChargeAir_to_CAC; } CAC_to_CoolAir { type mappedWall; inGroups List<word> 1(wall); nFaces 779779; startFace 2608472; sampleMode nearestPatchFace; sampleRegion CoolAir; samplePatch CoolAir_to_CAC; } ) // ************************************************************************* // Is there any way to get snappyHexMesh to keep the patches? Thanks in advance. ################################################## ###########Solution############################### ################################################## #: The .stl files must be separate, you can not have regions of Solid regionname to endsolid regionname, they must be individual stl files. It's quite easy to use Salome to do this and have a closed surface in the end. Cheers Last edited by SMDpel; September 10, 2020 at 20:09. Reason: FIXED PROBLEM FOR MULTIREGION MESHING |
|
September 9, 2020, 06:52 |
|
#2 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Hi!
Can you share your geometry and background mesh? And the resulted mesh boundary befor the splitMeshRegions? And also I guess you are looking at the wrong boundary file. You have your inlet/outlet in the chargeAir region (cellZone), but you are looking at the CAC region. |
|
September 9, 2020, 11:17 |
|
#3 |
New Member
Join Date: Jun 2020
Posts: 5
Rep Power: 6 |
Thanks for the reply!
Unfortunately, I cannot share the geometry as it's confidential. And yes, thank you for pointing that out; I was looking in the wrong boundary file. However, the boundary file for charge air is similar and missing the inlet and outlet: Code:
location "constant/ChargeAir/polyMesh"; object boundary; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 4 ( defaultFaces { type empty; inGroups List<word> 1(empty); nFaces 11865; startFace 10468674; } oldInternalFaces { type empty; inGroups List<word> 1(empty); nFaces 11801; startFace 10480539; } ChargeAir_to_CAC { type mappedWall; inGroups List<word> 1(wall); nFaces 741291; startFace 10492340; sampleMode nearestPatchFace; sampleRegion CAC; samplePatch CAC_to_ChargeAir; } ChargeAir_to_CoolAir { type mappedWall; inGroups List<word> 1(wall); nFaces 19477; startFace 11233631; sampleMode nearestPatchFace; sampleRegion CoolAir; samplePatch CoolAir_to_ChargeAir; } ) // ************************************************************************* // I think it's due to snappyHexMesh removing these zero sized patches, as seen here: Code:
Doing final balancing --------------------- Found 14580 zoned faces to keep together. Found 0 separated coupled faces to keep together. Removing zero-sized patches: Solid type wall at position 1 Solid_slave type wall at position 2 inlet type patch at position 3 inlet_slave type patch at position 4 outlet type patch at position 5 outlet_slave type patch at position 6 ChargeAir type wall at position 7 ChargeAir_slave type wall at position 8 CoolAir type wall at position 9 CoolAir_slave type wall at position 10 |
|
September 9, 2020, 11:31 |
|
#4 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Check If the patch is present but under a different name. The inlet and outlet patches are internals? So on the other side of the patches you have an another region? I guess it is since you have a zero sized patch called inlet and inlet_slave, also outlet and outlet_slave. So I think you have your patches (az least needed patch faces) but they will be in the chargeAir_to_CAC or in the chargeAir_to_CoolAir patches.
But it is pretty hard to tell blindly. I'm just guessing. |
|
September 9, 2020, 11:38 |
|
#5 |
New Member
Join Date: Jun 2020
Posts: 5
Rep Power: 6 |
Thank you!
I am sorry that you're having to guess blindly. Is there any way of checking inside a patch? I assumed because they're being deleted in snappyHexMesh that they would not appear anywhere. Should the patches be on the edge of my blockMesh? Or are they okay being inside? I should mention that this is a multiregion mesh I'm trying to produce. |
|
September 9, 2020, 12:20 |
|
#6 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Yes I figured it out that you have a multiRegion case. And I guess this is the source of your "problem". So in multi region if you have a patch (now inlet patch) between two regions, it won'T be called inlet. it will be in the "<sourceRegionName>_to_<targetRegionname>" patch. So the faces from the inlet patch will be moved to the "<sourceRegionName>_to_<targetRegionname>" patch and the inlet patch will be empty and snappy will delete it.
Open your resulted mesh in paraview and check the patches only (turn off the internal mesh) in the ChargeAir region. If you will see the faces which should be in the inlet patch, probably this will be your problem. |
|
September 9, 2020, 13:23 |
|
#7 |
New Member
Join Date: Jun 2020
Posts: 5
Rep Power: 6 |
Yeah, I see the faces that should be the inlet patch included in the "ChargeAir_to_.." patches.
Is there any way to stop this from happening? I don't really know of any other way, and I would really prefer to keep it all in snappyHexMesh. cheers |
|
September 9, 2020, 13:31 |
|
#8 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Probably there is, but honestly I have never did something like this. How can you have an inlet if in the neighbor region there is something? It seems impossible to me.
But if you check this: https://github.com/OpenFOAM/OpenFOAM...ppyHexMeshDict at line 199, you can change the faceType but as I mentioned I have never did something like this. It is still seems impossible to me in the physical world. |
|
September 9, 2020, 14:03 |
|
#9 |
New Member
Join Date: Jun 2020
Posts: 5
Rep Power: 6 |
Actually, in my model, there isn't a neighbour region: the inlet is on the boundary of the model, please see a limited view attached:
This is an stl file, but this is on the boundary of my domain, and should be fine? Last edited by SMDpel; September 9, 2020 at 14:04. Reason: Picture didn't load |
|
Tags |
multiregion, patches, zero-sized |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Tabulated thermophysicalProperties library | chriss85 | OpenFOAM Community Contributions | 62 | October 2, 2022 04:50 |
[swak4Foam] swak4foam for OpenFOAM 4.0 | mnikku | OpenFOAM Community Contributions | 80 | May 17, 2022 09:06 |
[swak4Foam] funkyDoCalc with OF2.3 massflow | NiFl | OpenFOAM Community Contributions | 14 | November 25, 2020 04:30 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |
ParaView Compilation | jakaranda | OpenFOAM Installation | 3 | October 27, 2008 12:46 |