CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Mesh Utilities (
-   -   Mesh improvement using mesquiteMotionSolver (

philippose June 3, 2011 09:50

Mesh improvement using mesquiteMotionSolver
Hello and a Good Afternoon,

I use pure tetrahedral meshes for my Simulations. However, there are situations when I need to merge and then stitch two tetrahedral meshes into one complete mesh for simulating cases in which my mesh consists of multiple parts.

A typical example in my case would be the simulation of multiple positions of a hydraulic spool valve. Here, I mesh the valve housing and the spool separately. Then use transformPoints to move the spool to a specific position, followed by mergeMeshes and stitchMesh to create a single mesh for simulation.

When using stitchMesh (which uses the sliding interface features of OpenFOAM internally), checkMesh usually reports many non-orthogonal and highly skewed faces created as a result of the stitching operation.

I was wondering whether it would be possible to use the mesquiteMotionSolver for improving the mesh after running stitchMesh, before starting the simulation?

stitchMesh generates a mesh which contains not just tetrahedra, but also polyhedra, wedges, prisms, etc.... can the mesquiteMotionSolver handle these cell types, and has anyone already tried this?

Have a great weekend ahead!


(Theoretically, I could just use mesquiteMotionSolver to move the spool into a new position without creating the mesh as multiple pieces in the first place, but for some reason, mesquiteMotionSolver kept crashing while trying to do this.... hence the more complicated work flow. )

deepsterblue June 3, 2011 10:19

Oliver Borm and I worked on hex/prism support for mesquite, and there's a branch with updates on the extend git repository. We haven't worked on polyhedra yet, and I may look into that when I have some time. The stuff should work in parallel as well.

You can play around with the termination criteria to dictate the amount of smoothing that you would need.

Mesh smoothing can only get you so far - at some point, extreme distortion would require topo-changes.

philippose June 3, 2011 11:30

Hello Sandeep,

A Good Day to you!

Thanks a lot for your reply..... I had seen the Git commits regarding Hex/Prism support for the mesquiteMotionSolver, but was not sure if I could use this in my particular case, since it also includes cell types other than Hex and Prism.

How does the mesquiteMotionSolver handle cells which it cannot modify? Is it possible to run the solver on cases which contain even polyhedral cells, or will it abort with errors?

Out of interest..... how did Oliver and you go about handling these other cell types? Do you internally split the cells temporarily into tets and then apply the mesquite functions to them, or does the mesquite library inherently in some form or the other already support arbitrary cell types?

Have a nice day ahead!


deepsterblue June 3, 2011 11:35

Unfortunately, mesquite only supports standard cell types at the moment. Polyhedra are tricky, since there's no clear way to define a good "cell-quality" for them. My attempt is to decompose into tets, which should get the job done in theory, but there's always robustness/efficiency concerns.

If you have cell-types that don't match a standard type, it will quit.

philippose June 3, 2011 11:43

Hi again,

Thanks once again for the information.....

Hmmm... that would be a problem in my case. I cannot control the kind of cells stitchMesh creates, and I have seen that it does create the whole range of cell-types (as reported by checkMesh).

I guess I will have to try to use the mesquiteMotionSolver directly, by creating one tet mesh with the housing and the spool, and trying to move the spool by "x" units using moveDynamicMesh before starting a simulation.

I may have to get back to you regarding this, because the last time I tried, mesquiteMotionSolver quit after a couple of steps with negative volume errors (if I remember right).


All times are GMT -4. The time now is 07:44.