Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with py command

Status
Not open for further replies.

Nelso

Civil/Environmental
Jul 31, 2006
7
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
 
Replies continue below

Recommended for you

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
 
Try this:
myPart.SeedEdgeByNumber(edges=(myPart.edges.findAt((a, b, c),),), number=5)
 
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
 
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
 
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
 
I tried your idea with the Bias command, but there is no difference. abaqus shuts down, when entered the command.

Greets nelso
 
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?
 
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...)
 
yes thx, im sorry i couldnt try it last week because i had to work.
thx a lot

Greets from Europe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor