Texgen to Matlab

General discussion about TexGen.

Moderators: Martin, Developers

Post Reply
loyal979
Regular
Posts: 27
Joined: Thu Jul 13, 2017 1:37 am

Texgen to Matlab

Post by loyal979 »

Hi all,

Im very new to this world (composite) and to Texgen and Im trying to learn new stuff. I need help to do FE analysis in Matlab for a woven fiber composite. I did the model of it in Texgen. but Im wondering if its possible to do the FE analysis in MatLab or to transfer from Texgen to Matlab.

if anyone has an idea please let me know..

regards


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

Re: Texgen to Matlab

Post by louisepb »

Hi Matt,

I'm not aware of anyone trying to import a TexGen model into Matlab. From a quick search it looks like you might be able to import a .stl file into Matlab which you could create using the TexGen File->Export->Surface Mesh function and then choose the .stl file type in the file dialog. I'm afraid that I don't know whether you could then mesh in Matlab. You would lose the volume fraction and orientation data as this would only save the geometry so you would then need to obtain this information for your meshed data. I guess that you would need to export your mesh somehow so that you could then interrogate the TexGen model using a Python script to get the extra data.

Sorry not to be more help but I can't really see a direct way of being able to use TexGen with Matlab.

Best regards,
Louise
loyal979
Regular
Posts: 27
Joined: Thu Jul 13, 2017 1:37 am

Re: Texgen to Matlab

Post by loyal979 »

louisepb wrote:Hi Matt,

I'm not aware of anyone trying to import a TexGen model into Matlab. From a quick search it looks like you might be able to import a .stl file into Matlab which you could create using the TexGen File->Export->Surface Mesh function and then choose the .stl file type in the file dialog. I'm afraid that I don't know whether you could then mesh in Matlab. You would lose the volume fraction and orientation data as this would only save the geometry so you would then need to obtain this information for your meshed data. I guess that you would need to export your mesh somehow so that you could then interrogate the TexGen model using a Python script to get the extra data.

Sorry not to be more help but I can't really see a direct way of being able to use TexGen with Matlab.

Best regards,
Louise
Thank you for your response Louise.
So, based on your experience what do you recommend me to use to do FEA? and is there online tutorial to look at?


Thanks,

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

Re: Texgen to Matlab

Post by louisepb »

Hi Matt,

If you have access to Abaqus then that would be the most straightforward way as TexGen can automatically create input files for you. There are instructions and tutorials here:
http://texgen.sourceforge.net/index.php ... and_Abaqus
http://texgen.sourceforge.net/workshop/ ... alysis.pdf

If you don't have Abaqus then some other FE software can still read in an Abaqus input file so you may be able to at least use the nodes and elements etc.

Hope that helps,
Louise
rmadk.dce2014
Regular
Posts: 10
Joined: Tue Oct 04, 2016 12:43 pm

Re: Texgen to Matlab

Post by rmadk.dce2014 »

Is it possible to run TexGen and its python script in Matlab. I want to study the geometric variability using FE analysis where a loop runs via Matlab which opens TexGen then runs a TexGen script exports the CAD or Abaqus input file and then loop runs again for some different geometry value set. I have not build TexGen from sources and simply installed TexGen bundle via windows installer.
In the thesis "Matveev, Mikhail Y. (2015) Effect of variabilities on mechanical properties of textile composites. PhD thesis, University of Nottingham." an analytical model based on that presented by Rudd et al [118] was combined with Classical Laminate Theory (CLT) to account for interaction of yarns in two orthogonal directions. I can imagine that it would have very high computational cost but still i want to know how can i do the same thing using FE analysis.
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: Texgen to Matlab

Post by louisepb »

Hi Matt,

My colleague has called TexGen scripts from within Matlab by using the system command to execute a TexGen Python script. This works fine and he just returns data via the standard output which can then be used in the continuing Matlab script.

There seems to be an interface from Matlab to Python described here: https://uk.mathworks.com/help/matlab/ca ... aries.html but I haven't used this. If you can get this working then it looks like it should be possible to import the TexGen Python libraries and call the functions in those. It says that it supports Python 2.7 so you would need to make sure that you're using the correct version of TexGen to ensure that this is the case.

I'd be interested to hear how you get on if you try the second method.

Best regards,
Louise
Post Reply