Removal of yarn interpenetration

General discussion about TexGen.

Moderators: Martin, Developers

Post Reply
Guoweiyu
Posts: 2
Joined: Tue Apr 13, 2021 12:43 pm

Removal of yarn interpenetration

Post by Guoweiyu »

Hi, Louise,
I am a new TexGen user who believes that the software helps me with my recent work on modelling 2D textile. Since solving the interpenetration between the generated yarns has become the key operation to achieve a model for FE analysis and regarding this topic, I have checked the relevant Q&As carefully in the forum and found that the built-in algorithm in TexGen can deal with small depth yarn interpenetration (The intersect depth is lower than 0.5*yarn’s thickness) by the function CAdjustMeshInterference in the meshing level. However, according to your reply and other users’ feedback, after the procedure, the resulting yarns which initially intersect with each other can preserve neither their areas nor shapes.
Hinted by Rinaldi et.al[1], I want to remove the interpenetration problem in the geometry level, I mean just after the geometry is generated in TexGen GUI or scripting, rather than solving it in the step of meshing (export to Abaqus). Can you tell me where to start if I want to modify the geometry generated by Texgen? I know that scripting myself would be necessary. What I want to know is how to integrate it with TexGen after I write the script?
Therefore, my questions are summarized as:
1. Do you have updated the algorithm for solving yarn interpenetration that leads to the constant area of the resulting yarns?
2. If I have written an algorithm that eliminates the interpenetration of yarns at the level of geometry, and want to add this function to TexGen, which module should I put in, and how to integrate it with other functions? (I appreciate to hear detailed resolution since I am now a green hand in programming and still learning how to code in Python or C++ languages)
Best regards
Weiyu Guo


Reference
[1] Rinaldi, R. G., Blacklock, M., Bale, H., Begley, M. R., & Cox, B. N. (2012). Generating virtual textile composite specimens using statistical data from micro-computed tomography: 3D tow representations. Journal of the Mechanics and Physics of Solids, 60(8), 1561-1581. DOI: https://doi.org/10.1016/j.jmps.2012.02.008
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: Removal of yarn interpenetration

Post by louisepb »

Hi Weiyu Guo,
If you use the function AdjustTextileMesh in the CAdjustMeshInterference class then this will make adjustments to the textile cross-sections (in the actual model). If you use this you will see that the geometry is adjusted. This will make adjustments if the intersection is less than one volume mesh element deep (not 0.5*yarn diameter).

Otherwise you can make adjustments to the model either using the GUI or Python scripting. The most likely things to change would be either the yarn cross-section or the nodes (ie the yarn path). If you write a script you can run it through TexGen using the Python->Run Script option. You can also call Python commands in the Python console window in the GUI. It isn't necessarily the case that you need to maintain the yarn's area. If you look at real textiles the yarns are often compressed. The main thing to check in a model is that they aren't compressed beyond a realistic volume fraction. When TexGen exports models the .eld file will contain the local Vf for each element, reflecting any change in cross-sectional area.

If you write an algorithm for eliminating interpenetrations you would probably create a new class or maybe add functions to one of the textile classes, depending on how you write the code. If you add to the C++ code you can either just use it yourself in a local copy or, if you would like to contribute to the open source code, you would need to fork from the GitHub repo and then make a pull request to have your code added. You could also write code in a Python module which you could import and call via a call in the GUI.

Hope that helps,
Louise
Guoweiyu
Posts: 2
Joined: Tue Apr 13, 2021 12:43 pm

How to simulate voids in TexGen model

Post by Guoweiyu »

Hi Louise,
Thank you for your reply to my last question concerning yarn intersection! And I have another question while modelling with TexGen, which is how to simulate big voids in TexGen. I've tried to achieve that with the idea of creating additional yarns in areas enclosed by the red rectangle in the following picture while defining their sections and paths to resemble the voids, and then assign them very low stiffness when doing FE analysis. But when I do that, the TexGen shows me an error as "error projecting up vector to be orthogonal to the tangent vector". It seems that the idea is unreasonable. Therefore, Could you please give me some advice on simulating voids in TexGen?
Best regards
Weiyu Guo
voids area in the domain.png
voids area in the domain.png (92.82 KiB) Viewed 9951 times
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: Removal of yarn interpenetration

Post by louisepb »

Hi Weiyu Guo,

Have you made the extra yarns vertical? TexGen uses an 'up' vector to generate the vector orthogonal to the yarn for creation of the sections. By default this is '0,0,1' but this gives a problem for vertical yarns because it calculates a cross-product with the yarn tangent (in the case of a vertical yarn, also 0,0,1). The easiest way to solve this is to edit the .tg3 file and edit the up-vector parameters to, say, 0,1,0 which will be perpendicular to the tangent.

Hope that helps,
Louise
Post Reply