Hello, I am trying regenerate and validate Ruijter, Wout (2009) Thesis - Analysis of mechanical properties of woven textile composites as a function of textile geometry. I want to use texgen 3.9 gui (bundle version) for modelling. However it is mentioned in the thesis that they have used TEXGEN API for all the modelling purposes. The implementation of parametric model using texgen python interface was given as follows in appendix C.3.
#--------------------------------------------------------------------------------------------------------------------
tex_param={
'length':4.05,\
'height':0.5,\
'vgap' : 0.02, \
'hgap' : 0.1, \
'fibre_area' : 0.25, \
'vf_dropoff' : 0.85, \
'numlayer' : 2, \
'rel_z_offset' : 0.87, \
'x_gamma' : 0.25, \
'y_gamma' : 0.25, \
'flat_value' : 0.19, \
'rotate' : [0,0], \
'domainsize' : [0.8,0.8], \
'weavestyle' : 'plain' }
def make_textile(t_par):
length = t_par['length']
height = t_par['height']
rot = t_par['rotate']
style = t_par['weavestyle']
if style=='plain':
weave_pattern = [ [0,0] , [1,1]]
elif style =='5satin':
weave_pattern = [ [0,0],[1,2],[2,4],[3,1],[4,3]]
else:
sys.exit('no_valid_weave_style_specified')
tex = CTextileWeave2D(len(weave_pattern),len(weave_pattern),length*0.5,height)
tex.SetGapSize(t_par['vgap']);
for i in weave_pattern:
tex.SwapPosition(i[0], i[1]);
tex.SetYarnWidths(length*0.5-t_par['hgap']);
tex.SetYarnHeights(height*0.5-0.01) ;
fdist = CFibreDistribution1DQuad(t_par['vf_dropoff' ] )
yarns = tex.GetYarns()
addyarns = []
y_size = len(yarns)
z_offset = 0
# iterate over the number of added layers
for i in range(t_par['numlayer']-1):
# compute how far to translate the yarns
z_offset += height*t_par['rel_z_offset']
trans = XYZ(t_par['x_gamma'][i+1]*length, t_par['y_gamma'][i+1]*length,z_offset);
tex2 = CTextileWeave2D(tex)
tex2.Translate(trans)
tex2.Rorate(WXYZ(rot[i+1]*PI,0,0))
addyarns.append(tex2.GetYarns())
if i == t_par['numlayer']-2:
tex2.FlattemYarns(t_par['flat_value'],1);
# now flatten the bottom layer
if t_par['numlayer']==1:
tex.FlattemYarns(t_par['flat_value'],0);
else:
tex.FlattenYarns(t_par['flat_value'],-1)
print t_par['x_gamma'][0],t_par['y_gamma'][0]
trans = XYZ(t_par['x_gamma'][0]*lenght, t_par['y_gamma'][0]*length, 0);
tex.Translate(trans)
tex.Rotate(WXYZ(rot[0]*PI,0,0))
# then add yarns from the other layers
for i in addyarns:
for j in range(len(i)):
yarns.append(i[j])
# loop over all the old and new (tranlated) yarns to assign a fibre distribution
nyarns = []
for yarn in yarns:
yarn.AssignFibreDistribution(fdist)
yarn.SetFibreArea(t_par['fibre_area']*1e-6)
yarn.SetReslution(t_par['section_resolution'])
nyarns.append(yarn)
tex.DeleteYarns()
for i in nyarns:
tex.AddYarn(i)
zflat = (t_par['height']/4-t_par['flat_value'])-0.5*t_par['vgap']
tex.Translate(XYZ(0,0,-zflat))
bot = XYZ(0,0,0)
top = XYZ(length*t_par['domainsize'][0],length*t_par['domainsize'][1],height*(1+(t_par['numlayer']-1)*t_par['rel_z_offset'])-2*zflat)
domain=CDomainPlanes(bot,top)
tex.AssignDomain(domain)
np = tex.DetectInterference()
if np>0:
print 'textile_geometry_contains_interference'
return 1
else:
return tex
#--------------------------------------------------------------------------------------------------------------------------------
I am trying to run script in Texgen Gui but getting nothing. Am i on a correct track? or I would have to use Texgen API only to use this script?
Implementation of a parametric textile model using TexGen
Moderators: Martin, Developers
-
rmadk.dce2014
- Regular
- Posts: 10
- Joined: Tue Oct 04, 2016 12:43 pm
Re: Implementation of a parametric textile model using TexGe
Hi,
I hadn't tried using this script before but have just done so and found that there were a few errors (some of these may have been typos in your copying of the script). There is a working version attached. This runs from the GUI using the Python->RunScript option.
There are now functions within TexGen to create layered textiles so you may find that something along the lines of the LayeredTextile2.py script here: https://github.com/louisepb/TexGenScripts may be more straightforward.
Hope that helps,
Louise
I hadn't tried using this script before but have just done so and found that there were a few errors (some of these may have been typos in your copying of the script). There is a working version attached. This runs from the GUI using the Python->RunScript option.
There are now functions within TexGen to create layered textiles so you may find that something along the lines of the LayeredTextile2.py script here: https://github.com/louisepb/TexGenScripts may be more straightforward.
Hope that helps,
Louise
- Attachments
-
- rmadk.zip
- (1.36 KiB) Downloaded 1095 times
-
rmadk.dce2014
- Regular
- Posts: 10
- Joined: Tue Oct 04, 2016 12:43 pm
Re: Implementation of a parametric textile model using TexGe
Thank you so much.
Regards
Rohit M
Regards
Rohit M
-
rmadk.dce2014
- Regular
- Posts: 10
- Joined: Tue Oct 04, 2016 12:43 pm
Re: Implementation of a parametric textile model using TexGe
Hello.
Can you please suggest me the minimum system configuration required for exporting a 3d woven orthogonal model succesfully. It fails in my system most of the time. I tried to export "3dOrthogonalRefined.py" from https://github.com/louisepb/TexGenScripts to volume mesh and step file. Step file got generated in few hours. But volume mesh didn't get generated even after 6 hours. Can you please give me an idea on what coinfiguration you work generally and how much time it takes for a volume mesh export for this particular example? 2D models are working fine. My system configuration is Intel Xeon processor with 32GB ram and 64bit windows O.S.
Regards
Rohit M.
Can you please suggest me the minimum system configuration required for exporting a 3d woven orthogonal model succesfully. It fails in my system most of the time. I tried to export "3dOrthogonalRefined.py" from https://github.com/louisepb/TexGenScripts to volume mesh and step file. Step file got generated in few hours. But volume mesh didn't get generated even after 6 hours. Can you please give me an idea on what coinfiguration you work generally and how much time it takes for a volume mesh export for this particular example? 2D models are working fine. My system configuration is Intel Xeon processor with 32GB ram and 64bit windows O.S.
Regards
Rohit M.
Re: Implementation of a parametric textile model using TexGe
Hi Rohit,
Your system configuration should be fine. The step export uses OpenCASCADE which isn't always terribly reliable for more complex yarns. The faceted export is more robust than the smooth and you will find that the export is much faster if you uncheck the 'Join Yarn Sections' option. This will mean that the yarns may be split where at the points where the yarn repeats are specified. The export with faceted and the join sections option unchecked took about 5 minutes on my machine (i7 with 16GB RAM and Windows 7). With the domain as it is generated by the script, which slices the binder yarns through the vertical section, the binders didn't export properly. I moved the domain so that it was along the centre of the weft yarns (ie moved the domain edges to 1.4 and 12.6 in the x-direction). This was much better. At least one of them exported properly which could potentially be copied to different positions.
The volume export isn't suitable for this textile. The algorithm used means that textiles with vertical, or near vertical yarns, generate meshes with strange elongated elements and so it doesn't really work well for 3D textiles. I suspect that the strange shape of the binder yarns in this model would also cause it problems.
For this type of textile we normally use the voxel mesh export. What type of simulation are you intending to run?
Hope that helps,
Louise
Your system configuration should be fine. The step export uses OpenCASCADE which isn't always terribly reliable for more complex yarns. The faceted export is more robust than the smooth and you will find that the export is much faster if you uncheck the 'Join Yarn Sections' option. This will mean that the yarns may be split where at the points where the yarn repeats are specified. The export with faceted and the join sections option unchecked took about 5 minutes on my machine (i7 with 16GB RAM and Windows 7). With the domain as it is generated by the script, which slices the binder yarns through the vertical section, the binders didn't export properly. I moved the domain so that it was along the centre of the weft yarns (ie moved the domain edges to 1.4 and 12.6 in the x-direction). This was much better. At least one of them exported properly which could potentially be copied to different positions.
The volume export isn't suitable for this textile. The algorithm used means that textiles with vertical, or near vertical yarns, generate meshes with strange elongated elements and so it doesn't really work well for 3D textiles. I suspect that the strange shape of the binder yarns in this model would also cause it problems.
For this type of textile we normally use the voxel mesh export. What type of simulation are you intending to run?
Hope that helps,
Louise
-
rmadk.dce2014
- Regular
- Posts: 10
- Joined: Tue Oct 04, 2016 12:43 pm
Re: Implementation of a parametric textile model using TexGe
Thanks for such a quick reply. Now i am also able to export the step geometry easily. I intend to analyse the 3d woven composite unit cell with periodic b.c's under different loading and failure prediction. As export volume mesh option automatically assigns the periodic b.c's to the abaqus model, it would have saved a lot of time. Manually assigning those and taking care of the contact surfaces by importing step geometry is really cumbersome (in abaqus). I can understand from previous posts that hypermesh would be a good option for such problems. Any further suggestions from your side?
Regards
Rohit M.
Regards
Rohit M.
Re: Implementation of a parametric textile model using TexGe
Hi Rohit,
If you use the voxel export that will create the complete periodic boundary conditions.
One of the issues with just exporting the step geometry is that you won't have the orientation and volume fraction data. It's possible to mesh using Hypermesh and then use the centre points of the elements to interrogate the TexGen model to find the orientation and volume fraction data. I think that there has been a thread on the forum about this before.
Best regards,
Louise
If you use the voxel export that will create the complete periodic boundary conditions.
One of the issues with just exporting the step geometry is that you won't have the orientation and volume fraction data. It's possible to mesh using Hypermesh and then use the centre points of the elements to interrogate the TexGen model to find the orientation and volume fraction data. I think that there has been a thread on the forum about this before.
Best regards,
Louise
Re: Implementation of a parametric textile model using TexGen
hi, I don't know how to predict failure in weft and warp yarn. pls help me!
Re: Implementation of a parametric textile model using TexGen
HI,
Sorry for the very slow reply. Could you be more specific about what you are trying to do?
Thanks,
Louise
Sorry for the very slow reply. Could you be more specific about what you are trying to do?
Thanks,
Louise