- #1
Eastonc2
- 20
- 0
I'm not 100% sure where this belongs, but, I have a script that will allow me to modify the mesh size of an individual part in abaqus, and then execute a job on that part. my question is How do I go about changing the mesh size for multiple parts?
*edit* removed first part of question, wasn't thinking straight.
script I already have is below."""
script.py
this script changes mesh size of existing model and then runs job
"""
from abaqus import *
from abaqusConstants import *
#import part
#import mesh
#from mesh import S4, S8R, STANDARD, STRUCTURED
#import job# Open the model database.
# This opens ALL features in the model tree
# assigns the CAE model data base to the variable 'mdb'
mdb=openMdb('Model.cae')
#case sensitive !
model = mdb.models['Model-1']
part = model.parts['Part-1]
#first we delete the old mesh before we create a new one
part.deleteMesh()
#all mesh controls are already set in this MDB, so no need to adjust
#only needed: size:
part.seedPart(size=1, deviationFactor=0.1)
#create
part.generateMesh()
jobName = 'modifiedMesh'
myJob = mdb.Job(name=jobName, model=model,
description='Deflection_analysis')
myJob.submit()
myJob.waitForCompletion()
*edit* removed first part of question, wasn't thinking straight.
script I already have is below."""
script.py
this script changes mesh size of existing model and then runs job
"""
from abaqus import *
from abaqusConstants import *
#import part
#import mesh
#from mesh import S4, S8R, STANDARD, STRUCTURED
#import job# Open the model database.
# This opens ALL features in the model tree
# assigns the CAE model data base to the variable 'mdb'
mdb=openMdb('Model.cae')
#case sensitive !
model = mdb.models['Model-1']
part = model.parts['Part-1]
#first we delete the old mesh before we create a new one
part.deleteMesh()
#all mesh controls are already set in this MDB, so no need to adjust
#only needed: size:
part.seedPart(size=1, deviationFactor=0.1)
#create
part.generateMesh()
jobName = 'modifiedMesh'
myJob = mdb.Job(name=jobName, model=model,
description='Deflection_analysis')
myJob.submit()
myJob.waitForCompletion()
Last edited: