Meshing problem

General discussion about TexGen.

Moderators: Martin, Developers

Post Reply
lianges777
Regular
Posts: 10
Joined: Tue Apr 07, 2009 3:49 pm

Meshing problem

Post by lianges777 »

Hi
I have tried meshing 2D 5-harness weaves and very flat 2D plain weaves using Texgen. In order to get a refined mesh, I set the seed to be very small ( approx 0.01). However most the time when it comes to meshing 3D basic volumes, there is a bug occurring in the software and an error message tells that an unhandled exception has been raised.

This thing happened to me several times and I can't understand why. Is it impossible to get refined meshes ? Is a 2D weave with ten yarns, warp and weft, two big to be handled by Texgen?

Thank you very much for helping me
Angie
joncrookston
Expert User
Posts: 27
Joined: Wed Apr 11, 2007 4:03 pm
Location: Nottingham, UK

Post by joncrookston »

Hi Angie,

It's hard to know what the exact problem is; is there any more detail given in the error message?

It may be that if you are trying to achieve a very fine mesh then your computer is running out of memory - try looking at the memory use of the TexGen process using 'top' (in linux) or windoze task manager (shift-ctrl-esc). This may give you some clues. You could try reducing the size of the domain and meshing a small part of the model to see whether this alleviates the problem; I know this will not give you the mesh you require but it may help to diagnose the problem.

Hope this helps,
Jon.
lianges777
Regular
Posts: 10
Joined: Tue Apr 07, 2009 3:49 pm

Here is the scripts I ran and the message error I got

Post by lianges777 »

Hello!
Well I first define the geometry,running the following script:

#defining the geometry constants
a=0.6
a3=0.5
ag=0.2
gap=0.00524

# Create a 2D weave textile
weave = CTextileWeave2D(2, 2, a, a3, True)
weave.SetGapSize(gap)
weave.SwapPosition(0, 0)
weave.SwapPosition(1, 1)
weave.SetXYarnWidths(0, a-ag)
weave.SetXYarnHeights(0, a3/2)
weave.SetXYarnSpacings(0, a)
weave.SetXYarnWidths(1, a-ag)
weave.SetXYarnHeights(1, a3/2)
weave.SetXYarnSpacings(1, a)
weave.SetYYarnWidths(0, a-ag)
weave.SetYYarnHeights(0, a3/2)
weave.SetYYarnSpacings(0, a)
weave.SetYYarnWidths(1, a-ag)
weave.SetYYarnHeights(1, a3/2)
weave.SetYYarnSpacings(1, a)
weave.AssignDomain(CDomainPlanes(XYZ(0, 0, 0), XYZ(a, a, a3+gap)))
textilename = AddTextile(weave)



Then I saved the geometry under the name scidaessai.tg3
then I requested a mesh with a seed equal to 0.01 using the following script:



from TexGen.Core import *
filename='scidaessai'
pname=r"C:\Documents and Settings\UPM\Escritorio\weaves"+ '\\'+filename+'.inp'
# Read in the textile
ReadFromXML(filename+'.tg3')

# Get a hold of the textile we just loaded in
weave = GetTextile()

#meshing the domain
mesher = CMesher()
mesher.SetQuadratic(True)
mesher.SetProjectMidSideNodes(False)
mesher.SetSeed(0.02)
mesher.SetMergeTolerance(0.001)
mesher.CreateMesh(weave)
mesh=mesher.GetMesh()

#saving the mesh
mesher.SaveVolumeMeshToABAQUS(pname)



Unfortunely, five minutes later, the following error message appeared:



"Un unhandled exception occured. Press "Abort" to terminate the program,
"Retry to exit the program normally and "Ignore to try to continue."


Thank you very much
Angie
Jarvis
Regular
Posts: 11
Joined: Wed Aug 13, 2008 8:42 pm

Post by Jarvis »

I have some similar problems with the model I am working with. Often times when I mesh, my computer will pause for a long time when it is creating the mesh (like it should), but then it will return an empty mesh. Sometimes, it generates an error much like you are complaining of.

Here are some tips/ideas from things I have learned;

1. I think you can skip the step "mesh=mesher.GetMesh()" and just save the CMesher class to abaqus.

2. I have found that the seed size, the resolution and the merge tolerance all have a profound effect on the final mesh and the ability of TexGen to actually generate a mesh. For example on my model, a seed size of .32 and resolution of 30 will never mesh, but a seed size of .32 and a resolution of 38 will mesh no problem.

So, my advice is to try changing all three of these numbers to a bunch of slightly different values and see if it will ever mesh.

3. I have not had very good luck with Quadratic(True). It takes way longer to mesh, seems like it has a lower succes rate, and often when I imported these meshes into Abaqus some of the mid-side nodes of the ten node tetrahedrons were not in the right spot. In other words, the edge of an element was not a straight line (Abaqus cannot solve this problem, and the analysis will never complete successfully.) So to get around this problem, I wrote my own fortran code to take a linear mesh created by TexGen and convert it to a quadratic mesh and re-save the input file for importing to Abaqus.

If you want a copy of this code e-mail me at jschultz@uwyo.edu

Thanks,

Jarvis
joncrookston
Expert User
Posts: 27
Joined: Wed Apr 11, 2007 4:03 pm
Location: Nottingham, UK

Post by joncrookston »

I think (well, I know) that quadratic elements in Abaqus can have curved sides, and I think that TexGen exploits this in the meshing to give elements which fit the geometry better, i.e. which aren't faceted. However, it sounds like some of the sides are too curvy. (Abaqus/CAE mesher sometimes give a warning along the lines of 'To avoid forming bad elements, some mid-side nodes were not projected onto the geometry'.) The mesher is definitely in 'alpha', so if anyone knows any good developers with experience of writing meshers, just point them to this project. :)

The rumour is that there may be a new TexGen developer starting work at Nottingham soon, so maybe they will be able to address the mesher as one of their earlier tasks. I don't actually know what stage the recruitment process is at though, so don't stop work to wait.

Thanks for sharing some really useful knowledge in this thread.

Jon.
Jarvis
Regular
Posts: 11
Joined: Wed Aug 13, 2008 8:42 pm

Post by Jarvis »

Jon,

You are absolutely right that Abaqus can have curved edge quadratic elements. My post was a bit misleading.

I think you might be right that they were too curvy. When I tried to submit jobs Abaqus would fail and say something like "86 elements are badly defined" or something like that. When I look at those 86 elements, each one would have highly curved sides, and they would generally be very small elements with very acute angles to begin with.

Eliminating any curvature of the edges seems to be an easy workaround.

Thanks,

Jarvis
joncrookston
Expert User
Posts: 27
Joined: Wed Apr 11, 2007 4:03 pm
Location: Nottingham, UK

Post by joncrookston »

Yes, I'd agree with you on all counts there Jarvis. I have experienced similar problems both with TG and with the Abaqus/CAE mesher. Maybe you should submit an enhancement request on the sourceforge project for a better mesher ;).

Cheers,
Jon.
Post Reply