User login

Navigation

You are here

Python scripting

Hello,

 I am using python script to automate a repeatative task. During this I am faceing problem. Please help.

I have created a sketch by

 mysketch= mdb.Model(name='Cantilever') .ConstrainedSketch(name='beam', sheetSize=200.0)

 mysketch.rectangle(point1=(0,0), point2=(100,10))

I want to take underlined numbers as an input from user for that i have defined variavles as l and w of cantilever. When I use this  

 mysketch.rectangle(point1=(0,0), point2=(l,w))

abaqus gives error during compilation.

 Can anybody suggest How to use variables at point2=(l,w))

 
Thanks

 

Free Tags: 
Johannes T.B. Overvelde's picture

 l=100.0
w=10.0

#this creates a two dimensional deformable rectangular part

mdb.models['Cantilever'].ConstrainedSketch(name='__profile__', sheetSize=10.0)
mdb.models['Cantilever'].sketches['__profile__'].rectangle(point1=(0.0, 0.0),
    point2=(l,w))
mdb.models['Cantilever'].Part(dimensionality=TWO_D_PLANAR, name='Beam', type=
    DEFORMABLE_BODY)
mdb.models['Cantilever'].parts['Beam'].BaseShell(sketch=
    mdb.models['Cantilever'].sketches['__profile__'])
del mdb.models['Cantilever'].sketches['__profile__']

Thanks

This is working!!

In Abaqus .inp or Abaqus/CAE, are there mesh generation commands similar to ANSYS commands FILL, NGEN, and EGEN used to geneate nodes (between keypoints) and elements ?

Echeban

Johannes T.B. Overvelde's picture

.inp from abaqus doesn't do anything with mesh generation. You provide the nodes, elements and connectivity. In Abaqus cae you can generate a mesh after seeding your structure like in Fill, I don't know NGEN or EGEN, put i do think Abaqus mesh generation is easier than Ansys mesh generation.

Subscribe to Comments for "Python scripting"

Recent comments

More comments

Syndicate

Subscribe to Syndicate