CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Meshing in CFD

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 8, 2022, 14:07
Default Meshing in CFD
  #1
Member
 
West Midlands
Join Date: Aug 2022
Posts: 62
Rep Power: 3
R786 is on a distinguished road
I have been trying to mesh using snappy Hex Mesh however i keep getting errors in my meshing which read as follows: what can be the reason for this.
AM Warning :
From Foam::triFace Foam::tetIndices::faceTriIs(const Foam:olyMesh&, bool) const
in file /usr/src/packages/BUILD/src/OpenFOAM/lnInclude/tetIndicesI.H at line 85
No base point for face 11464343, 4(3876022 3876023 3876222 3876221), produces a valid tet decomposition.
--> FOAM Warning :
From Foam::triFace Foam::tetIndices::faceTriIs(const Foam:olyMesh&, bool) const
in file /usr/src/packages/BUILD/src/OpenFOAM/lnInclude/tetIndicesI.H at line 85
No base point for face 11464343, 4(3876022 3876023 3876222 3876221), produces a valid tet decomposition.
--> FOAM Warning :
R786 is offline   Reply With Quote

Old   August 9, 2022, 03:50
Default
  #2
Senior Member
 
calim_cfd's Avatar
 
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 17
calim_cfd is on a distinguished road
Hi,

Try one of the meshing tutorials inside the tutorial folder which deals with the snappyhexmesh, and go from there.

Regarding your error, have you created a base blockMesh?

Good luck
__________________
Best Regards
/calim

"Elune will grant us the strength"
calim_cfd is offline   Reply With Quote

Old   August 9, 2022, 07:32
Default blockmesh
  #3
Member
 
West Midlands
Join Date: Aug 2022
Posts: 62
Rep Power: 3
R786 is on a distinguished road
Yes i created a base BlockMesh however i do not understand how to make this thinner here are the details, how can i make this thinner, this is the blockMeshdict
convertToMeters 1;

vertices
(
( 0.0 0.0 0.0 )
( 50.0 0.0 0.0 )
( 50.0 50.0 0.0 )
( 0.0 50.0 0.0 )
( 0.0 0.0 3.0 )
( 50.0 0.0 3.0 )
( 50.0 50.0 3.0 )
( 50.0 50.0 3.0 )
);

blocks
(
hex (0 1 2 3 4 5 6 7) (198 150 128) simpleGrading (1 1 1)
//hex (0 1 2 3 4 5 6 7) (96 64 64) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
world
{
type patch;
faces
(
(3 7 6 2)
(0 4 7 3)
(2 6 5 1)
(1 5 4 0)
(0 3 2 1)
(4 5 6 7)
);
}
);
R786 is offline   Reply With Quote

Old   August 9, 2022, 11:35
Default
  #4
Senior Member
 
calim_cfd's Avatar
 
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 17
calim_cfd is on a distinguished road
Quote:
Originally Posted by R786 View Post
Yes i created a base BlockMesh however i do not understand how to make this thinner here are the details, how can i make this thinner, this is the blockMeshdict
convertToMeters 1;

vertices
(
( 0.0 0.0 0.0 )
( 50.0 0.0 0.0 )
( 50.0 50.0 0.0 )
( 0.0 50.0 0.0 )
( 0.0 0.0 3.0 )
( 50.0 0.0 3.0 )
( 50.0 50.0 3.0 )
( 50.0 50.0 3.0 )
);

blocks
(
hex (0 1 2 3 4 5 6 7) (198 150 128) simpleGrading (1 1 1)
//hex (0 1 2 3 4 5 6 7) (96 64 64) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
world
{
type patch;
faces
(
(3 7 6 2)
(0 4 7 3)
(2 6 5 1)
(1 5 4 0)
(0 3 2 1)
(4 5 6 7)
);
}
);

to make the element smaller, you can increase these values "(198 150 128)".. now, i don't know if that's the source of your problem.. i thought that maybe you could not know that you gotta run the command "blockMesh" before the "snappyHexMesh"..
__________________
Best Regards
/calim

"Elune will grant us the strength"
calim_cfd is offline   Reply With Quote

Old   August 9, 2022, 11:47
Default
  #5
Member
 
West Midlands
Join Date: Aug 2022
Posts: 62
Rep Power: 3
R786 is on a distinguished road
Actually i know, its blockMesh then snappyHexMesh, now the issue i see is that my geometry has a box that measures 50 m by 50 m by 3 m and then has a person inside of this box this person is 1.75 meters so inside the blockmeshdict do these vertices need to comply by the outside box size ? I hope i am right here in keeping the values below, if anyone can help me here will be great.
convertToMeters 1;

vertices
(
( 0.0 0.0 0.0 )
( 50.20 0.0 0.0 )
( 50.20 50.20 0.0 )
( 0.0 50.20 0.0 )
( 0.0 0.0 3.1 )
( 50.2 0.0 3.1 )
( 50.2 50.2 3.1 )
( 0.0 50 3.1 )
);

blocks
(
hex (0 1 2 3 4 5 6 7) (200 200 200) simpleGrading (1 1 1)
//hex (0 1 2 3 4 5 6 7) (96 64 64) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
world
{
type patch;
faces
(
(3 7 6 2)
(0 4 7 3)
(2 6 5 1)
(1 5 4 0)
(0 3 2 1)
(4 5 6 7)
);
}
R786 is offline   Reply With Quote

Old   August 9, 2022, 12:18
Default
  #6
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,673
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
The output of blockmesh should be a block of whatever outer dimensions. What you have looks reasonable so far.

But if you want to domain size to be 50 m x 50 m x 3 m then make the vertices of the block in blockMesh exactly that. Not 50.2 and 3.1, exactly 50.0 and 3.0 (unless you want a 50.2 m by 50.2 m by 3.1 m domain).

As long as you're fine with the mesh cell sizes of the underlying block mesh. Let's see the snappy.
LuckyTran is online now   Reply With Quote

Old   August 9, 2022, 12:22
Default
  #7
Member
 
West Midlands
Join Date: Aug 2022
Posts: 62
Rep Power: 3
R786 is on a distinguished road
Thanks. These are the parameters in snappyHexMesh, but this was a default file i picked, and adjusted for my model which i explained is a box of 50 m by 50 m by 3 m with a 1.75 meters person inside of this box.

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

addLayersControls
{
relativeSizes true;

layers
{
}

expansionRatio 1.0;
finalLayerThickness 0.3;
minThickness 0.1;
nGrow 0;
featureAngle 30;
nRelaxIter 3;
nSmoothSurfaceNormals 1;
nSmoothNormals 3;
nSmoothThickness 10;
maxFaceThicknessRatio 0.5;
maxThicknessToMedialRatio 0.3;
minMedialAxisAngle 90;
nBufferCellsNoExtrude 0;
nLayerIter 50;
}

meshQualityControls
{
maxNonOrtho 65;
maxBoundarySkewness 20;
maxInternalSkewness 4;
maxConcave 80;
minVol 1e-13;
minTetQuality -1;
minArea -1;
minTwist 0.01;
minDeterminant 0.001;
minFaceWeight 0.05;
minVolRatio 0.01;
minTriangleTwist -1;
nSmoothScale 4;
errorReduction 0.75;
relaxed
{
maxNonOrtho 75;
}
}

mergeTolerance 1e-6;
R786 is offline   Reply With Quote

Old   August 9, 2022, 12:23
Default
  #8
Member
 
West Midlands
Join Date: Aug 2022
Posts: 62
Rep Power: 3
R786 is on a distinguished road
Also now i am meshing my model but its not generating the eMesh files in the triSurface folder what could be the reason for this.
R786 is offline   Reply With Quote

Old   August 9, 2022, 12:40
Default
  #9
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,673
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
You didn't provide the geometry and features subdicts. These are part of snappyHexMeshDict. There's a bunch of important keywords as well that are not here. Seriously, just dump the entire snappyHexMeshDict after you've censored anything proprietary in it.


There are 3 steps to snappy that are governed by the 3 main keywords in order: 1) castellatedMesh, 2) snap, and 3) addLayers. For debugging I recommend to run with castellatedMesh true and others false. Verify that the castellated mesh is produced. Then turn on snap. Verify that the snap is done correctly. Finally turn on layers for the refinement after you have verified 1 and 2 are working. You can also use the debug keyword set to 1 to write all intermediate meshes, I simply recommend manually debugging to really teach how stuff works.
LuckyTran is online now   Reply With Quote

Old   August 9, 2022, 12:52
Default
  #10
Member
 
West Midlands
Join Date: Aug 2022
Posts: 62
Rep Power: 3
R786 is on a distinguished road
here is the snappyHexMesh attached. I am not sure but i am also using surfaceExtractFeature would this command be correct to use so i use this as follows: blockMesh, surfaceExtractFeature and SnappyHexMesh. But now also i am facing a problem with the eMesh files not generated, i changed and put new stl files into triSurface as i had to make small changes to the geometry. What could be the reason for this.
Attached Files
File Type: docx snappyHexMeshDict.docx (13.1 KB, 3 views)
R786 is offline   Reply With Quote

Old   August 9, 2022, 13:02
Default
  #11
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,673
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
You need to run surfaceFeatureExtract once to get the edge mesh. If you don't have those, then you didn't run it correctly.
LuckyTran is online now   Reply With Quote

Old   August 9, 2022, 13:07
Default
  #12
Member
 
West Midlands
Join Date: Aug 2022
Posts: 62
Rep Power: 3
R786 is on a distinguished road
But if i changed my stl files then i do need to run SurfaceEdgeExtract again?
R786 is offline   Reply With Quote

Old   August 9, 2022, 13:11
Default
  #13
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,673
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Yes of course you need to run surfaceFeatureExtract each time you update your stl. I'm not saying that only one person has ever run surfaceFeatureExtract ever in the history of the universe.

If you replace your 1.7 m person with an stl of a 3 m elephant for example, you need to update the eMesh to correspond with to the surfaces of the elephant. I don't know what is surfaceEdgeExtract. But unless you make a change to the stl, you only need to do this extraction once because it never changes after that. Your mesh can change with differences in cell count and so on. Well technically your surface mesh can also change if you change the angle settings, but if you understand that then there really isn't anything you don't know about surfaceFeatureExtract.
LuckyTran is online now   Reply With Quote

Old   August 9, 2022, 13:13
Default
  #14
Member
 
West Midlands
Join Date: Aug 2022
Posts: 62
Rep Power: 3
R786 is on a distinguished road
Thanks, so if i delete the eMesh files with the stl files and replaced with new stl files should meshing generate new eMesh files, because its not doing that for me, OR keep the old eMesh files and only replace the stl files and rerun the whole meshing and eMesh files will get updated? Maybe here i am going wrong due to which remeshing does not generate eMesh files for me
R786 is offline   Reply With Quote

Old   August 9, 2022, 13:16
Default
  #15
Member
 
West Midlands
Join Date: Aug 2022
Posts: 62
Rep Power: 3
R786 is on a distinguished road
Now it also gives me this error when i replaced my stl files and deleted the old eMesh files,
-> FOAM FATAL ERROR: (openfoam-2106 patch=211215)
Cannot read file "/home/rabia/RabiaOpenFOAM/RabiaNew/UpwardFanRabia/constant/triSurface/body.stl" or file "/home/rabia/RabiaOpenFOAM/RabiaNew/UpwardFanRabia/constant/triSurface/body.stl.gz"

From static int Foam::fileFormats::STLCore::detectBinaryHeader(con st Foam::fileName&)
in file stl/STLCore.C at line 100.

FOAM exiting
R786 is offline   Reply With Quote

Old   August 9, 2022, 13:19
Default
  #16
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,673
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
eMesh files are generated and overwritten when you run surfaceFeatureExtract

You can keep the old eMesh files and let them get overwritten. But honestly I recommend you just delete it, it's simply easier for learning purposes. Then it is clear where and why you do not have an edge mesh.
LuckyTran is online now   Reply With Quote

Old   August 9, 2022, 13:20
Default
  #17
Member
 
West Midlands
Join Date: Aug 2022
Posts: 62
Rep Power: 3
R786 is on a distinguished road
thanks but about this error
-> FOAM FATAL ERROR: (openfoam-2106 patch=211215)
Cannot read file "/home/rabia/RabiaOpenFOAM/RabiaNew/UpwardFanRabia/constant/triSurface/body.stl" or file "/home/rabia/RabiaOpenFOAM/RabiaNew/UpwardFanRabia/constant/triSurface/body.stl.gz"

From static int Foam::fileFormats::STLCore::detectBinaryHeader(con st Foam::fileName&)
in file stl/STLCore.C at line 100.

FOAM exiting
R786 is offline   Reply With Quote

Old   August 9, 2022, 13:22
Default
  #18
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,673
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
You get this error when you ran surfaceFeatureExtract or something else?

What did you do? What did you type in the command line or what does your surfeaceFeatureExtractDict look like?

I honestly cannot comprehend why you can run surfaceFeatureExtract once and then fail again unless you have never done it before.
LuckyTran is online now   Reply With Quote

Old   August 9, 2022, 13:27
Default
  #19
Member
 
West Midlands
Join Date: Aug 2022
Posts: 62
Rep Power: 3
R786 is on a distinguished road
Yes i get this error when i have changed my stl files, then deleted the old eMesh files. Then i ran blockMesh again, then surfaceFeatureExtract as below: (attached the surfaceFeatureExtract dict).

Create time


Note: Feature line extraction only valid on closed manifold surfaces

Reading surfaceFeatureExtractDict

Surfaces : body.stl
Output : body
Load options : offset
Write options: writeObj=off writeVTK=off


--> FOAM FATAL ERROR: (openfoam-2106 patch=211215)
Cannot read file "/home/rabia/RabiaOpenFOAM/RabiaNew/UpwardFanRabia/constant/triSurface/body.stl" or file "/home/rabia/RabiaOpenFOAM/RabiaNew/UpwardFanRabia/constant/triSurface/body.stl.gz"

From static int Foam::fileFormats::STLCore::detectBinaryHeader(con st Foam::fileName&)
in file stl/STLCore.C at line 100.

FOAM exiting
Attached Files
File Type: docx surfaceFeatureExtractDict.docx (12.0 KB, 4 views)
R786 is offline   Reply With Quote

Old   August 9, 2022, 13:50
Default
  #20
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,673
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
So either there is not a body.stl file at that location or there is and you do not have read permissions.
LuckyTran is online now   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
Wind Tunnel Meshing for CFD With Easily Changeable Model Position AEN ANSA 2 April 9, 2020 11:30
CFD meshing in ansys Er.spcwlkr ANSYS 0 March 22, 2019 01:56
[Other] Ansys Meshing vs Ansys ICEM CFD JuPa ANSYS Meshing & Geometry 5 September 19, 2012 09:48
CFD meshing projects for MS sandipan_b2002 Main CFD Forum 1 August 7, 2012 04:01
Which is better to develop in-house CFD code or to buy a available CFD package. Tareq Al-shaalan Main CFD Forum 10 June 12, 1999 23:27


All times are GMT -4. The time now is 15:38.