How to run the file of .py by using the ABAQUS Run Script?

General discussion about TexGen.

Moderators: Martin, Developers

Post Reply
ymz5946
Posts: 3
Joined: Sat Aug 19, 2017 10:01 am

How to run the file of .py by using the ABAQUS Run Script?

Post by ymz5946 »

Hi,everyone:
I generated a weave in TexGen,and I recorded the script to get a .py file.I wanted to run the .py file though Run Script in ABAQUS. But it fails, a error info (referrer to attachments).
Do I need to do something before running the script in ABAQUS? Thank you for helping.

Regards,
Pheng
Attachments
error info.png
error info.png (12 KiB) Viewed 9933 times
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: How to run the file of .py by using the ABAQUS Run Scrip

Post by louisepb »

Hi Pheng,

This is probably because the TexGen Python libraries can't be found. You will need to import whichever TexGen libraries are used in your recorded script, most likely just the core, using

Code: Select all

from TexGen.Core import *
You will also need to make sure that you are using a version of TexGen which is built with the appropriate version of Python for your Abaqus version - http://texgen.sourceforge.net/index.php ... ith_ABAQUS

Hope that helps,
Louise
loyal979
Regular
Posts: 27
Joined: Thu Jul 13, 2017 1:37 am

Re: How to run the file of .py by using the ABAQUS Run Scrip

Post by loyal979 »

Hi Louise,
I am trying to do the same here where I want to run TenGen python script in Abaqus. I did the core library but I still have the attached error. please let me know what other folders/ libraries I need to copy and where I place them so that I could run it within Abaqus.

Thank you,

Matt
Attachments
error.png
error.png (75.74 KiB) Viewed 9809 times
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: How to run the file of .py by using the ABAQUS Run Scrip

Post by louisepb »

Hi Matt,

You need to be able to access the files in the TexGen->Python->libxtra folder. These should have been installed into the site-packages folder in your Python installation. It may be a path problem - make sure that the path includes this so that the system can find the files.

Hope that helps,
Louise
JoseDR
Posts: 2
Joined: Mon Sep 02, 2019 8:27 am

Re: How to run the file of .py by using the ABAQUS Run Scrip

Post by JoseDR »

Hello Laura.

I like so much your program. Thank you very for so much hard work and for leaving it free, so other persons can use it.

I’m here trying to apply it in a micro(with micro mechanics abaqus plugin)-meso(with texgen)-macro(with abaqus 2017) model to study composite pipes.

I use windows 10, abaqus 2017, python-2.7.3.amd64 and texgen-Python27-3.11.0. I have almost done it but I have found a problem which I’m not be able to solve.

In the meso part, when using the effectiveMatPropRVE.py to obtain the properties of the textile composite, to apply them after to the macro part, abaqus stops in this point
Imagen1.png
Imagen1.png (44.92 KiB) Viewed 9497 times
The dialog with the material properties pops, but abaqus cannot continue doing things until I close the dialog with the OK or the Cancel buttons.

It won`t be a problem if I would want to continue making the rest of the model manually, but I’m trying to create one only script with all the steps to work with it in Isigth because I want to make sensitivity, optimization and reliability studies over the complete model (micro-meso-macro).

After trying so many things to solve the problem, I think it can be something related with the SMACkmCeaKerMod because if I try to move the properties .rpt file which the file effectiveMatPropRVE.py have generated, it says that it cannot move the file because the SMACkmCeaKerMod keeps the .rpt file open.

I have exported the model generated in texgen with the volume option. I have also proved with the abaqus voxel option. The same problem appears.

I hope you can help me with this. Thank you very much.
JoseDR
Posts: 2
Joined: Mon Sep 02, 2019 8:27 am

Re: How to run the file of .py by using the ABAQUS Run Scrip

Post by JoseDR »

Sorry i meant Louise, and not Laura.
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: How to run the file of .py by using the ABAQUS Run Scrip

Post by louisepb »

Hi,

If you run a program with the dialog box the program will wait until it receives the Ok or Cancel event before it continues. If you just want the results but don't need to see them displayed I would suggest that you modify the dataHandling.py script so that it doesn't display the results and instead uses them for the computations required.

Hope that helps,
Louise
Post Reply