sheared geometry with GUI

General discussion about TexGen.

Moderators: Martin, Developers

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

sheared geometry with GUI

Post by dyeyanie »

Hi Louise,

I have tried the latest sheared textile options from GUI but I found out that the generation of the geometry is pretty slow. I tried to do 12-by-12 geometry with some complex arrangements and I need to wait quite long time to generate them. Is there any limitation to the geometry sizes? Or is there any certain software required?

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

Re: sheared geometry with GUI

Post by dyeyanie »

Hi Louise,

Corresponds to this, I got a warning which say;

Modify Section: all points increased to max value. Unable to achieve original section area

What does this means?

Many thanks.

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

Re: sheared geometry with GUI

Post by louisepb »

Hi Yanie,

I'm afraid that with a 12x12 geometry the refine option in the shear wizard will be fairly slow. It is doing a large number of computations so, I'm afraid, that it's a case of being patient. You could try reducing the resolution (number of sections around yarn and number of slave nodes). I think that the default resolution is 40 so if you are ok with reducing this then the computation time will decrease. Could you reduce the size of your unit cell (make use of symmetry for example?)?

The warning is related to one of the steps of the refinement but shouldn't cause the process to fail. I've attached a recent paper from Texcomp-11 which describes the refinement process for the sheared textiles. This message is generated in the final step where the outer surface of the yarns are expanded in order to try and retain the original yarn cross-sectional area. It is possible that the yarn volume fraction is still a reasonable value even when this error is generated. I haven't, as yet, incorporated a check on the volume fraction.

Hope that helps,
Louise
Attachments
Predicting the CTE for textile composites based on a unit cell approach.pdf
(629.21 KiB) Downloaded 331 times
dyeyanie
Regular
Posts: 154
Joined: Thu Oct 06, 2011 10:39 am

Re: sheared geometry with GUI

Post by dyeyanie »

Hi Louise,

I've reduced the geometry size to 1 x 12 and I still got a problem with the generation of sheared yarn when I choose the 'refine option'. I got this warning which saying,
'couldn't mesh closed loop on domain edge' . Then, the software became not responding at all. I have no problem to generate the geometry if I just unchecked the refine option and proceed with the sheared domain. I found that there are some 'isolated' mesh in my analysis as attached.

Yanie
Attachments
mesh.png
mesh.png (154.59 KiB) Viewed 4242 times
louisepb
Project Leader
Posts: 988
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: sheared geometry with GUI

Post by louisepb »

Hi Yanie,

If you could send me details of the parameters you are using to create your textile then I can see if I can reproduce the issues and try and work out what the problems are.

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

Re: sheared geometry with GUI

Post by dyeyanie »

Hi Louise,

I generated this with GUI and the details are as follows;
Warp yarn = 1
Weft Yarn = 12
Y. Spacing = 0.96
Y.Width = 0.34
Fab. Thick = 0.19
sheared angle = 3.2

I checked the 'create sheared domain' , 'Force-in-plane tangents at nodes', 'sheared textile'. I imposed a tension load to this geometry via Dry Mesh option only at X-axis = 1.2. the rest remain 1.0, 1.0.

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

Re: sheared geometry with GUI

Post by louisepb »

Hi Yanie,

You didn't specify the weave pattern so I'm not sure if I've created exactly the same model as you.

The 'isolated' mesh that you describe is a function of the way that the dry fibre export separates the elements at either end of the domain. It takes the element centre point and checks if that is inside the domain. If so, then the whole element is assigned to that position. If you look at the opposite end of your model you should see the corresponding elements 'missing' at the other end. This maintains periodicity without splitting elements.

If you let me know the exact weave pattern that you have created then I will see if I can find the problem with the refine.

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

Re: sheared geometry with GUI

Post by dyeyanie »

Hi Louise,

Sorry for that. Here is the pattern .

Yanie
Attachments
pattern.png
pattern.png (8.64 KiB) Viewed 4224 times
louisepb
Project Leader
Posts: 988
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: sheared geometry with GUI

Post by louisepb »

Hi Yanie,

There is obviously a bug in the refine option which I will try and track down. However, given that in the 1x12 textile there are no intersections in unrefined textile, I'm not sure why you would need to refine it anyway?

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

Re: sheared geometry with GUI

Post by dyeyanie »

Hi Louise,

That's the reason why I don't refine them for a single yarn as I attached here. I just tried to refine them to see the refine options function. Because previously my intention is to refine 6 x 12 yarns. Since it doesn't work at all, so I need to take another alternatives.

Anyway, thanks for your help.

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

Re: sheared geometry with GUI

Post by louisepb »

Hi Yanie,

Could you send me an example of a 6x12 textile where the refine fails please? It may not be the same problem as in the 1x12. That would help me as I can only solve bugs when people report them!

Thanks very much,

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

Re: sheared geometry with GUI

Post by dyeyanie »

Hi Louise,

I attached here the sheared pattern that I tried to generate. I got the warning which saying ' unable to closed loop..'. Perhaps there must be missing command in my code. I have several things to raise here :
1. I would like to have different sheared angle for weft and warps. How should I called them instead of using the example given in the webpage? Perhaps you may consult me on that.

2. I also would like to set the properties of yarn through the code. But it doesn't work for my yarns but it's fine to set for the matrix.

Code: Select all

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

# subroutines of Pattern Generation
def patternVec(s): # 1 = warp (blue) , 0 = weft (red)
	if s == 1:
		return [
			[0,0,0,0,0,0],
			[0,0,1,0,0,1],
			[0,1,1,0,1,1],
			[0,0,0,0,0,0],
			[0,0,1,0,0,1],
			[0,1,1,0,1,1],
			[0,0,0,0,0,0]]
		print "The pattern name is BerasPatah2 (6x6)"
	else:
		return [
			[1,1,0,1,1,1,0,1,1,0,0,0,0,1,1,0,1,1,1,0,1,1,0,0,],
			[0,0,0,1,1,1,1,1,0,0,0,0,1,0,0,0,1,1,1,1,1,0,0,0,],
			[0,0,1,1,0,1,1,1,0,1,1,0,0,0,0,1,1,0,1,1,1,0,1,1,]]
		print "The pattern name is Kelarai Apit Kale(13x3)"
		
#end of pattern generation subroutine

# Define some constants 
spacing = 0.379 ## User Change here
width = 0.169 ## User Change here
height = 0.084 ## User Change here
shearAngle = 0.7/180*pi ## User Change here
T = 2*height ## Fabric thickness
twistAngle = shearAngle
shearOffset = spacing*sin(shearAngle)

#Inputs for Material Properties
MatYM = 2500 ##User Change here
MatPR = 0.35 ##User Change here
MatAlpha = 6.5e-006 ##User Change here
YMX = 51.92e+009
YMY = 21.97e+009
YMZ = 21.97e+009
SMXY = 8.856e+009
SMXZ = 8.856e+009
SMYZ = 6.250e+009
PRX = 0.2489
PRY = 0.2489
PRZ = 0.2143

#Inputs for Voxel Mesh
nXvoxel = 300 
nYvoxel = 300
nZvoxel = 50

#Pattern Generation for 1st Pattern:
patternList=patternVec(1) # CHOOSE HERE *
m=len(patternList)
n=len(patternList[0])
weave = CShearedTextileWeave2D(m, n, spacing, T, shearAngle, 0, 1) #Geometry generation class of 

2DShearedweave
weave.SetGapSize(0) # Gap size between upper and lower yarns
for x in range(m):
	for y in range(n):
		if patternList[m-1-x][y] == 1:
			weave.SwapPosition(x, y)

# Create a new textile to contain the combination pattern
Textile = CTextile()	
Yarns = weave.GetYarns()

# Create a cross-section which twists along the length of the yarn to accommodate the sheared fabric 

architecture
ellipse = CSectionEllipse(width, height)
sectionTwist1 = CYarnSectionInterpPosition()
sectionTwist1.AddSection(0.25, CSectionRotated(ellipse, -twistAngle))
sectionTwist1.AddSection(0.75, CSectionRotated(ellipse, twistAngle))
sectionTwist2 = CYarnSectionInterpPosition()
sectionTwist2.AddSection(0.25, CSectionRotated(ellipse, twistAngle))
sectionTwist2.AddSection(0.75, CSectionRotated(ellipse, -twistAngle))

YarnX = [CYarn() for i in range (m)]
YarnY = [CYarn() for i in range (n)]
for Yarn in YarnX:
    Yarn.AssignSection(sectionTwist1)
for Yarn in YarnY:
    Yarn.AssignSection(sectionTwist2)

# Loop over all the yarns in the list
for Yarn in Yarns:
    # Set the resolution of the surface mesh created
    Yarn.SetResolution(40)

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

# Create a domain and assign it to the textile
#Textile.AssignDomain(CDomainPlanes(XYZ(-0.5*spacing, -0.5*spacing, -0), XYZ(23.5*spacing, 

23.5*spacing, 2*height)))
	
# Create a sheared domain with 6 planes
domain = CDomainPlanes()
#d = (11*spacing-11*shearOffset*sin(shearAngle))/sqrt(1+sin(shearAngle)**2)
d = (12*spacing*sin(90-shearAngle))
domain.AddPlane(PLANE(XYZ(1, -sin(shearAngle), 0), 0))
domain.AddPlane(PLANE(XYZ(-1, sin(shearAngle), 0), -d))
domain.AddPlane(PLANE(XYZ(0, 1, 0), 0))
domain.AddPlane(PLANE(XYZ(0, -1, 0), -d))
domain.AddPlane(PLANE(XYZ(0, 0, 1), 0))
domain.AddPlane(PLANE(XYZ(0, 0, -1), -2*height))
Textile.AssignDomain(domain)

#Set section properties 
weave.SetMatrixYoungsModulus(MatYM, 'MPa')
weave.SetMatrixPoissonsRatio(MatPR)
weave.SetMatrixAlpha(MatAlpha)
weave.SetYoungModulusX(YMX, 'MPa')
weave.SetYoungModulusX(YMY, 'MPa')
weave.SetYoungModulusX(YMZ, 'MPa')
weave.SetShearModulusXY(SMXY, 'MPa')
weave.SetShearModulusXZ(SMXZ, 'MPa')
weave.SetShearModulusYZ(SMYZ, 'MPa')
weave.SetPoissonRatioX(PRX)
weave.SetPoissonRatioY(PRY)
weave.SetPoissonRatioZ(PRZ)

# Add the textile with the name "SingleLayFineCase"
AddTextile("SL1", Textile)
Thanks.

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

Re: sheared geometry with GUI

Post by louisepb »

Hi Yanie,

I haven't had a chance to run your script yet to see what the problems are but, in answer to your questions:

1. The 2d sheared textile class is just set up to take one angle which gives the relative angles between the two yarns (warp and weft). I don't think there should be a need to specify different angles for the yarns separately. If you want to do that you will need to write a script which specifies the individual yarns.

2. The properties aren't working because the function names you have used are incorrect. It should be SetYoungsModulus and SetPoissonsRatio

Best regards,
Louise
louisepb
Project Leader
Posts: 988
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: sheared geometry with GUI

Post by louisepb »

Hi Yanie,

I have now run the section of your script which uses the sheared textile class. There are two problems. The first is that you haven't defined a domain for the sheared textile. You need to use weave.AssignDefaultDomain(True) - true if you want a sheared domain, false if not.

The other problem was a bug when different numbers of warp and weft yarns are used. I have corrected this and it will be available in the next release. The fix is in the code repository if you have built the code. Alternatively, as a short term fix, you could transpose your yarn pattern matrix so that it is 6x7 instead of 7x6.

If you do both of these things then you should be able to generate a sheared textile and use the refine option.

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

Re: sheared geometry with GUI

Post by dyeyanie »

Hi louise,

Thanks for your reply. Ok, I've made some changes and I taken into account the suggestions you made. However, I get another warning which saying " Modify Section: all points increased to max value. Unable to achieve original section area". Then, I tried to use GUI to generate the same geometry but same warning popped out. Here is the code.

Code: Select all

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

# subroutines of Pattern Generation
def patternVec(s): # 0 = warp (blue) , 1 = weft (red)
	if s == 1:
		return [
			[0,0,0,0,0,1,0,0],
			[0,0,1,0,0,0,0,0],
			[0,0,0,0,0,0,0,1],
			[0,0,0,0,1,0,0,0],
			[0,1,0,0,0,0,0,0],
			[0,0,0,0,0,0,1,0],
			[0,0,0,1,0,0,0,0],
			[1,0,0,0,0,0,0,0]]
		print "The pattern name is Satin 8-harness (8x8)"
	
	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

# Define some constants - USER CHANGE HERE ONLY
patternList=patternVec(1) # CHOOSE HERE 1 @ 2* ---> 1 : Satin , 2: MK
spacing = 5.13 ## (mm) -Constant
width = 4.44 ## (mm) -Constant
height = 0.52  ##(mm) 
shearAngle = -1.4/180*pi 

#Inputs for Material Properties
T = 2*height ## Fabric thickness
twistAngle = shearAngle
shearOffset = spacing*sin(shearAngle)
YMX = 51.92e+009
YMY = 21.97e+009
YMZ = 21.97e+009
SMXY = 8.856e+009
SMXZ = 8.856e+009
SMYZ = 6.250e+009
PRX = 0.2489
PRY = 0.2489
PRZ = 0.2143
MatYM = 2500 
MatPR = 0.35 
MatAlpha = 6.5e-006 

#Inputs for Voxel Mesh
nXvoxel = 300 
nYvoxel = 300
nZvoxel = 100

#Pattern Generation for 1st Pattern:
m=len(patternList)
n=len(patternList[0])
weave = CShearedTextileWeave2D(m, n, spacing, T, shearAngle, 1, 1) #Geometry generation class of 2DShearedweave
weave.SetGapSize(0) # Gap size between upper and lower yarns
for x in range(m):
	for y in range(n):
		if patternList[m-1-x][y] == 1:
			weave.SwapPosition(x, y)

#Adjust the yarn heights and widths
weave.SetYarnWidths(width)
weave.SetYarnHeights(height)

#Assign the domain and get its limit 
weave.AssignDefaultDomain(True) # True - sheared, False - No shear
#Domain = weave.GetDefaultDomain()
#Min = XYZ()
#Max = XYZ()
#Domain.GetBoxLimits(Min,Max)

#Set section properties
weave.SetMatrixYoungsModulus(2500, 'MPa')
weave.SetMatrixPoissonsRatio(0.35)
weave.SetMatrixAlpha(6.5e-006)
weave.SetYoungsModulusX(YMX, 'MPa')
weave.SetYoungsModulusY(YMY, 'MPa')
weave.SetYoungsModulusZ(YMZ, 'MPa')
weave.SetPoissonsRatioX(PRX)
weave.SetPoissonsRatioY(PRY)
weave.SetPoissonsRatioZ(PRZ)
weave.SetShearModulusXY(SMXY, 'MPa')
weave.SetShearModulusXZ(SMXZ, 'MPa')
weave.SetShearModulusYZ(SMYZ, 'MPa')

# Add the textile with the name "SingleLayFineCase"
AddTextile("SL1", weave)
SaveToXML(r"C:\Users\dyeyanie\Documents\MultiObjOptSimulation\MacroLay\PythonLay\SL1.tg3", "SL1", OUTPUT_STANDARD) ##

#Meshing domain - ABAQUS Sheared Voxel Mesh 
#SaveVoxelMesh  (CTextile  &Textiletring OutputFilename, int XVoxNum, int YVoxNum, int #ZVoxNum, bool bOutputMatrix, bool bOutputYarns, int iBoundariesTied, int iElementType=0)
#Vox = CShearedVoxelMesh()
#Vox.SaveVoxelMesh(weave, r'C:\Users\dyeyanie\Documents\MultiObjOptSimulation\MacroLay\PythonLay\SL1.inp',nXvoxel,nYvoxel,nZvoxel,1,1,0,0)
Another thing is, I try to get the inp file automatically via the code. However, it doesn't generate anyway. Is it because the error from the above matter? I attached herewith the image corresponds to the error (warning) above.

Regards,
Yani
Attachments
err.png
err.png (29.97 KiB) Viewed 4146 times
Post Reply