MegaStructures
Structural
- Sep 26, 2019
- 366
I'm trying to line up multiple analyses in Abaqus to run one after another using a Python macro.
My desired workflow is to start with CAE open and run the macro while viewing the first model in the set. I've written the below code to create an analysis for the active model, run the analysis, wait for completion and then start the next analysis. However, the current code has a couple errors, which may or may not be related.
[ol 1]
[li]The macro does not wait for the previous analysis to finish before starting the next string of code. As soon as the macro runs all three analyses begin[/li]
Why does this command not work?
[li]The first analysis in the set does not run and gives the following error code: "Error in job x-05-21-250_TET-2Layers_analysis: The executable pre.exe aborted with system error code 1073740791. Please check the .dat, .msg, and .sta files for error messages if the files exist."[/li][/ol]
Text file is attached
“The most successful people in life are the ones who ask questions. They’re always learning. They’re always growing. They’re always pushing.” Robert Kiyosaki
My desired workflow is to start with CAE open and run the macro while viewing the first model in the set. I've written the below code to create an analysis for the active model, run the analysis, wait for completion and then start the next analysis. However, the current code has a couple errors, which may or may not be related.
[ol 1]
[li]The macro does not wait for the previous analysis to finish before starting the next string of code. As soon as the macro runs all three analyses begin[/li]
Why does this command not work?
Code:
[indent] mdb.jobs['x-05-21-250_TET-3Layers_Analysis'].waitForCompletion[/indent]
[li]The first analysis in the set does not run and gives the following error code: "Error in job x-05-21-250_TET-2Layers_analysis: The executable pre.exe aborted with system error code 1073740791. Please check the .dat, .msg, and .sta files for error messages if the files exist."[/li][/ol]
Text file is attached
The problem seems to be in the following lines:
pre.exe ???
pre.exe ???
pre.exe ???
Python:
def Multi_Analysis():
import section
import regionToolset
import displayGroupMdbToolset as dgm
import part
import material
import assembly
import step
import interaction
import load
import mesh
import optimization
import job
import sketch
import visualization
import xyPlot
import displayGroupOdbToolset as dgo
import connectorBehavior
vps = session.viewports.values()[0]
model_name = vps.displayedObject.modelName
mdb.Job(name= model_name+'_analysis', model= model_name, description='', type=ANALYSIS,
atTime=None, waitMinutes=0, waitHours=0, queue=None, memory=90,
memoryUnits=PERCENTAGE, getMemoryFromAnalysis=True,
explicitPrecision=SINGLE, nodalOutputPrecision=SINGLE, echoPrint=OFF,
modelPrint=OFF, contactPrint=OFF, historyPrint=OFF, userSubroutine='',
scratch='', resultsFormat=ODB, multiprocessingMode=DEFAULT, numCpus=5,
numDomains=5, numGPUs=0)
inp_name= model_name+'_analysis'
mdb.jobs[model_name+'_analysis'].submit(consistencyChecking=OFF)
#Tell Abaqus to wait until first job finishes
mdb.jobs[model_name+'_analysis'].waitForCompletion
#Second Analysis
mdb.Job(name='x-05-21-250_TET-3Layers_Analysis',
model='x-05-21-250_TET-3Layers', description='', type=ANALYSIS,
atTime=None, waitMinutes=0, waitHours=0, queue=None, memory=90,
memoryUnits=PERCENTAGE, getMemoryFromAnalysis=True,
explicitPrecision=SINGLE, nodalOutputPrecision=SINGLE, echoPrint=OFF,
modelPrint=OFF, contactPrint=OFF, historyPrint=OFF, userSubroutine='',
scratch='', resultsFormat=ODB, multiprocessingMode=DEFAULT, numCpus=4,
numDomains=4, numGPUs=0)
#Submit Job
mdb.jobs['x-05-21-250_TET-3Layers_Analysis'].submit(consistencyChecking=OFF)
#Tell Abaqus to wait until second job finishes
mdb.jobs['x-05-21-250_TET-3Layers_Analysis'].waitForCompletion
#Third Analysis
mdb.Job(name='x-05-21-250_TET-4Layers_Analysis',
model='x-05-21-250_TET-4Layers', description='', type=ANALYSIS,
atTime=None, waitMinutes=0, waitHours=0, queue=None, memory=90,
memoryUnits=PERCENTAGE, getMemoryFromAnalysis=True,
explicitPrecision=SINGLE, nodalOutputPrecision=SINGLE, echoPrint=OFF,
modelPrint=OFF, contactPrint=OFF, historyPrint=OFF, userSubroutine='',
scratch='', resultsFormat=ODB, multiprocessingMode=DEFAULT, numCpus=4,
numDomains=4, numGPUs=0)
#Submit Job
mdb.jobs['x-05-21-250_TET-4Layers_Analysis'].submit(consistencyChecking=OFF)
“The most successful people in life are the ones who ask questions. They’re always learning. They’re always growing. They’re always pushing.” Robert Kiyosaki