Hi,
i am in experience abaqus script user. i work with transient heat model. after completion of the model, i have to create new step on the same odb. then i have to read temperature of each node one by one. if the temperature is above 50 Celsius, i do a mathematical operation. if it is less 50 Celsius, i do not do any thing. finally new values have to be added to new field. i created script. it seems more than 90% are correct. i got stuck only in adddata command. can anybody provide codes to similar problem. here i have given my script.
from odbAccess import *
from abaqusConstants import *
from odbMaterial import *
from odbSection import *
import visualization
Myodb='F:/temp/block-TR625.odb'
harshaOdb= visualization.openOdb (path =Myodb,readOnly=FALSE)
center = harshaOdb.rootAssembly.nodeSets['SET-1']
stepName=harshaOdb.steps.keys()[-1]
#instance1= harshaOdb.rootAssembly.instances.keys(0)
instance1= harshaOdb.rootAssembly.instances['BLOCK-1']
temperature = harshaOdb.steps['Step-1'].frames[15].fieldOutputs['NT11']
temperatureset= temperature.getSubset(region=center)
temperaturesetvalues= temperatureset.values
Tempj= Tempi=0.0,0.0
Node_number=[]
temp_val=[]
for v in temperaturesetvalues:
Tempi = v.data
Nodei = v.nodeLabel
Node_number.append (Nodei)
if Tempi > 50:
Tempj= Tempi*2
else:
Tempj= Tempi
temp_val.append (Tempj)
Nodes=tuple(Node_number)
Node_Temp=tuple(temp_val)
#print Nodes
#print Node_Temp
HarshaStep = harshaOdb.Step(name='CECL '+stepName, description='Cumulative Equivalent Curing Level % ' + stepName, domain= TIME, timePeriod=1.0)
HarshaFrame = HarshaStep.Frame(incrementNumber=1, frameValue=1.0, description='Time ')
HarshaField = HarshaFrame.FieldOutput(name='Total Equivalent Curing Level % ' , description='Equivalent Curing %', type=SCALAR)
#HarshaField.addData(field=tmpField)
HarshaField.addData(position=NODAL, instance=instance1, labels=Nodes, data=Node_Temp)
HarshaStep.setDefaultDeformedField(HarshaField)
harshaOdb.save()
harshaOdb.close()
harshaOdb= visualization.openOdb (path =Myodb,readOnly=FALSE)