You are on page 1of 11

Technical report A.Azodinia, A.Mosavi, University of Debrecen, Faculty of Informatics, 2011.

A Brief Report on Geometrical Modeling and Meshing of Textile Structures in TexGen


A.Azodinia, A.Mosavi, University of Debrecen, Faculty of Informatics, 2011.

TexGen models the geometry very quickly and easily. It creates meshes of textiles automatically in order to be utilized for further mechanical modeling and analysis. Alternatively Python scripts can be used to transfer geometry, as well as the meshes of the textile to specific third party applications such as ABAQUS. Using GUI is very simple and more convenient rather than preparing and compiling a python script. In TexGen GUI, the log window at the bottom contains an interactive Python Console along with Python Output and TexGen Output windows. The interactive console allows the user to type Python commands and see the results in an interactive manner. This can be useful for small operations and learning how to use the python scripting interface. The Python Output log window displays all the Python code executed by the GUI. Essentially every button pressed in the user interface will create a Python command. This is done by design, making it possible to record Python scripts while interacting with the GUI. The 3D representation window is located at
the center and visualizes the user specified textile.

TexGens GUI

Technical report A.Azodinia, A.Mosavi, University of Debrecen, Faculty of Informatics, 2011.

The TexGen Output log window displays log and error messages from TexGen. These generally include information on what TexGen is doing, if something goes wrong it is useful to read the log to find out what happened. Error messages will be displayed in red so that they can be easily located.

Python output log when something is wrong

However, in GUI of the TexGen a lot of features are not supported. Therefore, for those who are comfortable with doing a bit of programming, using the Python interface is recommended. Features like changing the shape of the yarns, changing the mesh model cannot be accessed through GUI. For instance the below textile is generated through the script which enables the user to define the special domain for it (boundary truncation), which can be hardly achieved with the aid of the GUI part.

textile.py (Textiles script is available for download)

Technical report A.Azodinia, A.Mosavi, University of Debrecen, Faculty of Informatics, 2011.

Yarns dimension alteration


Generally altering the size of the yarns can be achieved either using the GUI or changing the corresponding value in the python script of the textile. Designing a textile, the operator may be looking for changing all the yarns at once. There is a feature in TexGens GUI (Window Controls Edit Fabric Thickness), which enables the operator to alter the dimension of all the yarns.

For instance the textile with the Thickness Value of 0.2 is the left geometry and the one with the Thickness Value of 1.0 is the right geometry.

Fabric Thickness=0.2

Fabric Thickness=1.0

Technical report A.Azodinia, A.Mosavi, University of Debrecen, Faculty of Informatics, 2011.

However, in some cases, the changes in a special or a set of specific yarns is required. Therefore, the change in the dimension of a desired yarn can be achieved by setting the yarn width and its height. This can be applied to all the yarns by defining the Thickness Value in the first window.

Dimension alteration of a specific yarn Changes have been illustrated in the below textile by setting the yarn width value of the yellow yarn to 1.0:

Technical report A.Azodinia, A.Mosavi, University of Debrecen, Faculty of Informatics, 2011.

Yellow yarns width is changed to 1.0 However, changing the dimension of the yarn can be achieved through the script manipulation. The command CSectionEllipse defines an elliptical cross section with given width and height
defined by the first and second parameters respectively in the textile.py script.
# Assign a constant cross-section all along the yarn of elliptical shape Yarn.AssignSection(CYarnSectionConstant(CSectionEllipse(0.18, 0.04)))

Whereas the general form of the command, the first parameter that is passed by the command CSectionEllipse(0.18, 0.04) is the Width of the yarn and the second passed parameter is the Height of the yarn. Changing the value of these two parameters will create new textile geometry.

Width = 0.18, Height = 0.04

Width = 0.10, Height = 0.02

As in the UML Class diagram for the Core module [1] there is another option in this command, which will change the shape of the yarn accordingly.

Class Diagram for the Core module

Technical report A.Azodinia, A.Mosavi, University of Debrecen, Faculty of Informatics, 2011.

The following classes change the shape of the textiles yarns.


CSectionEllipse CSectionPowerEllipse CSectionLenticular CSectionBezier CSectionHybrid CSectionPolygon

Utilizing them in the textile.py script, would lead to different shapes of the yarn in the textile (the first three classes are illustrated here). The CSectionEllipse class uses the width of the yarn as the first parameter, the Height of the yarn as the second parameter.

Ellipse (0.18, 0.04)


The CSectionPowerEllipse class uses the width of the yarn as the first parameter, the Height

of the yarn as the second parameter and the Power value as the third parameter.

CSectionPowerEllipse (0.18, 0.04, 0.5)

Technical report A.Azodinia, A.Mosavi, University of Debrecen, Faculty of Informatics, 2011. The CSectionLenticular class uses the width of the yarn as the first parameter, the Height of

the yarn as the second parameter and the Power value as the third parameter.

Lenticular (0.18, 0.04, 2)

Mesh of the textile in TexGen


The aim is to show how to get a volume mesh of the textile which can be visualized or be saved to an arbitrary file format. This is a common task. However, there is very little standardization on the file format for meshes and the operation must often be repeated as well. Each software package uses its own mesh file format so the user must learn to read and write to these different formats. Fortunately utilizing the Python language in TexGen is ideal for performing these tasks with relative ease. The following two illustrated solutions may be applied inside TexGen, which provide with the visualization of the corresponding mesh of our textile. Needless to say, these features introduce a possibility to render the textile volume which has no use. If user wants to view the surface mesh then choose the Rendering X-Ray option.

X-Ray

Technical report A.Azodinia, A.Mosavi, University of Debrecen, Faculty of Informatics, 2011.

To view the volume mesh choose Rendering Render Textile Volume. Note that in order to get the mesh it is better to deselect Render Textile Surface first so that you don't get the two superimposed.

Render Textile Volume The above figure is the corresponding mesh of the textile. The model of the mesh may vary according to the users interest. However, proposed method is just the visualization of the mesh. In most of the cases the mesh of the textile should be exported to an arbitrary file format to be usable by the third party application. For having more freedom and flexibility in meshing process it is possible to use Python scripting and the other useful built-in functionalities of TexGen. In this case, the file of the geometry which was saved as a TG3 file format is utilized. The TG3 is created by a short command at the end of the Python script of the TexGen textile script. Later the meshes are extracted from this file. With a few lines of codes a volume mesh of yarns consisting of a number of nodes and elements are stored in memory. Moreover finding the opposite nodes and cells could be possible with the aid of advanced scripting with Python.

The Volume Mesh option:


The Volume Mesh option (File Export Volume Mesh) will give you tetrahedral elements (i.e. with triangular faces) and the Voxel Mesh option will give you hexahedral elements (i.e. with rectangular faces). Voxel meshes can only be saved as Abaqus files. The output file created by Volume Mesh option would be a .vtu file, which can be viewed with the aid of other interfaces such as ParaView, Visualization Toolkit (VTK), CMake, CDash etc. If you use Paraview to display mesh.vtu file then you can get each yarn to display in a different color if you choose the "Color by" yarn index.

Technical report A.Azodinia, A.Mosavi, University of Debrecen, Faculty of Informatics, 2011.

Imported mesh.vtu file into Paraview (Surface and Edges)

Imported mesh.vtu file into Paraview (Wireframe)

In Volume Mesh option, there is a dialog to change the mesh size by changing the seed size. Utilizing this option allows the user to change the dimensions of the mesh elements. If you are using the script, the resolution of the surface and volume meshes can be changed using the Yarn.SetResolution functions [3]:
# set the resolution of the surface mesh created Yarn.SetResolution( 40 )

ABAQUS file export: TexGen provides a sophisticated way of exporting meshes for the third party application, Abaqus. The mesh which is fed into Abaqus is called an Orphan Mesh. Some features in Abaqus cannot be applied on orphan meshes. Two options are available for ABAQUS file export in order to get the Orphan Mesh.
1.

ABAQUS Dry Fibre File (Select File Export ABAQUS File ABAQUS Dry Fibre File) Local adjustments to the volume mesh will be made until the intersections are within the selected intersection tolerance. If the intersection is deeper than one volume mesh element then an error message will be displayed and no correction will take place. Regenerate Mesh will create a new textile based on the adjusted mesh. The volume mesh is regenerated and used to produce the ABAQUS .inp file. This option will create more evenly spaced elements than if the Adjust Intersections option is used on its own.

Technical report A.Azodinia, A.Mosavi, University of Debrecen, Faculty of Informatics, 2011.

2.

ABAQUS Voxel File (Select File Export ABAQUS File ABAQUS Voxel File)

Select the number of voxels required in x, y and z directions. Select whether to output yarns, matrix or both. The "All Tied" option assumes a material continuum where the RVE is considered to be infinitely small compared to the size of the engineering part. The "Z untied" gives a 2.5D simulation, assuming a one layer RVE solving in the x and y directions

Technical report A.Azodinia, A.Mosavi, University of Debrecen, Faculty of Informatics, 2011.

Proposed solution If user utilizes one of the export methods (Volume Mesh, ABAQUS dry fibre or ABAQUS voxel) then this will generate a mesh of the textile. Alternatively if you export as STEP or IGES then the geometry will be exported which you could then mesh within ABAQUS (Although this method is not always reliable). According to [2], another option which I've just seen when I did a search was "3D Mesh to Geometry Plug-in" for ABAQUS. This will apparently generate geometry from an orphan mesh which can then be remeshed within ABAQUS. With the 3D Mesh to Geometry Plug-in, users can create a geometry representation of an orphan mesh within Abaqus/CAE. The geometry-file will be written in ACIS-format (.SAT) and essentially consists of triangular faces corresponding to the outer faces of the original mesh. If required, the geometry repair options and/or virtual topology allow the user to clean the geometry References
[1] M. Sherburn, "Geometric and Mechanical Modeling of Textiles", Thesis in preparation, 2007, Nottingham, UK. [2] http://www.simulia.com/products/3dmesh.html

[3] http://texgen.sourceforge.net/index.php/Scripting_Export_Mesh