Meshing textile for dry fibre analysis

General discussion about TexGen.

Moderators: Martin, Developers

dyeyanie
Regular
Posts: 154
Joined: Thu Oct 06, 2011 10:39 am

Re: Meshing textile for dry fibre analysis

Post by dyeyanie »

Hi Louise,

I'm trying to write a python script for dry fiber mesh. I would like to clarify with you because I'm afraid I might commenting them incorrectly. What I'm trying to do is to get the same loading condition as applied in voxel mesh option. So as you mentioned before, I just need to leave the scale as 1. Am I right? The code is as follows;

Code: Select all

# Add the textile with the name "Textile#"
AddTextile("SNM2", Textile) ##
SaveToXML(r"C:\Users\Public\Documents\SENSE\MKSNM\SNM2.tg3", "SNM2", OUTPUT_STANDARD) ##

# Define a linear transformation
LoadScale = CLinearTransformation()
# Add a scale in the X direction
LoadScale.AddScale(1.0, 1.0, 1.0)

# Create an instance of the TextileDeformerAbaqus class
deformer = TextileDeformerAbaqus()
# Add the tensile deformation step
deformer.AddDeformationStep(LoadScale)

# Read in a TexGen model
ReadFromXML('SNM2.tg3')
textile = GetTextile()

# This is where all the work is done, note this may take a long time to run
deformer.DeformTextile(textile)

# Save the result back to a new TexGen model
SaveToXML('SNM2.tg3')
I'm getting an error which says,
Traceback (most recent call last):
File "gui", line 1, in <module>
File "C:\Users\Public\Documents\SENSE\MKSNM\MKSNM-Dry.py", line 124, in <module>
deformer.DeformTextile(textile)
File ".\Python\libxtra\TexGen\Abaqus.py", line 296, in DeformTextile
RuntimeError: ABAQUS has failed with error code: -1073741510

What when wrong actually? Hope you could guide me then.
Many thanks.

Yanie
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: Meshing textile for dry fibre analysis

Post by louisepb »

Hi Yanie,

As I said in my earlier reply, if you leave the scales as 1 then you are effectively creating an unloaded mesh and then you can specify the loading conditions as you require.

In your script you have called DeformTextile which will try to create an abaqus input file, launch abaqus, run the file and read it back into TexGen. If you simply want to create an abaqus .inp file you need to call deformer.CreateAbaqusInputFile See here http://texgen.sourceforge.net/api/class ... baqus.html

Alternatively you can load your tg3 file into the GUI and use the File->Export->ABAQUS File->ABAQUS Dry Fibre File... option.

Louise
dyeyanie
Regular
Posts: 154
Joined: Thu Oct 06, 2011 10:39 am

Re: Meshing textile for dry fibre analysis

Post by dyeyanie »

Hi Louise,

I'm following your last suggestion but I got a warning after export them manually in GUI. I attached the warning as follows;
***************************
*** CONTACT DEFINITIONS ***
***************************
*** WARNING: TexGen was unable to create contact definitions automatically
*** because the textile is not of type CTextileWeave
*Output, History, Variable=PRESELECT
*Output, Field, Variable=PRESELECT

As I mentioned before, I using a python script to create the geometry and for the load as I put XYZ (1.1, 0, 0) which I assume as similar a tension load to X direction only. Am I right here?

Yanie
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: Meshing textile for dry fibre analysis

Post by louisepb »

Hi Yanie,

The simulation will still run with the warning. It is telling you that, because the textile wasn't created using the one of the wizards and therefore is a CTextile type and not a CTextileWeave, it has not generated contact information.

Yes your load will be a tension load in the x direction.

Louise
dyeyanie
Regular
Posts: 154
Joined: Thu Oct 06, 2011 10:39 am

Re: Meshing textile for dry fibre analysis

Post by dyeyanie »

HI Louise,

With regards to the warning, I did used CTextile type in my script. Here is the script;

Code: Select all

import sys
from _Embedded import *
from TexGen.Core import *
from TexGen.Renderer import *
from TexGen.Export import *
from TexGen.Abaqus import *
import math

# subroutines of Pattern Generation
def patternVec(s): # 1 = warp (blue) , 0 = weft (red)
	if s == 1:
		return [
			[1,1,0,0],
			[1,1,0,0],
			[0,0,1,1],
			[0,0,1,1]]
		print "The pattern name is BasketWeave (4x4)"
	else:
		return [
			[1,1,1,0,0,0,1,1,1,1,1,1],
			[1,1,0,1,0,0,1,1,1,1,1,1],
			[1,0,1,0,1,0,1,1,1,1,1,1],
			[0,1,0,1,0,1,1,1,1,1,1,1],
			[0,0,1,0,1,1,1,1,1,1,1,1],
			[0,0,0,1,1,1,1,1,1,1,1,1],
			[0,0,0,0,0,0,0,0,0,1,1,1],
			[0,0,0,0,0,0,0,0,1,0,1,1],
			[0,0,0,0,0,0,0,1,0,1,0,1],
			[0,0,0,0,0,0,1,0,1,0,1,0],
			[0,0,0,0,0,0,1,1,0,1,0,0],
			[0,0,0,0,0,0,1,1,1,0,0,0]]
		print "The pattern name is Mata Berkait (12x12)"
#end of pattern generation subroutine

#Parameter of geometry
sp = 10.26  # spacing between the adjacent yarns 
yarnHeightX=1.038 # yarn height parallel in X
yarnWidthX=8.88 #width of yarn in X (Variable #4)
sx=sp 
sy=sx 
T = 2*yarnHeightX # thickness of matrix 

#Inputs for Voxel Mesh
nXvoxel = 250  #filename with MS for meshing
nYvoxel = 250
nZvoxel = 12

#Pattern Generation for 1st Pattern:
patternList=patternVec(2) # 
m=len(patternList)
n=len(patternList[0])
weave = CTextileWeave2D(m, n, sp, T, 1, False) #Geometry generation class of 2Dweave
weave.SetGapSize(0) # Gap size between upper and lower yarns
weave.SetXYarnSpacings(sx)
weave.SetYYarnSpacings(sy)

for x in range(m):
	for y in range(n):
		if patternList[m-1-y][x] == 1:
			weave.SwapPosition(x, y)
One more thing, I did tried to create the geometry by scripting them as what you published in the sample but the output is still the same. The warning is still displayed.

Yanie
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: Meshing textile for dry fibre analysis

Post by louisepb »

Hi Yanie,

I don't know what is going on here: if you have created a CTextileWeave2D then the pattern information should be there to create the contacts. You don't seem to have posted the whole script so I can't run it to see what is happening.

Louise
anuragdixitiitd
Regular
Posts: 47
Joined: Thu Feb 16, 2012 5:25 pm

Geometric Modelling of Yarns

Post by anuragdixitiitd »

Hi Louise,
Hope you must be fine. I am interested in modelling single layer plain weave unit cell of certain dimension with some reinforcing material (other than matrix) in the third direction. I tried it in 3D weave option but not able succeed.I want those reinforcing material to be visible in TexGen in the form of particle or small pieces.Whether it is posiible? I also tried it using orthogonal weave option where binders are available but it couldn't model it for single layer plain weave. I hope you understand...
Regards
Anurag
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: Meshing textile for dry fibre analysis

Post by louisepb »

Hi Anurag,

It sounds like your best option would be to create a plain weave using the 2D wizard and then add your other reinforcements to that. You could either add individual yarns using the GUI or using a script.

Hope that helps,

Louise
anuragdixitiitd
Regular
Posts: 47
Joined: Thu Feb 16, 2012 5:25 pm

Re: Meshing textile for dry fibre analysis

Post by anuragdixitiitd »

Hi Louise,
I am a bit confused while assigning yarn properties in Texgen.Though its straight forward but I wanna clear it!! I want to clear that whether this is fiber property or by the help of fiber properties these properties are calculated.eg. E11=Ef Vf etc.
Secondly can you
Secondly for adding reinforcement as discussed in my previous thread I wanna add these reinforcement as a third material other that (warp, weft and Matrix).How can I use 2D weave if I want to assign different properties to warp, weft, and reinforcing yarns?
Any tutorial problem or link, regarding 3D weave will be highly appreciated.
Regards
Anurag
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: Meshing textile for dry fibre analysis

Post by louisepb »

Hi Anurag,

I'm not entirely sure that I understand your first question. The yarn and matrix properties are input into TexGen and these are then used to calculate the material properties of the composite by whatever simulation you run.

You can assign properties to any of the yarns (and the matrix) whether you created them using one of the wizards or manually. See here: http://texgen.sourceforge.net/index.php ... Properties

Louise
anuragdixitiitd
Regular
Posts: 47
Joined: Thu Feb 16, 2012 5:25 pm

Re: Meshing textile for dry fibre analysis

Post by anuragdixitiitd »

Hi Louise,
Hope you might be fine. I want to change the crossection of yarns from elleptical to rectangular for that after selecting the yarns and going to assign section in the modeller menu i did it, but the problem is that the yarns are not visible properly as they interfere with each other. I want that each yarn should lie over the other properly showing there respective assigned thickness. I am attaching the figure for your reference.
Hope you understand my problem
Thanks & Regards
Anurag
Attachments
Image.png
Image.png (7.6 KiB) Viewed 25548 times
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: Meshing textile for dry fibre analysis

Post by louisepb »

Hi Anurag,

If you change to rectangular sections for this weave then there will be interference. You either need to move the yarns further apart (which will introduce gaps and probably not be very realistic) or change the cross-sections to avoid interference. Alternatively you could change the yarn paths so that the yarns are flatter where they lie one above the other and make the path steeper where the yarn changes from the top to the bottom of the textile. Why have you changed to rectangular? Are you trying to replicate an actual textile? If so you will probably need to look at the actual cross-sections and/or yarn paths to see what you should be modelling.

Best regards,
Louise
anuragdixitiitd
Regular
Posts: 47
Joined: Thu Feb 16, 2012 5:25 pm

Re: Meshing textile for dry fibre analysis

Post by anuragdixitiitd »

Hi Louise,
Yes I have changed the crosssection from circular to elleptical.
Thanks a lot

Regards
Anurag
anuragdixitiitd
Regular
Posts: 47
Joined: Thu Feb 16, 2012 5:25 pm

Re: Meshing textile for dry fibre analysis

Post by anuragdixitiitd »

Hi Louise,
Now, I am interested in unit cell shear modelling.In the unit cell in case of pure rotation: How should I apply the same displacements on the opposite parallel surfaces of a yarn? Whether I need to change boundary condition in my .inp file or should I export the .inp file in ABAQUS and there give the displacements.And whether periodic boundary condition's will be applicable in this case?
I am bit confused in going forward with simulation. Any link or study material will be highly appreciated.
Thanks and Regards
Anurag
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: Meshing textile for dry fibre analysis

Post by louisepb »

Hi Anurag,

Shear modelling is an area which we are looking at currently. If you simply create a sheared textile and maintain a box domain then you will need to change your boundary conditions to take into account the fact that the yarns are offset across the unit cell.

Alternatively there are several new developments in TexGen which will help you with this. I haven't done a release build of this yet so if you want to make use of it now you will need to download the code from the repository and build it yourself. There is now the option to create a sheared textile in the 2D wizard, with a sheared domain. The voxel mesh output now contains the option to create 'sheared' voxels which fit the sheared domain ( basically these voxels have a parallelogram prism shape ). Boundary conditions are generated automatically for the resultant mesh.

Hope that helps,
Louise
Post Reply