Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Abaqus Script - Create simple ODB without submitting a job

Status
Not open for further replies.

ajk441

Aerospace
Jan 26, 2015
3
Hello.

I'm looking to create a simple ODB file using my model in session so that I can display an orientation tensor in a custom field. I'm able to create an ODB for a 2d part (made of s4 elements), but my system crashes whenever I load the ODB for my 3d part (made of c3d8 elements).

Here is my script. Any help would be greatly appreciated!



from abaqusConstants import *

from odbAccess import *


odb = Odb(name='4',

analysisTitle='derived data',

description='test problem',

path='4.odb')



sCat = odb.SectionCategory(name='solid',

description='Test')



part1 = odb.Part(name='part-1',embeddedSpace=THREE_D, type=DEFORMABLE_BODY)



nodeData = [(1, -5.0, -5.0, 10.0), (2, -5.0, 5.0, 10.0), (3, -5.0, -5.0, 0.0), (4, -5.0, 5.0, 0.0), (5, 5.0, -5.0, 10.0), (6, 5.0, 5.0, 10.0), (7, 5.0, -5.0, 0.0), (8, 5.0, 5.0, 0.0)]

part1.addNodes(nodeData=nodeData, nodeSetName='nset-1')



elementData = [(1, 4, 5, 7, 6, 0, 1, 3, 2)]

part1.addElements(elementData=elementData, type='C3D8',

elementSetName='eset-1', sectionCategory=sCat)



assembly = odb.rootAssembly

instance1 = assembly.Instance(name='part-1-1', object=part1)



# An element set on an instance

eLabels = [1]

elementSet = instance1.ElementSetFromElementLabels(

name='eall',elementLabels=eLabels)

# A node set on the rootAssembly

instance1.NodeSetFromNodeLabels('nall', (1,2,3,4,5,6,7,8))



step1 = odb.Step(name='step-1', description='', domain=TIME, timePeriod=1.0)

frame1 = step1.Frame(incrementNumber=1, frameValue=0.1, description='')

fieldout = frame1.FieldOutput(name="FO", description="Fiber Orientation Data", type=TENSOR_3D_FULL, isEngineeringTensor=TRUE, validInvariants=[MAX_PRINCIPAL,])

elist = [1]

strs = [[0.72539, 0.19255, 0.082066, -0.12808, -0.1158, 0.042058]]

fieldout.addData(position=CENTROID, instance=instance1, labels=elist, data=strs)


odb.save()

odb.close()
 
Replies continue below

Recommended for you

Status
Not open for further replies.

Part and Inventory Search

Sponsor