×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Problem with py command

Problem with py command

Problem with py command

(OP)
Hi everybody,

I'm a Abaqus beginner and have a little question to you.
I'm working in Abaqus with Python commands and don't know how to formulate the following kind of command :

myPart.SeedEdgeByNumber(edges=myPart.edges.findAt((a, b, c),), number=5)
The Error message is: Type Error: edges; found Edge, expecting tuple

Is there another possibility to formulate this command ?
I'm looking forward for your answers.

Thanks a lot,

Greets from Germany
Nelso
 

RE: Problem with py command

(OP)
This problem i think i have fixed now.
Another problem is the formulation of this:


BTI1.seedEdgeByNumber(edges=(BiasEdge1, BiasEdge2, BiasEdge3, BiasEdge4, BiasEdge5,BiasEdge6, BiasEdge7, BiasEdge8,), number=5, ratio=5)    

BTI1.seedEdgeByBias(end1Edges=(BiasEdge1, BiasEdge2, BiasEdge3, BiasEdge4,), end2Edges=(BiasEdge5, BiasEdge6, BiasEdge7, BiasEdge8,), number=5, ratio=5)

The first one runs ok, the second one causes Abaqus to shut down. Any ideas ?

Thanks Nelso    

RE: Problem with py command

Try this:
myPart.SeedEdgeByNumber(edges=(myPart.edges.findAt((a, b, c),),), number=5)

RE: Problem with py command

(OP)
Thanks for your answer, but my question was about the formulation of the second command, the first one is ok ( without typing the ratio argument). But the formulation doesn't work with the seedEdgeByBias command.

Is there a fundamental difference ?

Thx and Greets
Nelso

RE: Problem with py command

Try to split the line
BTI1.seedEdgeByBias(end1Edges=(BiasEdge1, BiasEdge2, BiasEdge3, BiasEdge4,), end2Edges=(BiasEdge5, BiasEdge6, BiasEdge7, BiasEdge8,), number=5, ratio=5)

in two parts:

BTI1.seedEdgeByBias(end1Edges=(BiasEdge1, BiasEdge2, BiasEdge3, BiasEdge4),number=5, ratio=5)

BTI1.seedEdgeByBias(end2Edges=(BiasEdge5, BiasEdge6, BiasEdge7, BiasEdge8), number=5, ratio=5)

Be sure that some of the BiasEdge1,2,3....do not refer to the same edge object, which might happen if used the FindAt method.

BTW: you do not need to end a tuple with a comma unless it has only one element

RE: Problem with py command

(OP)
Thanks for your help xerf,

but i have a last question:

How can I described such a formulation

m.rootAssembly.Set(name='Auflager', referencePoints=(m.rootAssembly.referencePoints[23], ))

with the findAt command or

with a link to RFP1:

RFP1=m.rootAssembly.ReferencePoint(point=(-e, (dy1+dy2)/2, tI/2))


I think I tried every possibilty.

Thx a lot and Greets
Nelso

RE: Problem with py command

(OP)
I tried your idea with the Bias command, but there is no difference. abaqus shuts down, when entered the command.

Greets nelso

RE: Problem with py command

Nelso,

Your command is constructed perfectly. Namely, the command syntax:

p.seedEdgeByBias(end1Edges=edges1, end2Edges=edges2, ratio=5.0, number=10)

The problem most likely lies in the sequence of edge objects you are passing to it. Can you let us know exactly how you are  getting your edge objects?

RE: Problem with py command

Nelso,

Regarding your last question on creating sets from reference points: it is easily doable.


1. Create your Ref Point RFP1
>>> RFP1=mdb.models['Model-1'].rootAssembly.ReferencePoint( point=(0, 0, 0) )

2. Create an object of all reference points (we'll use it later. It is easier to read your script if you split things up this way...)
>>> rps = mdb.models['Model-1'].rootAssembly.referencePoints

3. Create the set. The trick is to find the id of the RFP1 feature created. Fortunately it's dead simple... that is... RFP1.id Finally make sure you provide the referencePoints as a sequence of objects.

>>> mdb.models['Model-1'].rootAssembly.Set(name='Ja', referencePoints=( (rps[RFP1.id]),) )

Good luck!

PS This trick of creating a feature, then querying it to get an id for usage later is very useful indeed... Try it when next you create a datum, then want to reference that datum to partition a cell (This is just one of many, many examples...)

RE: Problem with py command

Bump.

Nelso, did this fix your problem?

RE: Problem with py command

(OP)
yes thx, im sorry i couldnt try it last week because i had to work.
thx a lot

Greets from Europe

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources