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

[snappyHexMesh] Multiregion Snappy Hex Mesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 8, 2023, 11:58
Default Multiregion Snappy Hex Mesh
  #1
New Member
 
Rachele Zamboni
Join Date: Feb 2023
Posts: 3
Rep Power: 3
rachele is on a distinguished road
Hello everyone, I am working on a multi-region mesh with SHM to define different components of an electric motor. Some of the stl are correctly turned into cellZone as required in the code, other instead do not produce cellZone but only faceZone. All stl used are closed surfaces controlled with surfaceCheck. I can't share the stl but following I report the snappy hex mesh dict.

Is there any constrains that I should respect in the cellZone definition like order of definition? I have tried also whit the definition of the inside point, solution that works for surface_in cell zone but for example not for shaft_cooling_duct for example.

I dont understand why just some of them is correctly defined. If some has any suggestion it will be appreciated. Thanks.


geometry
{
surface_out
{
type triSurfaceMesh;
file "surface_out.stl";

}

surface_in
{
type triSurfaceMesh;
file "surface_in.stl";

}

cooling_channels
{
type triSurfaceMesh;
file "cooling_channels.stl";

}

cooling_shaft
{
type triSurfaceMesh;
file "cooling_shaft.stl";

}

shaft
{
type triSurfaceMesh;
file "shaft.stl";

}

shaft_cooling_duct
{
type triSurfaceMesh;
file "shaft_cooling_duct.stl";

}

shaft_cooling_flow
{
type triSurfaceMesh;
file "shaft_cooling_flow.stl";

}

rotor_component_1
{
type triSurfaceMesh;
file "rotor_component_1.stl";

}

rotor_component_2
{
type triSurfaceMesh;
file "rotor_component_2.stl";

}

rotor_windings
{
type triSurfaceMesh;
file "rotor_windings.stl";

}

hole_shaft
{
type triSurfaceMesh;
file "hole_shaft.stl";

}

external_duct
{
type triSurfaceMesh;
file "external_duct.stl";

}




};

castellatedMeshControls
{
maxLocalCells 1000000000;
maxGlobalCells 2000000000;
minRefinementCells 0;
maxLoadUnbalance 0.10;
nCellsBetweenLevels 4;

features
(

{
file "surface_out.eMesh";
level 3;
}

{
file "surface_in.eMesh";
level 3;
}

{
file "cooling_channels.eMesh";
level 4;
}

{
file "cooling_shaft.eMesh";
level 4;
}

{
file "shaft.eMesh";
level 4;
}

{
file "shaft_cooling_duct.eMesh";
level 5;
}

{
file "shaft_cooling_flow.eMesh";
level 5;
}

{
file "rotor_component_1.eMesh";
level 2;
}

{
file "rotor_component_2.eMesh";
level 2;
}

{
file "rotor_windings.eMesh";
level 4;
}

{
file "hole_shaft.eMesh";
level 2;
}

{
file "external_duct.eMesh";
level 2;
}
);


refinementSurfaces
{
surface_out // rimuovere celle esterne
{
level (3 3);
}

external_duct
{
level (2 2);
}

surface_external
{
level (2 2);
faceZone surface_out_surface;
cellZone surface_out;
mode inside;
}

external_duct_zone //definizione cellzone dello spessore del guscio motore
{
level (3 3);
faceZone external_duct_surface;
cellZone external_duct;
mode inside;
}

surface_in
{
level (3 3);
faceZone internal_surface;
cellZone internal;
cellZoneInside insidePoint;
insidePoint (10 57 -109);
}

cooling_channels
{
level (5 5);
faceZone cooling_channels_surface;
cellZone cooling_channels;
mode inside;

}

cooling_shaft
{
level (5 5);
faceZone cooling_shaft_surface;
cellZone cooling_shaft;
mode inside;

}

rotor_component_1 //cilindro
{
level (2 2);
faceZone rotor_component_1_surface;
cellZone rotor_component_1;
mode inside;

}

rotor_component_2 //cilindro dentro il quale ci sono gli avvolgimenti
{
level (2 2);
faceZone rotor_component_2_surface;
cellZone rotor_component_2;
mode inside;

}

shaft
{
level (3 3);
faceZone shaft_surface;
cellZone shaft;
mode inside;
}

shaft_cooling_duct
{
level (5 5);
faceZone shaft_cooling_duct_surface;
cellZone shaft_cooling_duct;
cellZoneInside insidePoint;
insidePoint (0.5 0 0);

}

shaft_cooling_flow
{
level (2 2);
faceZone shaft_cooling_flow_surface;
cellZone shaft_cooling_flow;
mode inside;
}

rotor_windings
{
level (4 4);
faceZone rotor_windings _surface;
cellZone rotor_windings ;
mode inside;
}

hole_shaft
{
level (2 2);
faceZone hole_shaft_surface;
cellZone hole_shaft;
mode inside;
}


}

refinementRegions
{

}


locationInMesh (5 37 43);

resolveFeatureAngle 5;

}

// Settings for the snapping.
snapControls
{

nSmoothPatch 3;
tolerance 4.0;
nSolveIter 300;
nRelaxIter 5;
nFeatureSnapIter 10;
implicitFeatureSnap false;
explicitFeatureSnap true;
multiRegionFeatureSnap true;

}
rachele is offline   Reply With Quote

Old   February 21, 2023, 04:09
Default
  #2
Senior Member
 
Nico
Join Date: Jan 2022
Location: Germany
Posts: 122
Rep Power: 6
Hr_kules is on a distinguished road
there probably is a right answer to that, but i wasted 3/4 of year trying to understand multiregion meshing in snappyHexMesh. If you are willing to try, i would investigate the heated duct tutorial for chtMultiregionFoam. However, if your application must be done with more cellZones i would probably switch to gmsh. It is quite easy to learn and i haven't done a multi region mesh with gmsh that wasn't good.
Hr_kules is offline   Reply With Quote

Old   February 21, 2023, 05:04
Default
  #3
Senior Member
 
M
Join Date: Dec 2017
Posts: 642
Rep Power: 12
AtoHM is on a distinguished road
Only thing that sticks out to me is that you sometimes use insidePoint and sometimes use inside for cellZoneInside.
Honestly, I never used insidePoint and do not know what purpose it serves as inside worked fine in any case I meshed. Could be a thing relating to ESI/Foundation divergence?
AtoHM is offline   Reply With Quote

Reply


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
[OpenFOAM] Error !! No. of points and fields don't match mkjmalik ParaView 4 November 2, 2019 10:37
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 09:38
[Other] mergeMatchPairs with arcs vainilreb OpenFOAM Meshing & Mesh Conversion 1 August 5, 2013 08:11
[snappyHexMesh] Pure hex mesh with snappy alf23 OpenFOAM Meshing & Mesh Conversion 17 February 17, 2013 14:24
[snappyHexMesh] Snappy Hex Mesh problems likefry OpenFOAM Meshing & Mesh Conversion 3 September 22, 2011 06:49


All times are GMT -4. The time now is 12:02.