Controlling Abaqus within a C++ app
Controlling Abaqus within a C++ app
(OP)
Is it possible to control the Abaqus kernel directly from within a C++ application? The idea it to generate the object topology using a user-defined set of rules (whatever they might be) on the C++ side, then feed that topology into Abaqus, perform an FE analysis (whatever it might be), then feed the results back to C++ application for interrogation and display, preferably without ever seeing any Abaqus-related user interfaces.
I know it is possible to write custom scripts for Abaqus using Python. I also know that Python scripts can be executed from within a C++ application with some code 'massaging'. Therefore, in theory, one can generate Python scripts on the fly in C++ and have them executed. However, the sticking point seems to be the following statement from the Abaqus Scripting User's Manual: "If your script accesses the functionality of any of the Abaqus/CAE modules, the statements must be interpreted by the Abaqus/CAE kernel; you cannot run the script from the Python interpreter invoked from the system prompt. You must execute the script in Abaqus/CAE by selecting File Run Script from the main menu bar and selecting the file to execute". That seems to imply that there is no way to directly control Abaqus from one's C++ code. Is that correct?
Any feedback will be highly appreciated. Also, perhaps someone can suggest an alternative FEA package that would allow one to implement the aforementioned activity.
Thank you.
I know it is possible to write custom scripts for Abaqus using Python. I also know that Python scripts can be executed from within a C++ application with some code 'massaging'. Therefore, in theory, one can generate Python scripts on the fly in C++ and have them executed. However, the sticking point seems to be the following statement from the Abaqus Scripting User's Manual: "If your script accesses the functionality of any of the Abaqus/CAE modules, the statements must be interpreted by the Abaqus/CAE kernel; you cannot run the script from the Python interpreter invoked from the system prompt. You must execute the script in Abaqus/CAE by selecting File Run Script from the main menu bar and selecting the file to execute". That seems to imply that there is no way to directly control Abaqus from one's C++ code. Is that correct?
Any feedback will be highly appreciated. Also, perhaps someone can suggest an alternative FEA package that would allow one to implement the aforementioned activity.
Thank you.





RE: Controlling Abaqus within a C++ app
RE: Controlling Abaqus within a C++ app
RE: Controlling Abaqus within a C++ app
RE: Controlling Abaqus within a C++ app
That sounds precisely like the answer I was looking for. Despite the fact that your .inp and .bat files (and the custom .py script, I am guessing) were generated in Matlab, rather than C++, it sounds like you were able to do the thing I was mostly concerned with - starting the Abaqus kernel and submitting jobs to it directly from within your custom application (and retrieving the results, I am assuming), without using any Abaqus GUIs.
Any additional details on your approach will be very much appreciated (e.g., you were able to simply execute an "abaqus python some_scriptname.py" command prompt statement somewhere in your Matlab code, and that started the Abq kernel for you? In that case, I severely misunderstood the original statement in the scripting tutorial).
Thank you in advance.
RE: Controlling Abaqus within a C++ app
RE: Controlling Abaqus within a C++ app
I've been working on a simulation for a while now within .CAE and I have it working nearly 100% as I would like. I was just wondering do you think it would be handier for me to run batches of jobs (optimization) using an external Matlab script or some sort of python Abaqus kernal? Bearing in mind I have no knowledge of python and I am familiar with Matlab.
Your paper sounds interesting and I'd be interested in having a look if thats not a problem?
Thanks
RE: Controlling Abaqus within a C++ app
So the questions you need to ask:
1. Is it worth the time to make the code?
2. What type of structure am I analyzing? (wireframe, solid, shell?)
3. How many parameters are involved?
etc. etc.