Apparent inaccuracy in volume mesh

General discussion about TexGen.

Moderators: Martin, Developers

Post Reply
Ross
Regular
Posts: 12
Joined: Wed Oct 31, 2007 4:57 pm
Location: College Station, TX

Apparent inaccuracy in volume mesh

Post by Ross »

I just finished a masters defense and will be moving more back into the world of textiles and geometry prediction, so I am re-familiarizing myself with TexGen. I noticed an issue with a volume mesh I created today using a python script. The mesh ended up coming out like this:

Image

The issue is the mesh at the edge of the tow. It sort of looks as though the volume mesh was laid down with larger elements such that some of the edges aren't able to approximate the geometry very well, and then this mesh is subdivided without trying to project new nodes onto the tow surface. Quadratic tets which should be able to better approximate curved surfaces, unless the midpoint nodes are generated between the tet vertices without regard for whether they lie on the surface (I suspect this is how things are done). I have yet to determine whether or not these small inaccuracies have much overall effect in FEA. I'll let you know once I find out. I'm also trying to use higher resolutions for the geometry mesh, but generating the mesh is taking a while on my PC. If that improves things I will report back...

For reference, the script I am using is as follows (based on the plain weave tutorial from the wiki, and note that it makes a lot of elements):

Code: Select all

# Create a textile
Textile = CTextile()

# Create a python list containing 4 yarns
Yarns = [CYarn(), CYarn(), CYarn(), CYarn()]

# Add nodes to the yarns to describe their paths
Yarns[0].AddNode(CNode(XYZ(0, 0, 0)))
Yarns[0].AddNode(CNode(XYZ(0.22, 0, 0.05)))
Yarns[0].AddNode(CNode(XYZ(0.44, 0, 0)))

Yarns[1].AddNode(CNode(XYZ(0, 0.22, 0.05)))
Yarns[1].AddNode(CNode(XYZ(0.22, 0.22, 0)))
Yarns[1].AddNode(CNode(XYZ(0.44, 0.22, 0.05)))

Yarns[2].AddNode(CNode(XYZ(0, 0, 0.05)))
Yarns[2].AddNode(CNode(XYZ(0, 0.22, 0)))
Yarns[2].AddNode(CNode(XYZ(0, 0.44, 0.05)))

Yarns[3].AddNode(CNode(XYZ(0.22, 0, 0)))
Yarns[3].AddNode(CNode(XYZ(0.22, 0.22, 0.05)))
Yarns[3].AddNode(CNode(XYZ(0.22, 0.44, 0)))

# Loop over all the yarns in the list
for Yarn in Yarns:

    # Set the interpolation function
    Yarn.AssignInterpolation(CInterpolationCubic())

    # Assign a constant cross-section all along the yarn of elliptical shape
    Yarn.AssignSection(CYarnSectionConstant(CSectionEllipse(0.18, 0.04)))

    # Set the resolution of the surface mesh created
    Yarn.SetResolution(40)

    # Add repeat vectors to the yarn
    Yarn.AddRepeat(XYZ(0.44, 0, 0))
    Yarn.AddRepeat(XYZ(0, 0.44, 0))

    # Add the yarn to our textile
    Textile.AddYarn(Yarn)

# Create a domain and assign it to the textile
Textile.AssignDomain(CDomainPlanes(XYZ(0, 0, -0.02), XYZ(0.44, 0.44, 0.07)))

# Add the textile with the name "polyester"
AddTextile("polyester", Textile)

# Create an instance of the mesher class
mesher = CMesher()
mesher.SetSeed(0.01)
mesher.SetMergeTolerance(0.0001)
mesher.SetQuadratic(True)
# Create the mesh
mesher.CreateMesh(Textile)
mesher.SaveVolumeMeshToVTK("PlainWeave.vtu")
Ross McLendon
Graduate Researcher
Texas A&M University
Post Reply