User login

Navigation

You are here

Abaqus Python creating a surface set in a loop

Dear friends

I'm modelling a large penetration of a strip footing in clay soil. I'm using a Python script (Abaqus 6.13) for this.

The postion of the stip footing changes within each parent for loop increments. Under this parent loop there are several nested for and if loops. My problem is I need to track the bottom edges of the strip. Abaqus for some reason divides the edges even though I start with only one single line as bottom edge. I've written the following to identify all the edges i.e. to get a point on the edge and then combining all the bottom edges into one single entity, and then defining this entity as a set surface.

The program works fine upto a random penetration depth but then stops saying that the surface could not be created because there was no entity. When I checked the coordBotStrip (see below) it was empty at that problematic step so no surface could be formed. But this same coordBotStrip had the coordinates of the edges in previous cycles before stopping (no matter how many times the edge is divided). This is driving me crazy as I can't figure out what I'm doing wrong here or is Abaqus/Python just screwing me up! Any help is greatly appreciated. Could this be a problem with the append command? It seems it is not appending at the problematic step but correctly appending in all other previous steps.

  coordBotStrip=[]

  totalEdgesBotStrip=len(newAssembly.instances['MYSTRIPINSTANCE'].edges)

  for i in range(0,totalEdgesBotStrip):

    x1=newAssembly.instances['MYSTRIPINSTANCE'].edges[i].pointOn[0][0]

    y1=newAssembly.instances['MYSTRIPINSTANCE'].edges[i].pointOn[0][1]

    edgeTemp=(newAssembly.instances['MYSTRIPINSTANCE'].edges[i].pointOn[0],)

    if y1==(-1e-6*j):      # j is the counter belonging to the first for statement used. 

        coordBotStrip.append(edgeTemp)

  s1= newAssembly.instances['MYSTRIPINSTANCE'].edges

  side1Edges1=[]

  for i in range(0,len(coordBotStrip)):

    x=s1.findAt(coordBotStrip[i])                      

    side1Edges1.append(x)

    print 'side1Edges1 = ', side1Edges1

  newAssembly.Surface(side1Edges=side1Edges1, name='bottomStripSurface')   # master surface created

 

Rgds,

blueSky

Subscribe to Comments for "Abaqus Python creating a surface set in a loop"

Recent comments

More comments

Syndicate

Subscribe to Syndicate