|
[Sponsors] |
![]() |
![]() |
#1 |
Senior Member
Carlo_P
Join Date: May 2019
Location: Italy
Posts: 176
Rep Power: 8 ![]() |
Hey Guys,
I have a problem... I would like to simulate a liquid (air) that is coming inside a metal block. See the first picture. I would like to use chtMultiRegionFoam. I have a problem in the mesh, sicne I would like to create two region, using snappyHexMesh. For the moment, I created the two stl file and put in triSurface. Then I created the blockMesh..bigger than the metalblock. In the snappy I linkd the two stl but I'm have a problem to identify them. Whre I to put the point inside? Should be inside all the geometry? BlockMeshDict Code:
xMinGeo -0.0421 ; xMaxGeo 0.0579; yMinGeo -0.168923; yMaxGeo 0.0310771; zMinGeo -0.121122; zMaxGeo 0.173878; xMin #calc "$xMinGeo-0.05"; xMax #calc "$xMaxGeo+0.05"; yMin #calc "$yMinGeo-0.05"; yMax #calc "$yMaxGeo+0.05"; zMin #calc "$zMinGeo-0.05"; zMax #calc "$zMaxGeo+0.05"; deltax 0.01; deltay 0.01; deltaz 0.01; lx #calc "$xMax - $xMin"; ly #calc "$yMax - $yMin"; lz #calc "$zMax - $zMin"; xcells #calc "round($lx/$deltax)"; ycells #calc "round($ly/$deltay)"; zcells #calc "round($lz/$deltaz)"; vertices ( ($xMin $yMin $zMin) // 0 ($xMax $yMin $zMin) // 1 ($xMax $yMax $zMin) // 2 ($xMin $yMax $zMin) // 3 ($xMin $yMin $zMax) // 4 ($xMax $yMin $zMax) // 5 ($xMax $yMax $zMax) // 6 ($xMin $yMax $zMax) // 7 ); blocks ( hex (0 1 2 3 4 5 6 7) ($xcells $ycells $zcells) simpleGrading (1 1 1) ); edges ( ); boundary ( Inlet_1 { type wall; faces ( (0 4 7 3) ); } Outlet_2 { type wall; faces ( (2 6 5 1) ); } Wall_3 { type wall; faces ( (4 5 6 7) ); } Wall_4 { type wall; faces ( (0 3 2 1) ); } Inlet_4 { type wall; faces ( (1 5 4 0) ); } Outlet_5 { type wall; faces ( (3 7 6 2) ); } ); Sanppy: Code:
FoamFile { version 2.0; format ascii; class dictionary; location system; object snappyHexMeshDict; } castellatedMesh true; snap true; addLayers off; geometry { Stampo { type triSurfaceMesh; file "geo.stl"; regions { Res1 { name Res1; } Res2 { name Res2; } Res3 { name Res3; } Res4 { name Res4; } Fronte { name Fronte; } Retro { name Retro; } Box { name Box; } Blocco { name Blocco; } } } Fluido { type triSurfaceMesh; file "fluido.stl"; regions { Inlet_1 { name Inlet1; } Inlet_2 { name Inlet2; } Outlet_1 { name Outlet1; } Outelt_2 { name Outlet2; } Blocco { name Blocco; } } } } castellatedMeshControls { features ( { file "geo.eMesh"; levels ((0.001 2)); refineFeatureEdgesOnly false; } { file "fluido.eMesh"; levels ((0.001 2)); refineFeatureEdgesOnly false; } ); refinementSurfaces { Stampo { level (2 2); regions { Res1 { level (2 2); patchInfo { type wall; } } Res2 { level (2 2); patchInfo { type wall; } } Res3 { level (2 2); patchInfo { type wall; } } Res4 { level (2 2); patchInfo { type wall; } } Blocco { level (5 6); patchInfo { type wall; } } Fronte { level (2 2); patchInfo { type wall; } } Retro { level (2 2); patchInfo { type wall; } } Box { level (1 2); patchInfo { type wall; } } } //faceZone fluidToMetal; cellZone Stampo; cellZoneInside insidePoint; insidePoint (-0.03 -0.15 0.16); //this point is inside the metal geometry but outside the fluid one. //(-0.0421 -0.168923 -0.121122) (0.0579 0.0310771 0.173878) //(-0.00826 -0.0979466 -0.121122) (0.00488 -0.0439466 0.173878) } Fluido { level (2 2); regions { Inlet1 { level (2 2); patchInfo { type patch; } } Inlet2 { level (2 2); patchInfo { type patch; } } Outlet1 { level (2 2); patchInfo { type patch; } } Outlet2 { level (2 2); patchInfo { type patch; } } Blocco { level (5 6); patchInfo { type wall; } } } faceZone fluidToMetal; cellZone Fluido; cellZoneInside inside; //insidePoint (0.001 -0.0525005 0.001); //(-0.00826 -0.0979466 -0.121122) (0.00488 -0.0439466 0.173878) } } refinementRegions { } //(-0.075 -0.1 -7.06971e-015) (0.075 0.1 0.306854) locationInMesh (0.001 -0.0525005 0.001); //this point is inside the fluid, but outside the metal maxLocalCells 100000; maxGlobalCells 2000000; minRefinementCells 0; nCellsBetweenLevels 2; resolveFeatureAngle 5; allowFreeStandingZoneFaces true; planarAngle 30.0; maxLoadUnbalance 0.1; } snapControls { nSolveIter 3; nSmoothPatch 3; tolerance 0.5; nRelaxIter 3; nFeatureSnapIter 3; implicitFeatureSnap false; explicitFeatureSnap true; multiRegionFeatureSnap false; } addLayersControls { layers { Body { nSurfaceLayers 3; expansionRatio 1.25; finalLayerThickness 0.8; } } relativeSizes true; expansionRatio 1.1; finalLayerThickness 0.8; minThickness 0.25; nGrow 0; featureAngle 130.0; slipFeatureAngle 30.0; nRelaxIter 10; nSmoothSurfaceNormals 1; nSmoothNormals 3; nSmoothThickness 5; maxFaceThicknessRatio 0.5; maxThicknessToMedialRatio 0.3; minMedialAxisAngle 90; nBufferCellsNoExtrude 0; nLayerIter 3; nRelaxedIter 3; } /*meshQualityControls { maxNonOrtho 65.0; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80.0; minFlatness 0.5; minVol 1.0E-13; minTetQuality 1.0E-15; minArea -1.0; minTwist 0.02; minDeterminant 0.001; minFaceWeight 0.05; minVolRatio 0.01; minTriangleTwist -1.0; nSmoothScale 4; errorReduction 0.75; relaxed { maxNonOrtho 75; // minVol 1.0E-20; }*/ meshQualityControls { maxNonOrtho 65.0; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80.0; minFlatness 0.5; minVol -1.0E-30; minTetQuality 1.0E-15; minArea -1.0; minTwist 0.02; minDeterminant 0.001; minFaceWeight 0.05; minVolRatio 0.01; minTriangleTwist -1.0; nSmoothScale 4; errorReduction 0.75; relaxed { maxNonOrtho 75; minVol -1.E-30; } } debug 0; mergeTolerance 1.0E-5; autoBlockMesh false; |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 07:38 |
Star CCM Overset Mesh Error (Rotating Turbine) | thezack | Siemens | 7 | October 12, 2016 11:14 |
[ICEM] surface mesh merging problem | everest | ANSYS Meshing & Geometry | 44 | April 14, 2016 06:41 |
[ICEM] Problem making structural mesh on a surface | froztbear | ANSYS Meshing & Geometry | 1 | November 10, 2011 08:52 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 21:11 |