CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Technical] Polyhedral mesh generation (https://www.cfd-online.com/Forums/openfoam-meshing/61911-polyhedral-mesh-generation.html)

lillberg December 3, 2007 14:25

I would like to have a look at
 
I would like to have a look at it also, allthough I don't think I have much to contribute, now that you've got professional help ;-)

eric.lillberg@afcosult.com

/Eric

lillberg December 3, 2007 14:31

wrong e-mail, should be eri
 
wrong e-mail, should be

eric.lillberg@afconsult.com

mattijs December 3, 2007 16:19

Problem was the cellZones. The
 
Problem was the cellZones. They are not mapped so they had illegal content after the conversion. It converts ok if I remove the cellZones file.

It is not going to be trivial to map the cell zones. I assume you want to have interface inbetween the cellZones to remain the same when converting so those internal faces would have to be treated like boundary faces.

bastil December 3, 2007 16:40

You are right Mattijs. So at t
 
You are right Mattijs. So at the moment only possiblity is to delete cellzones?

BastiL

lr103476 December 4, 2007 03:51

Hi guys. Another question.
 
Hi guys.

Another question. Did anyone perform a flow simulation with a moving polyMesh. In the past I just tried icoDyMFoam on a polyMesh, but I did not get any convergence, at least much much slower compared to block structured hex-mesh.

Frank

dmoroian December 8, 2007 05:04

Hello guys, I also have a pro
 
Hello guys,
I also have a problem (most likely a newbie one): although the polyDualMesh does the job, I almost get those nice looking polyhedra:
http://www.cfd-online.com/OpenFOAM_D...ges/1/6110.pnghttp://www.cfd-online.com/OpenFOAM_D...ges/1/6111.png

I converted those tetrahedra into polyhedra using:
polyDualMesh ./ testMRF 89
and then I used
foamToVTK ./ testMRF -time 0
followed by paraview-3.2.1.
Is there something I missed?

Dragos

7islands December 8, 2007 21:20

Hi Dragos, The easiest way is
 
Hi Dragos,
The easiest way is to add -allPatches to your foamToVTK command line
foamToVTK . testMRF -time 0 -allPatches
and read allPatches*.vtk.

Takuya

dmoroian December 9, 2007 01:16

Indeed it works great! http:/
 
Indeed it works great!
http://www.cfd-online.com/OpenFOAM_D...ges/1/6116.png
Thanks Takuya!
...if I only had the courage to look with paraview at some of the patches that it creates by default...
Though, I'm curious now: what do I see in the above picture, from the previous message, if not the polyhedral cells? Actually I can give a part of the answer: there are the polyhedra but with some extra lines. What are those lines?

Dragos

7islands December 9, 2007 01:42

What you were seeing in the pr
 
What you were seeing in the previous post was the polyhedra decomposer in foamToVTK working perfectly http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

foamToVTK decomposes a polyhedron into tetrahedra and pyramids since currently VTK can't handle polyhedra perfctly as is (which is what the native reader for ParaView3 I posted a while ago also still suffers from).

Takuya

markc April 27, 2008 10:51

Matthijs, Eric, Bastil, I h
 
Matthijs, Eric, Bastil,

I have exactly the same problem as Bastil described in december. I have a tet mesh which checkMesh says is ok, nil errors nor warnings.
Converting it using polyDualMesh, trying different aspect angles, gives warnings regarding edge orientations. The utility concludes its work anyway but than using checkMesh, the new mesh contains errors and warnings. The error I see returning everytime is wrongOrientedFaces. But also warnings regarding warpedFaces and concaveFaces return regularly. I tried this sequence with different models and within each model with different meshes. Note that I have no cellZones or faceZones.
So in short: checkMesh says my original tet mesh is perfect. Nevertheless polyDualMesh is not succesfull in converting it in a polyhedral mesh.

Tet meshes have been generated with gid and exported using unv format.

Why I all need this:
I am trying to model sailing ships using VOF interFoam. The water-air interface is of great interest to me as a ship designer.
In order to gain experience I played with the damBreak tutorial. I remodeled the geometry and generated the mesh with the tools I would like to use for the ship-problems as well. Also here I find the same problems, however I finally manage to make the solution run to an end with the polyhedral mesh. The tet mesh gives unstable solutions. To my knowledge I have tried all possible solver settings and scheme options:
-max Co, as low as 0.1
-cGamma, Gamma subcycles upto 4
-with and without momentumpredictors
-nCorrectors 1-4
-nonOrtho correctors, upto 10
-tolerances, upto E-9
-PCG and GAMG pressure solvers, different preconditioners, different U solvers.

and more.
Making the step to my ship models, I cant run any solution successful. After a few tenths of runtime seconds, some high velocity spikes appear, whatever I try.
I tried potentialFoam, which returns a velocityfield without unstabilities. However, the velocityfield does not seem very regularor smooth.
Velocity spikes appear mostly on boundaries, just above the water interface. On the model, different boundary conditions apply: pressureOutlet and symmetryplane. I also tried extrapolatedOutlet. All the same.
I suspect my mesh quality to be the showstopper, though I read a couple of threads where Henry states that, though hex meshes are preferred, even on tet meshes interFoam should work.
Other possible causes (hope someone can comment):
-my boat is 16 m long and sails at 5m/s. This gives Re of order e-6 in the air. Should I use turbulence models? I hope not, as I am only interested in the water.

Probably the best solution is to make hex meshes. However presently I have no tools at hand which can do this.

Concluding:
-Instability in VOF solution;
-Suspect mesh quality/mesh type (tet);
-Improper conversion of my (perfect?) tet mesh into polyhedral.

In fact the second half of my questions belong to another place of this forum. Apologize for that.

Any comments will be greatly appreciated,

Mark

markc April 29, 2008 16:25

Hello All, Any comments abo
 
Hello All,

Any comments about the polyDualMesh issue? (having a pure tet mesh which checkMesh says is perfect, which fails with polyDualMesh. Giving error about wrong edge orientation and checkmesh gives errors about face orientations).
Any help would be greatly appreciated.

Mark

hjasak April 29, 2008 16:46

In order for polyDualMesh to w
 
In order for polyDualMesh to work, your tet mesh must be Dealuney. If it was made using marching front, it will probably fail.

Hrv

andersking May 5, 2008 03:36

Hi, I've also been having tr
 
Hi,
I've also been having trouble with polyDualMesh and edge/face orientations.

Generally it always happens for at the edges of 'concave' patch boundaries.

the image below shows a simple case, with the incorrect faces highlighted (using checkMesh).

http://www.cfd-online.com/OpenFOAM_D...ges/1/7560.png

The mesh was generated with netgen using the delauney scheme. If the truncated corner is removed polyDualMesh works fine (ie a normal cube).

So far this has meant I haven't been able to use polyhedral meshes for anything useful (apart from making pictures of polyhedral meshes). Any advice would be greatly appreciated.

Cheers
Andrew

markc May 9, 2008 14:56

Hrv, Thanks for your reply. T
 
Hrv,
Thanks for your reply. The meshing tools I have available do not tell me Dealuney or marching front (?). However I assume that will be the root cause of the problem. I read on the forum that you state it WILL be possible to have stable solutions with interFoam and tet meshes. I am struggling now for weeks on some boat problem with a tet mesh. I am now able to run it quiet far but sooner or later some velocity spike appears, mainly just above the water-air interface, only on the boundaries. I have varied the boundary conditions. On the free patches they are p=0 and zerogradient for U and gamma. This must be ok.
Solvers I varied, with mostly only slight succes. Now I am more focussing on schemes. I found that upwind on div(rho*phi,U) was a huge improvement in stability. However after some longer time a velocity spike appeared again.
Now I am testing with limiters and linearUpwind. I will attach my current fvSchemes. Hopefully someone can comment on it.
I will also add some snapshots of my case.
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif fvSchemes
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif SnapshotU.pdf.tar.gz
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif Snapshotgamma.pdf.tar.gz

Thanks for any comments,

Mark

markc May 11, 2008 04:45

Update: I used gmsh to genera
 
Update:
I used gmsh to generate delauney meshes, nil errors/warnings with checkmesh. PolyDualMesh runs on these meshes but checkmesh than returns with errors as indicated by Andrew King.
Using the mesh anyway for solving gives unstable results very soon.
Besides that: I hoped that I could use refineMesh on these polyHedral meshes. However this introduces even more errors in the mesh. I thought that refineMesh shuold work on polyHedral. It does not in my case. All kinds of skew faces, wrong orientations, concave faces etc etc appear. Am I doing something wrong or is my mesh just one step too challenging?

Brgds,

Mark

cnsidero September 13, 2008 17:50

Use of polyDualMesh on a 'good
 
Use of polyDualMesh on a 'good' tet mesh (by checkMesh's standard) generates the same errors for me as Mark and Bastil.

Has anyone else encountered difficulties? Has anyone found any work around for this? Is this possibly a bug in polyDualMesh?

Chris

kjmaki September 13, 2008 17:56

Hi Chris, I have never had
 
Hi Chris,

I have never had reliable success with polyDualMesh, except for domains that have very simple boundary surfaces. (I was not surprised to see that Andrew King's case was ok with a single cube, but failed when the corner was truncated.)

I am not sure if this was a bug, or lack of functionality for the cases that are of interest to me.

Kevin

cnsidero September 13, 2008 20:58

Thanks for the reply Kevin.
 
Thanks for the reply Kevin.

Including myself that's four people in this thread that seem to agree that polyDualMesh only works for simple cases.

I was interested in comparing the setup, run-times, memory usage and results of a tet mesh and it polyhedral dual. Perhaps I will try on something simpler than I have been testing with.

hjasak September 14, 2008 04:33

For the dual mesh to work, the
 
For the dual mesh to work, the underlying tet mesh must be Dealuney. If this is so, the algorithm will work fine; otherwise it will fail.

It would be nice to have a check which would make sure that the tet mesh is actually Delauney before starting. Chris, do you happen to know a tool like this, or would we have to write it from scratch?

Hrv

cnsidero September 14, 2008 23:14

Hrv, I don't know of any 'D
 
Hrv,

I don't know of any 'Delaunay checkers'. I believe the tet mesher in Gridgen/Pointwise is Delaunay based but I don't know how strict it maintains it.

With regard to my failure, I have to admit it is probably not the most appropriate mesh to try polyDualMesh with (~300 surfaces and ~2mi tets with cell sizes vary several orders of magnitude). I am going to try it on a more 'intermediate' type problem this week.

Chris


All times are GMT -4. The time now is 18:51.