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
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
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
myPart.SeedEdgeByNumber(edges=(myPart.edges.findAt((a, b, c),),), number=5)
RE: Problem with py command
Is there a fundamental difference ?
Thx and Greets
Nelso
RE: Problem with py command
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
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
Greets nelso
RE: Problem with py command
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
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
Nelso, did this fix your problem?
RE: Problem with py command
thx a lot
Greets from Europe