CFD Online Discussion Forums

CFD Online Discussion Forums (
-   ANSYS Meshing & Geometry (
-   -   [ICEM] beginner questions for ICEM CFD (

johnp August 3, 2010 22:16

beginner questions for ICEM CFD
1 Attachment(s)
Hi everyone,
Im fairly new to ICEM CFD and would like some advice. As background, I feel confident creating structured meshes with blocking and the pre-mesh parameters. However, Im now looking at a geometry that is probably better represented with an unstructured mesh. The problem is a fully-developed flow through a channel that has irregular geometry and is fairly wide (width in y-dir = 102 m, max depth in z-dir = 6.5 m). Ive attached an image to clarify the geometry, flow is in the +x-direction. As the flow is fully-developed, I plan to use periodic BCs for the inflow and outflow. A prism layer is required on the side walls and channel bottom. I have tried two approaches:

1. Meshing the inflow face w/quad dominant and extruding the mesh in the flow direction. I thought this would be advantageous because I could limit the numbers of elements in the flow direction with the periodic BCs. This worked all right, but I couldnt generate the prisms in 2D.

2. Meshing the 3D region with octree, smoothing, and then adding the prisms layer. This resulted in very poor element quality in the corners.

Is there an advantage to either approach or should I be trying something different? Any help is greatly appreciated,

mvoss August 4, 2010 10:02


i dont see why you cannot block this. am i missing smth.?? 4 corners, 2 symm planes, in- and outlet, all straight. Top and bottom a little bit bumpy, but still, why no blocking?

PSYMN August 4, 2010 10:56

Again, I agree with Neewbie, this looks straight forward for Hexa, but it should be easy for the other methods also.

some comments,

The periodic BOCO on the inlet and outlet wouldn't mean developed flow, it would simulate a series of ships. The wake from your ship (disturbed outflow) would be flowing in the inlet. Possibly not what you want. If you want to simulate a single ship without considering the affects of similar ships ahead and behind, don't use a periodic boco.

To get prism to work in 2D, you need to turn on the BLayer2D option under Prism Advanced Settings... (bottom of the global prism params page). But I don't see how you could do this model that way. Maybe a sweep from the symmetry plane would work better? But certainly hexa would be better than sweep.

If your hexa concern is that you will have too many elements due to propagation, there are ways around that. You could use nested Ogrids to focus the mesh near the ship and its wake, you could use hanging node refinement, you could even turn some blocks into swept blocks (from inlet to outlet) so you can have the mesh coarsen as it moves away from the boat. You might even try MultiZone hexa.

Octree Tetra should have been pretty easy on this geometry. If you want to pursue that method, please give a little more info about the issue at the corners. It should have handled this (and much more complicated geometries) without any problem. You could create a density zone for the wake, prism for the viscous boundary layer...


johnp August 4, 2010 14:47

neewbie and Simon,

Thank you for your responses. i will try blocking with Octree. When i tried blocking before, i was using the premesh parameters to generate quad elements on the inlet face. i'll try tets now on 3D blocks.

Also, i guess i was not that clear on the details of the flow. The problem is an open channel flow in a natural channel (i.e. there are no ships). The top surface (xy-plane at largest z-value) is the free surface modeled with a symmetry BC. The periodic inlet and outlet are the yz-planes. The prisms need to be attached to the channel boundary (the "bumpy" part). Flow is in the +x-direction. i don't believe this changes any of the suggestions though.

In terms of blocking, should i split the volume into 3 blocks? one in the region of each bank and one in the channel center? This may be advantageous because i am most interested in what is happening at the banks. Thanks again for the help,


PSYMN August 4, 2010 21:25

Oops, sorry, I am usually in a rush to get thru a bunch of these CFD-online threads in very little time... (I did 6 in 20 minutes this morning) I didn't look at it correctly, or rather I thought I understood it at first glance and jummped to the solution. Again, I apologize :o.

I see now, it is a cross section of a flow channel... Your sweep plan should work pretty well, or use Hexa. I wouldn't use tetra for something that is so directional...

The blocking for it is essentially a CGrid... Start with your initial block that will line up roughly with the 8 "edges" of this model (the top surface of the water has 4 sides that would be the top of the block. Associate the 8 edges with the 8 curves of the model. You can (and should) set up periodicity to represent that this section happens over and over in an unending chain (a long channel)

Then create an Ogrid. Select the only block, then select three faces, the free surface, the inlet and the outlet. Hit apply. This will subdivide your model into 4 blocks. The central block is the mid flow of the channel (low interest area), the other three blocks will be alinged but perpendicular to the walls of the channel and will allow you to get excellent quality and capture the viscous flow effects very well.

Thats it... No need to split anything else or delete any blocks. You could move verts if you wanted to make the 3 boundary blocks tighter with the walls.

You would then set up your edge parameters with a geometric1 or exponential1 distribution and set a small size on one side. Match the central HGrid distribution with the big end of the other blocks so that everything flows well.

you will have some tighter elements with higher skew int he top left corner, but don't worry about them, your solver can handle it.

Have fun.

johnp August 5, 2010 22:17

2 Attachment(s)

Thanks for the detailed response. i was able to successfully split the blocks and generate the mesh. A view of the left bank is attached. i ran into two problems:

1. there are about 75 negative volume elements. They seem to be located adjacent to the wall boundaries (see attached). The near wall spacing is about 0.0001 m to allow y+ < 1. i would like to use a low-Re turbulence model without wall functions. i was able to fix some using the Mesh Check function. To fix the others, i went to the Hex Smoothing function which leads to problem 2...

2. when i tried to smooth the mesh and fix the volume orientations i keep getting a segmentation violation. Any thoughts?

PSYMN August 6, 2010 12:45

Projection Limit
5 Attachment(s)
Hey John,

Several thoughts going thru this... Some were my fault for not being more clear (you followed my instructions very well ;))

First thing I noticed was that you had associated edges with each curve... But in your case, that didn't produce optimal placement. Hexa is patch independent, you don't need to be a slave to the original patches.
Attachment 4368

TO fix this, just associate the edges to all three curves, then you can slide the verts to optimal angles (3 verts meet at that corner so, 120 degrees between each is optimal, since the top is flat, the diagonal should be at 45 degrees. I just eyeballed it and go something between those ideals).
Attachment 4369

Next, you had set uniform spacing and your boundary layer was too thick. you had Geometric1 on your radial edges, but the net effect was that you had large size jumps at the corners. The fix is to reset all but the Ogrid edges to Bi geometric with the end spacings set to zero. Then move the edges down towards the river bed until the distributions look like a reasonable transition. You can complete the effect with a match edges from the Ogrid edges to the other edges.

Note, as you move down towards the bumpy bank, the inner side of the O grid gets more bumpy and since this is an HGrid block, quality suffers. You can straighten this out by adding a linear edge split to force the inner edge to a straight line.

Now to your real problem... You have gaps between your surfaces. At normal sizes, you can't see them, but when you have such near wall spacing (1e-5) the side wall nodes (projected to surface) jump across the gap to project to the nearest surface and pile up causeing the problems.
Attachment 4370

This is not too unusual, so we have a fix. Projection Limit. This uses interpolation instead of projection when you are within this distance from the edge. In effect, your edges were on curves, so they were fine. By setting this to 0.1, I am bridging over any gaps by interpolating for the first 0.1 instead of projecting to the surface gaps...
Attachment 4371

Anyway, that sorted it all out nicely.
Attachment 4372

johnp August 9, 2010 21:40

1 Attachment(s)

Thanks for the detailed explanation. i was able to follow your steps and produce what i believe is a reasonable mesh. Going through the process generated some additional questions:

1. the final mesh you posted showed a nice alignment between the cells in the H-grid and the part of the O-grid bordering the channel bottom. My intial mesh was rather skewed in the O-grid as shown in the attached image. To fix this, i played with the ratios at each end until the result looked reasonable. Is there a faster/better way to fix this issue?

2. My initial thought to solve the issue in 1. was to leave it alone and let the smoother take care of it. However, i can't seem to get the hexa smoother to run without a segmentation violation. Any thoughts on what might be causing this? My final mesh has a minimum quality around 0.4, so the smoother may not be necessary. But, i may need it in the future...

Thanks again,


PSYMN August 9, 2010 23:27

Not sure about the smoother... It is something I have wanted worked on for a long time... It got a lot of work for 13.0, hopefully the issues are sorted out. But yes, 0.4 is plenty good enough...

I started with the middle section... I set it to Bigeometric and set the end spacings to 0. This nonsensical setting means use a uniform spacing, I always use it to reset bunching that has gone awry. I prefer it to explicitly stating "uniform" (which i never use) because the mesh can adjust as necessary. Since I copied to parallel, this copied thru and lined everything up for me.

Then I matched the outer blocks to the inner one.

I am just so used to doing it that way, I didn't even think I was being tricky.

But yes, you could adjust distributions until you worked it out, or just try a copy to paralleled with your current outer edge, but set the initial spacing to something that would satisfy both edges... You can also copy to selected or copy to visible parallel if you wanted to limit the distribution. It also makes your things easier to line up if the end spacings are at least equal (on opposite ends) so you are not dealing with unbalanced biasing...)

mvoss August 10, 2010 02:28


just a question: Why is there a split in y-direction (extrusion)?
Isnt the model supposed to be in 2D?


johnp August 10, 2010 10:30


i did the opposite and matched the inner to the outer. Thanks for the tips on the bigeometric. i'm slowly getting the hang of this...


it is a 3D geometry, however the length in the flow direction (x) is small compared to the others due to the periodic BC's. The yz-plane is essentially the channel cross-section.

mvoss August 10, 2010 10:37


sure. thats why i am asking.
if you set the corresponding verticies periodic you end up in simulating the cross-section with a 3D-model with one element hight and so there is no need for an extra node between the 2 periodic bc.
but maybe i am to familiar with CFX. because here one has to do this "workaround".


johnp August 10, 2010 11:07


you bring up an interesting point that was i thinking of addressing in a separate post. When there are only 2 nodes (1 cell) in the flow direction, i receive an error when importing the mesh into Fluent. This error goes anyway when i add the third node. This is unfortunate as the size of the mesh is doubled.

i was able to import a 2D mesh that contained only one cell in the flow direction without any trouble (and the simulation ran and produced good results). Can you provide a reference or overview on the workaround for CFX? Although, i'm not sure how applicable that would be to Fluent. Thanks,


mvoss August 10, 2010 11:16

jap. i faced that problem too. my solution was to setup the periodicity in ICEM for every pair of verticies, after setting up a global periodicity in the appropriate way.
i think it is somehow related to the fact that FLUENT can run 2D-Meshes and when it comes to 2,5-D dimensions there has to be an information about the nodes on the periodic faces WITHIN the mesh, otherwise, i personally think, there are "all nodes on BC" which is not possible, even if it is the case in 2,5D- periodic simulations.
but since Fluent isnt like CFX a cell-centered-approach, i am not sure about this because for CFX there is on element right between the nodes, so it can tun but Fluent is calc. on the nodes,.... so,... im confused.

hope you got my point.


johnp August 10, 2010 17:45


thanks for your input. i was able to import the mesh by removing the periodic faces and vertices in ICEM and remeshing. i then set up the periodic BC's in Fluent. Solver is still running, but so far so good...

All times are GMT -4. The time now is 12:32.