简体   繁体   中英

How can I pass arguments to an ABAQUS python code?

I have written a UMAT subroutine in which I call a Python code of ABAQUS simulation.

st1=SYSTEM('abaqus cae noGUI="c:\temp\pycode.py"')

I need to pass some variables from Fortran to my Python code and bring back some other values from Python to Fortran. Now, I write those variables in text files and load them in Python and Fortran. By this way, I cannot parallelize my code since all the cores wants to write in a file at the same time.

Arguments can be passed into the script by entering -- on the command line, followed by the arguments separated by one or more spaces. These arguments will be ignored by the Abaqus/CAE execution procedure, but they will be accessible within the script. Example: abaqus cae noGUI=pythonScript -- -passedToPythonScript .

For more information, see “Abaqus/CAE execution,” Section 3.2.6 of the Abaqus Analysis User's Guide

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM