×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Changing out data and/or removing data fields

Changing out data and/or removing data fields

Changing out data and/or removing data fields

(OP)
I am currently running a thermal analysis using abaqus, the output file .odb provides the results in kelvin (K). I would like the temperature output to be in Degrees Celcius.
I have a python script that reads the temperature results field (NT11) subtracts 273.15 from the value and writes it in a new field (which i have named DegC). This is fine, however i would like to either overwrite the NT11 field to show all the values in Degrees Celcius only or, use the current script and add a few lines that would remove the NT11 field completely and rename the new field (DegC) to NT11.
Is this possible?

Thanks
Mez

RE: Changing out data and/or removing data fields

I think you can't delete a field - just create new fields.

Why did you used a script? The built-in functionality could do the same job.
See Tools -> Field Output -> Create From Fields
A/CAE Manual 42.7.4 Creating field output by operating on fields

RE: Changing out data and/or removing data fields

(OP)
Yes thats what ive been reading, it only allows you to create new ones.
I need a script becuase i need to save it to the .odb
I have been looking at another thread which is trying to achieve something slightly different but i think it might be a good approach?
thread799-413825: [Urgent] Renaming output variables of the .odb file?
So the alternate solution would be to create a new step and frames with the new field...?
the thread i have referenced creates new steps and frames, but not perfectly clear on what his code is doing...

my current code reads:

from abaqusConstants import *
from odbAccess import *

# ******************************************************************************
# Modify the next variables accordingly:
odbPath = 'directory/filename.odb' # path to output database
# ******************************************************************************

odb = session.openOdb(name=odbPath,readOnly=FALSE)
allSteps = session.odbData[odbPath].steps.keys()
for i in range(len(allSteps)):
step = odb.steps[allSteps[i]]
allFrames = session.odbData[odbPath].steps[allSteps[i]].frames.keys()
for j in range(len(allFrames)):
frame = step.frames[j]
s1f1_NT11=frame.fieldOutputs['NT11']
tmpField = s1f1_NT11-273.15
newField = frame.FieldOutput(name='degC', description='convert_to_degC', field=tmpField)
print 'stepName = ', allSteps[i], ' frameNumber = ', allFrames[j]
odb.save()
odb.close()

how would i go about creating new steps with the new field (that is dervied from an existing field) through script?

thanks

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources