User login

You are here

How to define node-based-surface in Python script?

I want to define node-based-surface in Python script to use it in *tie card. Please help. Thank you

Comments

Node-based surfaces are not supported in Abaqus/CAE and therefore cannot be explicitly specified in a Python script. They are defined through node sets instead.

Below is an example of a model in which two cubes are tied together using node-based surfaces, coded in Python. Paste the following commands into the Command Line Interface (CLI) of Abaqus/CAE and you will get the model:

 

from abaqus import *
from abaqusConstants import *
from caeModules import *

Mdb()
myModel = mdb.Model(name='Model-1')
s = mdb.models['Model-1'].ConstrainedSketch(name='__profile__',
    sheetSize=200.0)
s.rectangle(point1=(0.0, 0.0), point2=(1.0, 1.0))
p = mdb.models['Model-1'].Part(name='Part-1', dimensionality=THREE_D,
    type=DEFORMABLE_BODY)
p.BaseSolidExtrude(sketch=s, depth=1.0)
del mdb.models['Model-1'].sketches['__profile__']
a = mdb.models['Model-1'].rootAssembly
a1 = mdb.models['Model-1'].rootAssembly
a1.DatumCsysByDefault(CARTESIAN)
a1.Instance(name='Part-1-1', part=p, dependent=OFF)
a1.Instance(name='Part-1-2', part=p, dependent=OFF)
a1.translate(instanceList=('Part-1-2', ), vector=(1, 0.0, 0.0))
f1 = a.instances['Part-1-1'].faces
faces1 = f1.getSequenceFromMask(mask=('[#4 ]', ), )
region1=a.Set(faces=faces1, name='m_Set-1')
f1 = a.instances['Part-1-2'].faces
faces1 = f1.getSequenceFromMask(mask=('[#1 ]', ), )
region2=a.Set(faces=faces1, name='s_Set-1')
mdb.models['Model-1'].Tie(name='Constraint-1', master=region1, slave=region2,
    positionToleranceMethod=COMPUTED, adjust=ON, tieRotations=ON, thickness=ON)
partInstances =(a.instances['Part-1-1'], a.instances['Part-1-2'], )
a.seedPartInstance(regions=partInstances, size=0.1, deviationFactor=0.1,
    minSizeFactor=0.1)
elemType1 = mesh.ElemType(elemCode=C3D8R, elemLibrary=STANDARD,
    kinematicSplit=AVERAGE_STRAIN, secondOrderAccuracy=OFF,
    hourglassControl=DEFAULT, distortionControl=DEFAULT)
elemType2 = mesh.ElemType(elemCode=C3D6, elemLibrary=STANDARD)
elemType3 = mesh.ElemType(elemCode=C3D4, elemLibrary=STANDARD)
c1 = a.instances['Part-1-1'].cells
cells1 = c1.getSequenceFromMask(mask=('[#1 ]', ), )
c2 = a.instances['Part-1-2'].cells
cells2 = c2.getSequenceFromMask(mask=('[#1 ]', ), )
pickedRegions =((cells1+cells2), )
a.setElementType(regions=pickedRegions, elemTypes=(elemType1, elemType2,
    elemType3))
a.generateMesh(regions=partInstances)
mdb.Job(name='Job-1', model='Model-1')
mdb.models['Model-1'].setValues(noPartsInputFile=OFF)
mdb.jobs['Job-1'].writeInput(consistencyChecking=OFF)

 

Best regards,

 

George

Subscribe to Comments for "How to define node-based-surface in Python script?"

Recent comments

More comments

Syndicate

Subscribe to Syndicate