CFD Online Discussion Forums

CFD Online Discussion Forums (
-   ANSYS Meshing & Geometry (
-   -   [ICEM] Unstructure Meshing Around Imported Plot3D Structured Mesh ICEM (

kawamatt2 October 14, 2009 10:43

Unstructure Meshing Around Imported Plot3D Structured Mesh ICEM
So i am working to import a structured mesh from an academic meshing tool into ICEM so i can then use Fluent to simulate. The structured mesh i am working with looks like this:

As you can see i have been able to import this into ICEM and it found all elements and edges. I would now like to generate an unstructured tet mesh around this structured mesh. My steps are as follows.

1) I create a large surface around this structured mesh and 10 chords away from it.
2) I then segment this surface at the outer edge of the structured mesh.
3) I then delete this surface segment so i am left with a large surface with a hole in it the shape of the structured mesh.

4) Then i set the global mesh params, set the mesh for the surface with a hole in it, and set the curve sizes for both the outer edges of the surface and the hole edge.
5) Hit compute surface mesh and it computes fine but in the process deletes the imported structured mesh.

I started with the imported structured mesh in a part called Mesh. Before computing the unstructured mesh its info showed x number of elements. After computing the unstructured mesh it now shows no mesh in part Grid. I can't figure out how to only generate a mesh on part of the domain and leave the other part untouched. Anyone have any advice or hints?


PSYMN October 16, 2009 15:25

Respect Line Elements
1 Attachment(s)
Sure, no problem. THere used to be a tutorial about this (structured blower fan in an unstructured housing), I can find the image, but not the tutorial any more. Maybe you could get it from on in the archives on the customer portal.

The basic jist is you need to go to "Mesh tab => Global Mesh Setup => Shell Meshing Parameters" and turn on the option to "Respect line elements".

This means it will use the perimeter elements from your unstructured quad mesh (make sure it is converted to unstructured and not still structured domains) to create the unstructured tri mesh.

Also, when you go to compute the mesh, choose "merge" instead of "replace".

kawamatt2 October 22, 2009 11:23

I guess i must've done something wrong from the beginning. I can understand your suggestion to respect line elements and see how it would work from the help files. However i cannot get the program to recognize that the outer curve of my imported mesh is composed of X number of line elements.

I will reiterate exactly how i got this mesh in to be clear that i haven't made an error just importing this data. I used file/import mesh/plot3d data. That brought in my mesh and i was left with a surface that composed my mesh around the corrugated wing with 13xxx number of quad_4 elements. I was also left with the outer boundary as a series of 199 line-2 elements. The inner boundary was a series of 216 line_2 elements. To create surfaces and the like around this imported data i used Edit/Mesh->Facets. This created curves over top of the line_2 elements which allowed me to create the rest of my geometry.

Now i try to mesh using the options recommended above but i get no prompt to either merge or replace the mesh nor does the program seem to "see" the 199 line elements of the outer boundary of my imported mesh. Hence it still just deletes the imported mesh. I am still unclear if i am supposed to define a curve mesh setup for the outer boundary of my imported mesh which is the hole boundary in my created surface. Or will ICEM heed the protect line element prompt and just begin the unstructured mesh from this boundary with 199 line_2 elements and proceed with no other initial specification?

I hope this description is not too jumbled.
Thanks for you help.

PSYMN November 2, 2009 20:41

Not sure...
It doesn't hurt to have some curve parameters set even though the line elements will over ride them... Perhaps your existing line elements are not properly on the curve of the new surface being meshed...

Turn on nodes as dots and make sure they are green and on the correct curve...

Can you zoom in on this location and take a snapshot with the nodes as dots turned on and the mesh as wireframe so you can see that the lines and nodes are actually on the perimeter curves of the new surface.

DarrenC November 17, 2009 20:48

Hi Matt and Simon,

I have been trying to do something similar as well. Although I am able to get the two types of meshes to appear, I am not able to line the nodes up on the interface of those two mesh. The following photo shows the problem I am having.

Image :

What I have done so far is as follows :

1. Used blocking/Pre Mesh params for the structured part (RED).
2. On pre mesh, right click and convert to unstructured.
3. Then click on boundary (PURPLE) and set curve parameters.
4. Click on farfield boundary (not Shown) and set curve paramters.
5.Global mesh setup-> Respect Line elements. Ignore size -> 1. Mesh Type -> All Tri. Mesh Method ->Patch Dependent
6. Then Computer -> Surface Mesh-> Compute.

I also noticed that regardless of how low I set the maximum size for PURPLE curve, it always meshed to the same size? Could that be the problem?



kawamatt2 November 17, 2009 21:36

Maybe try toggling "protect given line elements" in addition to the "respect line elements." I'm also not totally clear what the ignore size specifies but you might try to start varying it by factors of 10 down to see if that makes a difference.

Also how are you going about making the tet mesh around the newly unstructured hex mesh? Do you make a surface from the "boundary" purple line to your "farfield" line? If so which line do you select when trying to set the "curve mesh setup"? Do you select your actually boundary purple line or do you select the "tmpxxx" line that was created when you made the surface. I have found that if i try to select the actual geometry line, in my case the teal geometry of the airfoil below, the curve params don't actually get considered in the mesh generation.

BUT, if i suppress the actual airfoil geometry but keep the surfaces shown i now see the green line as below that was created when i made the surface around the airfoil. If i select this line, which often happens to be called .tmp something, the curve params are actually considered when meshing the surface.

This sorta makes sense since when hit computer you are actually trying to mesh the surface and so you should have to define the curve mesh params on the actual curves of the surface and not just the curves of the geometry. This then leads to the next question of shouldn't the curves of the geometry be associated with the curves of the surface? I would think so but i never had any luck only defining the curve mesh setup for the geometry alone.

Hope that was some sort of clear! Good luck!

DarrenC November 17, 2009 23:42

Hi Matt,

I tried to toggle 'protect line elements' but it gave me a bad mesh so thats not good. And everytime I reduce 'ignore size' it would refuse to mesh.

As to your other question, I just define the the curve mesh parameters for my boundary purple line and my farfield line. I just input the max size for those curves and click mesh. I do not define a surface between the purple boundary and farfield. The funny thing is when I change the size on the farfield line it responds but that does not work for the purple boundary line.

And to your question regarding 2 sets of boundary lines( one for surface and one for geometry), I normally just have one set of lines which are my geometry lines.My surfaces are defined from my geometry lines. Its odd that you have two sets of boundary lines. Maybe its a consequence of your import from plot3D.

As an aside, I tried the curve mesh parameter to grow some inflation layer near my airfoil boundary. While this worked, when I tried to check my mesh, it says that the first layer of my hex mesh (the one closest to the airfoil boundary) has a 'single edge problem'. Have you encountered this problem before?

Thanks again!

Best Regards,

kawamatt2 November 18, 2009 08:03

Oh ok, yea i was not real sure how the "protect given line elements" would work. On the second set of boundary layer lines toggle off your purple boundary layer line in the part tree window within the "Parts" drop down. Also turn the mesh off and make sure you have the "surfaces" radio box toggled within the "geometry" drop down. Now see if you can still see a line where your purple boundary layer line used to be. If you do infact have a surface defined from the boundary purple line to the farfield then i bet you will see something there. For me it was always a bright green line. Try selecting this when defining the curve mesh setup and give it a value the same number of axial lines as hex blocks you have in the axial direction.

If that doesn't get you somewhere then hopefully Simon can chime in. He seems very busy so it may take a few days.

Also about the error with single edge elements. I have recieved that error as well but it is not a problem. What I think its saying is that all your elements right on the airfoil have one side that is not connected to any other elements. These sides of course represent the physical wall of your airfoil. For me once i generate a mesh i can then import to fluent and simply define the airfoil curve as a physical wall and there is no problem with the mesh.

snailstb November 21, 2009 11:21

This means it will use the perimeter elements from your unstructured quad mesh (make sure it is converted to unstructured and not still structured domains) to create the unstructured tri mesh. QUOTE]
i wonder that how to keep creating the tri mesh in "unstructured domains" , when i create the tri meshes, quad meshes which created formerly disappeared? how do you delete the duplicate nodes and mesh lines at interface? thank you very much

DarrenC January 20, 2010 00:42

Hello everyone,

Ive recently came back to this problem and made some progress on it. Almost there but still a bit stuck. Hope simon or someone out there can chip in. Here are some of the things that I did :

First, once you have converted your structured mesh to unstruct. Go to the Mesh tree and activate lines. These are the mesh line elements. I highlighted the mesh lines around the edge of the structured mesh and add them to a separate part together with the geometrical line of the structured mesh (I called it Blayer). (Note both mesh lines and geometry lines are different, something kawamatt tried to tell me and I fail to notice =)). Once that is done. I go to global mesh setup and select respect line elements. Under ignore size, I set it to something really small ~0.0001. Now in the parts tree just make visible the items you want to mesh (in my case, it is blayer and farfield), turn off your structured mesh etc etc. Once that is done I set my mesh sizes for blayer and farfield , click compute mesh, and under select geometry i chose 'Visible' so that it will only mesh between blayer and farfield. Click compute and you should get the unstructured mesh lining up with the structured one and shown below :

Now here is where I am stuck. I did a mesh check and I get a single edge problem in between my unstruct and structured mesh as shown above. From what I deduce, somehow the structured mesh is not recognizing the unstructured mesh but I cant be too sure. Also Simon mentioned earlier that there should be a Merge/Replace Mesh box that comes up when Compute mesh is clicked but i did not get that. Anyone have any ideas??

Thanks in advance.


PSYMN January 20, 2010 13:49

I am in a rush today and not sure what went wrong, but it looks like all the mesh is there and aligned so I will tell you how to move forward anyway...

Go to edit mesh => merge => Merge nodes with a tolerance. Set the tolerance to something smaller than your smallest edge length and hit apply... It should connect all these nodes across that single edge and take care of it for you.


DarrenC January 22, 2010 20:09

Hi Simon,

Thanks a bunch for that. Ive tried your method. Its is still not working all of the time, but im starting to discover how to get it to merge consistently with your method.

On another note, Ive also discovered that there was an error in my previous method thats causing it not to merge. All ive changed is to leave my sturctured mesh visible together with blayer and farfield curve geometries and mesh visible as usual. This time it recognizes the structured mesh and the single edge message disappears.


kawamatt2 January 27, 2010 10:37

Hey Darren,

I've also decided to revisit this problem some more. I have tried to follow your steps but still cannot get the surface mesher to respect the line elements from the structured meshing. My steps are as follows.

I block my mesh and then right click and convert to unstructured. All looks well but even when i toggle on lines in the mesh drop down list i still cannot select the actual mesh elements to add to another part as you did with your Blayer. What is interesting though is if i right click for info on my boundary line (which you call your Blayer) it already tells me that there are XXX number of Line_2 elements on this line. So i presume that my mesh line elements have already been added to this part.

Now i then make a surface from my boundary layer (Your Blayer) to my farfield and set my global mesh params exactly as you have. I specify Ignore Size of 0.0001 and respect line elements. Then i set my mesh params for the surface between the boundary layer and farfield and then finally i set my curve mesh params for the farfield and then the boundary line (your Blayer). I then toggle off all parts except my surface, farfield, and boundary layer and compute visible.

Now for some reason the program seems to be ignoring my "respect line elements" as the tri mesh is grown from the boundary layer by the curve mesh parameter i set on the boundary layer. I was under the impression that the option to respect line elements would override any curve mesh params i set to mesh.

Now what I am thinking could be my problem is the way I am making my surface for the farfield before I mesh. One thing i do notice is that when setting my curve mesh params before computing if specifically and only select my boundary layer (your Blayer) and set size the tri mesh just grows right through my structured mesh and everthing and assumes a uniform size of whatever i specified as max size for the surface. To even get a mesh growing from the boundary layer I have to select not only it but also a line which i think is in the surface part and set the curve mesh param on it. This all leads me to believe that my computing mesh is only taking its info from this line from the creation of the surface. But this line has no mesh lines in it. They are all in the boundary layer line!

If your not confused as heck by now, can you give me any tips on how you make the surface to tri mesh and if you make it before you block or what?

kawamatt2 January 27, 2010 22:53

Nevermind the above. My problem was that i was trying to make a surface to create my tri mesh on. That i found was the wrong approach. I could simply do as Darren suggests and compute the mesh with only the Blayer and farfield along with the now unstructured mesh that was already there.

I am running into another issue though. When importing this mesh to Fluent i am having trouble changing the boundary condition of the Blayer line. By default, once read, it is interpreted as a wall in fluent. Of course this is not the case and it should be just part of the interior. So how can i either suppress this line or change it to an interior line. When i try to simply change it from wall to interior it tells me it cannot change it because the line is separating elements of two different types. I presume, tri and hex.

For that matter is it the proper procedure to even try to change it to an interior BC? I have been having trouble with the airfoil i have mentioned earlier in the post and I am beginning to wonder if it is because i have this boundary line that i have told fluent should be an interior part of the mesh.

DarrenC January 31, 2010 23:24

Hi Matt,

Sorry I couldn't reply earlier as I was quite buzy during the last week. Im glad that you managed to figured it out yourself.

With respect to your problem with Fluent, im not too sure what is going on with that. Normally when I open my .msh file in fluent after ICEM, there will be 2 Blayer lines in boundary conditions (named blayer and blayer-shadow). Did you get this as well? From what Ive read, you will get this if you have an interface of two different meshes like what we are doing with Blayer. To get rid of this I just converted any one of those lines to interior and blayer-shadow will dissappear.

One thing you could check is how many mesh lines (line_2) do u have at the blayer interface? You should only have one defined.

kawamatt2 February 24, 2010 20:38

Hey Darren,

Just wanted to update this one last time for future reference. My problem happened to be that when my mesh was imported to fluent the quad mesh and tet mesh came in as 2 different cell zones. Unfortunately the quad mesh between blayer and airfoil was interpreted by fluent as a solid zone. Therefore i could not change the blayer line to an interior line. To remedy this i had to go to the cell zone condition tab and change this zone to a fluid from a solid. Then I was able to change the blayer line to an interior line.

Thanks everyone for the help!

DarrenC February 24, 2010 20:46

Hi Matt

Incidentally I had the same problem a couple of days ago, and I totally forgot that you had the same problem as well. haha.

Oh well all is good now. Time to tackle my next ICEM error =)

Good luck with the rest of it and maybe ill catch you in another thread soon.

Till then

Igor_Iliev December 20, 2011 12:45

Hello Simon,
I've spent two weeks searching for the blower tutorial you mentioned here, no positive results so far. Can you please search for it, if you can find it.
Thanks, Igor

All times are GMT -4. The time now is 11:06.