#=========== Save and run ============# M.rootAssembly.regenerate() #Save model #Create job mdb.Job(model=modelName, name=modelName, numCpus=cpus, numDomains=cpus) #Run job if run: mdb.saveAs(pathName = mdbName + '.cae') func.runJob(modelName) #Write CPU time to file func.readMsgFile(modelName, 'results.txt') #=========== Post ============# print 'Post processing...' # #Contour # func.countourPrint(modelName, defScale, printFormat) #Energy func.xyEnergyPlot(modelName)
M.rootAssembly.rotate(angle=90.0, axisPoint=(9000 + dist, 0.0, 0.0), axisDirection=(0, 1.0, 0.0), instanceList=(name, )) modelList = ['deg00', 'deg45', 'deg90'] #Save model mdb.saveAs(pathName='singleElement' + '.cae') for modelName in modelList: M = mdb.models[modelName] #ConWep M.rootAssembly.regenerate() mdb.Job(model=modelName, name=modelName + 'conWep') if run: func.runJob(modelName + 'conWep') #Incident wave M.interactions['conWep'].suppress() M.interactions['incidentWave'].resume() mdb.Job(model=modelName, name=modelName + 'incidentWave') if run: func.runJob(modelName + 'incidentWave') #===================================================# #===================================================# # POST # #===================================================# #===================================================# if run: print 'Post...'
coordinates=(standoff, 0, 0), timeOfBlast=0, stepName=stepName) #=========== Run ============# M.rootAssembly.regenerate() #Save model mdbName = modelName mdb.saveAs(pathName=mdbName + '.cae') #Create job mdb.Job(model=modelName, name=modelName) #Run job if run: func.runJob(modelName) #===================================================# #===================================================# # POST # #===================================================# #===================================================# #Clear plots for plot in session.xyPlots.keys(): del session.xyPlots[plot] #Open ODB odb = func.open_odb(modelName) #Get xy data
axisPoint =(9000+dist, 0.0, 0.0), axisDirection=(0, 1.0, 0.0), instanceList=(name, )) modelList = ['deg00', 'deg45', 'deg90'] #Save model mdb.saveAs(pathName = 'singleElement' + '.cae') for modelName in modelList: M=mdb.models[modelName] #ConWep M.rootAssembly.regenerate() mdb.Job(model=modelName, name=modelName+'conWep') if run: func.runJob(modelName+'conWep') #Incident wave M.interactions['conWep'].suppress() M.interactions['incidentWave'].resume() mdb.Job(model=modelName, name=modelName+'incidentWave') if run: func.runJob(modelName+'incidentWave') #===================================================# #===================================================# # POST # #===================================================# #===================================================#