TexGen Functionality

General discussion about TexGen.

Moderators: Martin, Developers

Post Reply
Jarvis
Regular
Posts: 11
Joined: Wed Aug 13, 2008 8:42 pm

TexGen Functionality

Post by Jarvis »

Hi, I am new to this board, but I have been playing with TexGen for a few days now, and I have read most of the posts. I have a few questions, so here goes.

I am trying to model a fairly complex 3D triaxial weave. This weave is basically a plain weave of carbon with inlay yarns running through at a 45 degree angle to both of the braid directions. In Martin's thesis, he discusses a lot of work by Stepan Lomov including his software WiseTex. This weave I am trying to model is discussed at length by Lomov in many papers, I am hopefully going to be able to compare some of our simulation results with his experimental results. Anyway, the main problem with this weave is that with the geometry given, there is inherent interpenetration between the inlays and the braids. The analysis that we are going to be performing involves a lot of volume averaging, so there is not a big need to match the geometry of the real weave very accurately. I have spent a lot of time with Abaqus trying to create a cubic part to represent the unit cell (including matrix) and then partitioning this to create the weave. This would avoid having to create several parts, then adding them to an assembly, applying interactions, etc. It is also how our work of the past has been performed. Unfortunately the partitioning tools in Abaqus aren't robust enough to allow me to create a model that is acceptable. Which FINALLY brings me to a few questions:

1. I ultimately want to use abaqus to perform an FE analysis, is TexGen a reasonable tool to help me do this? I know I can create the geometry, but will I really be able to interface with abaqus?

2. I understand that the IGES and STEP exporting does not work really well. I have gotten it to work with some success, but my real question has to do with exporting the volume mesh. Supposedly you can export the volume mesh in an Abaqus input deck, but I have not been successful at that at all. I tried creating my own model and then exporting, but the input deck doesn't have any information on node locations or elements or anything like that. I tried running martin's Python script from his "Creating a mesh of a braid fabric" post, but still the same problem. I also tried to write my own python script for creating a weave and used the Cmesher class to create and export a mesh, but still same problem. What am I doing wrong?

3. Finally, there is this Csolver class for creating realistic fibers. What is the deal with that? I couldn't understand all of the components of it or the purpose of it. Is it something that could help me create this weave?

Thank You,
Jarvis

PS Sorry for such a long post
wr
Contributor
Posts: 35
Joined: Tue Aug 28, 2007 8:33 am
Location: Ringkoebing, DK

Post by wr »

Hi Jarvis,

sorry for the late reply. On answering your questions, here goes:
1. Yes, TexGen is a good tool to do this, in particular if your weave can go through the TexGen tet mesh generator directly. I'd say give that a go first.
2. It looks like you tried the suggestion at 1), can you post a bit of code that should do it but doesn't?
3. Csolver models compaction, it can't help you create the base weave.

Besides that I plan to upload a tool that writes out a spatially averaged input deck (on a regular grid). This always gives an answer....but then you have to look at convergence on mesh refinement to judge how good it is.

W
Jarvis
Regular
Posts: 11
Joined: Wed Aug 13, 2008 8:42 pm

Post by Jarvis »

Thank you very much for your help!

I now have my code exporting meshes to Abaqus with no problems. In my original weave all of the geometry was based on meters i.e. the width of a yarn was 4.21E-03. All I did was make everything 1000 times bigger and set the textile Geometry Scale to 'mm' and all of the sudden the meshes began working fine. Not sure why this changed anything, but it certainly did. One curious thing is that when the TexGen is creating the mesh it prints "Warning: Volume fraction is not realistic: 'some number here'" thousands of times in the output log. The mesh still seems to work, and I am pretty sure my material is defined correctly in the CYarn and CTextile Class. CTextile.GetFibreYarnVolumeFraction() works correctly and gives the expected result.

One other question. I ran the .zip install and I am able to run my TexGen scripts from the IDLE python interpreter. Is there a way to do this for Abaqus as well? In other words, I want the TexGen functions to be accessible from Abaqus so that I can run a script in Abaqus and it will create my weave and import it all at the same time.

Thanks again,
Jarvis
joncrookston
Expert User
Posts: 27
Joined: Wed Apr 11, 2007 4:03 pm
Location: Nottingham, UK

Post by joncrookston »

Hi Jarvis,

TexGen functions can be called from Abaqus/CAE in the way you describe, but this needs TexGen to be linked with the same Python version as that used by Abaqus, i.e. you have to compile TexGen yourself. There's a bit of information about this (including the integration with Abaqus) on the wiki at http://texgen.sourceforge.net/index.php ... rom_Source.

If you're planning to do this, note that I *think* there is a problem with compiling TexGen under Visual Studio 2005, but 2003 should work correctly.

Cheers,
Jon.
Jarvis
Regular
Posts: 11
Joined: Wed Aug 13, 2008 8:42 pm

Post by Jarvis »

I originally installed the non-bundled version of Texgen because I already had python 2.5 and I was planning on doing a lot of scripting. I am running abaqus 6.8-1 and it uses python 2.4.3. I tried appending the Python25/Lib/site-packages file to the abaqus version of the python interpreter, and as expected when I tried to run a script in abaqus it gave me an error about trying to access the python25.dll.

So, I began attempting the long process of compiling from source. I am a complete novice at this and I spent a lot of time downloading and installing all of the necessary software. I have visual studio 2005 and CMake 2.6. Any time I click configure in CMake (regardless of the source code selected) it gives me the error:

---------------------------
Error
---------------------------
CMake Error at C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/CMakeTestCCompiler.cmake:32 (MESSAGE):
The C compiler "cl" is not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/Program Files/TexGen/SourceCode/Binary Files/CMakeFiles/CMakeTmp



Run Build Command:C:\PROGRA~1\MID05A~1\Common7\IDE\devenv.com
CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec

1>------ Build started: Project: cmTryCompileExec, Configuration: Debug
Win32 ------

1>Compiling...

1>Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for
80x86

1>Copyright (C) Microsoft Corporation. All rights reserved.

1>cl /Od /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "CMAKE_INTDIR=\"Debug\""
/D "_MBCS" /FD /RTC1 /MDd /Fo"cmTryCompileExec.dir\Debug\\" /Fd"C:/Program
Files/TexGen/SourceCode/Binary
Files/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.pdb" /W3 /c /Zi /TC
/Zm1000

1> ".\testCCompiler.c"

1>testCCompiler.c

1>Compiling manifest to resources...

1>Linking...

1>Embedding manifest...

1>Project : error PRJ0003 : Error spawning 'cmd.exe'.

1>Build log was saved at "file://c:\Program Files\TexGen\SourceCode\Binary
Files\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug\BuildLog.htm"

1>cmTryCompileExec - 1 error(s), 0 warning(s)

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
==========

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:1 (PROJECT)


I am guessing that this is not really your specialty, but do you have any ideas on how to fix the error? Is there an easy way to get texgen to install using python 2.4?

Thanks,
Jarvis
joncrookston
Expert User
Posts: 27
Joined: Wed Apr 11, 2007 4:03 pm
Location: Nottingham, UK

Post by joncrookston »

Hi Jarvis,

This kind of thing can be a bit of a nightmare :( . It could be something very simple, but I can't say for sure. Can you compile and run anything (like a 'hello world' kind of program) within Visual Studio? Maybe there is someone else here with compiler/build system expertise.

That aside, I think that there is a problem with TexGen and VS2005; I don't know how easy it would be for you to get hold of VS2003, but it may be necessary in any case (not that I think this is likely to be causing the problem you show here). If it's any help, the versions of everything which I have used to compile TexGen successfully are:

Visual Studio 2003 (v7.1.3088)
CMake 2.4 patch 7
Swig 1.3.31
WxWidgets 2.8.6
Python 2.4.3
VTK 5.0.3
OpenCascade 6.2.0

all done under Windoze XP Pro, SP2

I can't guarantee that this will work on any other system, and there's no real reason that things should be limited to these versions, but this is the setup which I have and which works ok here (up to and including TexGen revision 616).

I'll probably paste this configuration into the wiki, and it might be useful if others who have compiled from source could do likewise, just to get a bit of a list of 'known good' configurations.

I did also add a tiny bit more to the wiki section on integrating with Abaqus (on the compiling from source page).

Cheers,
Jon.
Post Reply