CFD Online Discussion Forums

CFD Online Discussion Forums (
-   ANSYS Meshing & Geometry (
-   -   Ansys meshing of two-phase periodic domain (

kcsmith January 20, 2011 00:02

Ansys meshing of two-phase periodic domain
1 Attachment(s)

I have performed some mechanically-based simulation to obtain a dense configuration of polyhedron-shaped particles. I am interested in simulating conjugate heat conduction in the two-phase domain represented by solid particles and fluid in the empty (pore) space outside of those particles. The geometry is periodic in x, y, and z.

I have imported the solid particle geometry into ICEM CFD via a triangulated *.stl file to perform meshing. Please see the attached image. I was able to repair the geometry and to create individual bodies representing each particle in the geometry, but have run into many road blocks to obtain volume meshes of the particles and the pore space.

Do you have any suggestions for proper workflow for getting ICEM to recognize the pore space (i.e., with a bounding box or enclosure like in Workbench) and to generate a mesh of pore and solid volumes which respect the periodic boundaries?

Kyle Smith

PSYMN January 30, 2011 18:45

Material Points
Very interesting...

So, looking at this model, I guess that the greenish polyhedra are the solid particles and what I can't see is the surrounding fluid... This is pretty easy for ICEM CFD, but actually very difficult for other tools like Hypermesh that can't handle nested volumes.

You will need to close off the fluid region with a box... You can use the option under "Geometry (tab) => Create/Modify Surface => Standard Shapes" to create a cube of the right size and placement. And don't forget to turn on your translational periodicity under "Mesh (tab) => Global Mesh Setup => Set up Periodicity".

In ICEM CFD, we control material assignment thru material points (Geometry (tab) => Create Body => Material Point)... So, if you put a FLUID material point in the fluid region it will know it is FLUID. You could also put a SOLID material point in each of the polygons that you want in a SOLID material... The only down side is that once you create a single material point, it will assume that regions without material points are voids (ORFN). This means, if you put one, you will need to put them all.

It may be worth doing, but the alternative is to put no material points. Instead it will create its own in every region, and then you just need to rename the one for the fluid region and then add all the others to the solid region (it may be quicker for a "one-of" mesh).

Have fun with this and maybe post your result (since it is pretty interesting).

kcsmith February 11, 2011 12:29

ICEM 2 phase mesh issues
4 Attachment(s)
Hi Simon,

Thanks for your reply!

You are correct that the green particles represent the solid phase. This solid phase is not interconnected, but instead is composed of a set of closed volumes, i.e. particles. Some of these particles are in rather close proximity to one another, though not intersecting.

I've taken your advice to attempt to get ICEM to recognize fluid phase, which is represented by the empty space in the primary cell. To do this, I have created a bounding box with the sequence "Geometry (tab) => Create/Modify Surface => Standard Shapes" and selecting "entity bounds" as the dimension of my box.

This makes a box that should exactly bound my geometry and represent the primary periodic cell of my domain. But as you'll see from the attached figure, solid_w_box.jpg, ICEM does not recognize how this box matches with the solid geometry. As a result, when I attempt to mesh this domain using the option "Quick (Delaunay)" slivered fluid-phase tetrahedra result at the boundary where there should be solid phase only (see mesh_mismatch.jpg). Any idea how to fix this problem? I attempted to use the option "Robust (Octree)" to mesh the domain, but it results in many problems, including unfilled volume and lots of bad elements.

My first thought to get around this problem was to explicitly compute the polyhedron representing the fluid volume in the primary cell. I have written this to a *.stl file and imported into ICEM (see fluid_volume.jpg). I then planned to combine this fluid geometry with the solid geometry (solid_volume.jpg), but I've so far found no simple route to do that in ICEM or Ansys workbench. This approach would make the fluid and solid geometries consistent and non-intersecting.

Any guidance would be appreciated, even if there is a better geometry file type to be importing into ICEM or Ansys workbench. The trouble is that I am writing these geometry files myself, and therefore can only write simple files, like *.stl. Looking forward to a reply.

Thanks! :)

PSYMN February 11, 2011 12:43

Suggest Octree...
Your mesh mismatch image is actually showing mesh overlap... The delaunay mesher first meshes each surface (assuming you have the surface mesh settings set to Patch Dependent) and then fills each volume with tetra.

I think Octree would be the easiest way to handle this model because it uses a top down approach that could fill the fluid region based on material point containment...

But perhaps you have issues due to very close proximity in some cases... My guess is that you just need to tweak your settings a bit. If you showed some images of your octree problems, I could help with that.

Best regards,


PSYMN February 11, 2011 15:45

4 Attachment(s)
OK, so I looked at your model. From your earlier image, I guessed your mesh size as about .125... But the small gaps in your model are 0.003 at most. So there needs to be a decision made about what scale you need to capture...

We can set the mesh size much much smaller in tight areas, but then you should expect many millions of elements. You could do this by going into Mesh (tab) => Global Mesh Size and turn on the option for Curvature and Proximity refinement. Go in and set cells in gap to 2 or 3 and set the min size limit to something very small, like 0.001. I hope you have the memory for a model that fine :eek:

Anyway, I went the other way and decided that you really needed a mesh that would walk over those small gaps. It would have a min size of 0.06125 and a max size of 0.25 in the volumes.

Here are my steps...

1) Load the STL file for the solids.
2) Build Diagnostic Topology, tolerance 0.000001. (actually 0.001 would have been good enough, but I didn't want to miss anything).
3) Geometry (tab) => Create/Modify Surface => Standard Shapes => Box. Use the "Entity Bounds" option to create an enclosure...
Attachment 6464
4) Set sizes on the Solid bits to 0.06125 and the Enclosure to 0.125. Set the global max size to 0.25.
5) Did NOT set any material points... If you set one, you must set them all... (unless you just want the ones you set, such as Fluid). But if you don't set any, it assumes one for each volume.
6) Generate Octree Tetra... Wait 10 minutes for it to generate almost 2 million elements...

Here is the outer surface mesh... You can see the size transitions. Next I will do it all one size...
Attachment 6465

Here is a cut plane... I made the fluid light yellow-grey.
Attachment 6466

Here is a zoom in on the cut plane. You can see that fluid flows between blocks if it can, but if the blocks are two close, there is no fluid and the solids are next to each other. This could be a good thing or bad thing depending on your needs. Some will be glad not to waste elements on those tight areas, it would also walk over bad geometry, etc. But if you wanted flow in those areas, you needed to set the size smaller, setup thin cuts, reduce your edge criterion, etc. All the things we have discussed many times on CFD-Online.
Attachment 6467

kcsmith February 11, 2011 19:41

Octree periodic meshing issues
Hello Simon,

The approach you used that allows the solid surfaces to meet is acceptable for my problem.

Your steps seem to work well without the translational periodicity turned on, but with periodicity the meshing process stops just before the smoothing process with a dialog box that says there are holes in my geometry. This is despite having turned on the 'close gaps' for the Octree mesher.

Any suggestions? I tried increasing the 'edge criterion' from 0.2 to 0.5 to allow the mesh to have reduced conformity to sharp angles in the solid phase, but still there are holes in the geometry.


PSYMN February 11, 2011 20:00

3 Attachment(s)
Interesting, I just tried it and got the same problem... I will play with it at some point and get development involved if I need to.

Also, I guess you will want periodicity in 3 directions. We can set up 1 direction easily, but multiple directions gets trickier... You need to copy mesh and make consistent manually...

Oh well, I did just try a more uniform mesh with tet to hex conversion... You may like it. But I noticed that it doesn't allow the hexas to the surface on the periodic sides (this one was periodic in X)...

First, the previous model (no periodicity and size transitions from 0.06125 to .250). You can see that the transitions and smoothing stop a lot of hexas from being formed.
Attachment 6468

Then I tried again. I turned on periodicity and turned off smoothing (so the tets would be left in clumps and convert more easily). Most importantly, I made it all the same size so that there would be no transition to interfere with conversion.
Attachment 6469

And here is the outside... THe sides have quads to the wall, but the +-X sides (hard to see here) didn't convert tet to hex agains the periodic surface.
Attachment 6470

kcsmith February 14, 2011 12:42

3 dimensional periodicity
Hi Simon,

I want all three Cartesians directions to have periodicity. It would be a very tedious task to make the mesh consistent manually - correct me if I'm wrong.

I would think I more straightforward approach to get periodic boundaries would be to get surface meshes for the periodic faces and make them consistent by translating faces +x to -x, +y to -y, and +z to -z. A volume meshes could then be computed from these periodically consistent surface meshes. I don't think the Octree approach fits in well with this strategy though.

Regarding continuing to try the Octree approach:

I'm wondering if part of the meshing issues are related to the fact that the geometry I'm using is essentially only one periodic replicate. Along these lines, I attempted to mesh my domain with a box 5 % larger than the boundaries of my cell, but unfortunately holes were present in the final mesh with periodic boundaries set.

Another idea that I've not tried is to include multiple replicates of the primary domain. If I were to attempt including 8 total replicates in a 2x2x2 configuration maybe this would help. Unfortunately, I don't think my 32 bit machine will be able to handle the 8*2 million = 16 million cells present in a system that large.

Looking forward to hearing what you and the development folks have to say.


PSYMN February 14, 2011 15:00

The usual trick for 3 way periodicity is to start with Octree and use 1 way periodicity (lets say in X), then you copy the -Y surface mesh to the positive Y side (the X periodicity will make sure it fits), and then you copy the -Z surface mesh to the positive Z side... Merge all the surface nodes within a tolerance (prety much zero) to make sure it is all connected... Make sure to do a check for single edges to make sure the periodic sides are all sewn in.

Then you can either keep your octree mesh and use the make consistent command to fit it to the new surface mesh, or you can delete all the volume mesh and regenerate with a bottom up method like Delaunay.

I have not got around to testing this case fully myself before sending it off to development. I hope to look at it this week some time.

Assuming you need to move on in the mean time, just turn off periodicity and generate your octree mesh... Then create the periodicity it manually starting with the -X copied to +X... The difference is you may end up doing some manual merge node work to sew things together along the edges...

kcsmith February 25, 2011 15:01

octree mesh misfits at boundary
1 Attachment(s)
After further examination of the Octree-generated mesh (without any periodicity) I've realized that there are numerous issues at the boundary. Multiple edges are not fitted by the mesh at the boundary, as shown in the attached image.

I imagine that these misfitted edges are going to cause problems in make the mesh periodically consistent through either manual or automated methods. Any advice would be helpful.


PSYMN March 8, 2011 15:17

Sorry Kyle, I don't always have time to keep up with CFD-Online.

These issues are a function of the mesh size relative to the feature size. Octree places the nodes in space and then fits them to the entitiies based on the edge criterion.

So, you can solve this problem by reducing the mesh size (globally, locally or globally with a size function to set cells in gap), or you can reduce the edge criterion so it splits more edges as it fits to the features...

Best regards,


kcsmith March 9, 2011 22:08

fixed: octree misfits at boundary; assigning zones for Fluent boundary conditions
2 Attachment(s)
Simon, thanks for your suggestion to use a smaller value for the edge criterion.

I reduced the edge criterion to 0.005 from a previous value of 0.2. Using my initial particle geometries, which represented convex hulls of each particle changing the edge criterion did not help. I still had the same misfits at solid boundaries, but I realized that these misfits only occurred on solid boundaries where the facets were not triangular, i.e., they were quadrilaterals.

With this in mind I imported an stl file containing Delaunay triangulations of the solid particles (composed of simplical tetrahedra). This time in conjunction with an low edge criterion of 0.005, particle boundaries were fitted extremely well by the Octree mesh (see attached images).

Also the configuration described also exhibited preserved gaps completely filled by acute tetrahedra (i.e., there are no holes in the mesh). This is very good for my problem as well (see second image attached).

With these meshes I am now able to import into Fluent, but am having a number of issues with assigning boundary conditions therein. My mesh possesses numerous (>500) disconnected facets on the boundary of the cube, each of which show up as independent zones in Fluent. In my steady-state heat conduction simulation, I desire to apply isothermal boundary conditions on the entire +Z and -Z faces of the boundary and adiabatic boundary conditions (i.e., symmetry) on the other four faces (+X, -X, +Y, and -Y).

What is the best (easiest) way to assign such boundary conditions? Any reference you have would be great.

Thanks! :)

All times are GMT -4. The time now is 17:39.