×
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

Calculating E from stress and strain in ABAQUS?

Calculating E from stress and strain in ABAQUS?

Calculating E from stress and strain in ABAQUS?

(OP)
Hello everyone,

Is there a way to calculate E from stress and strain in ABAQUS?  The reason I ask is because there is no field like that in the field output or history output requests list...

Thanks in advance.

RE: Calculating E from stress and strain in ABAQUS?

Hey spintwo,

I have done this before. Below you can find a script that works for my output database. You can adjust it to make it work for yours as well.

If you have any more questions, don't hesitate to ask.



# Import the necessary libraries from Abaqus

from Numeric import *
from Matrix import *
from LinearAlgebra import *
from abaqusConstants import *
from abaqus import *

import odbAccess

## calculate the average stiffness ####

# Calculate the entire volume of UC

LenX=100
LenY=100
LenZ=1
UVol=LenX*LenY*LenZ

# These values will be needed later in the program

Cord100=0
Cord010=0
Cord001=0
Cord200=1   

# Enter the correct name of the job in the next line

JobName='Dirichlet_d5_10'
OdbName=JobName+'.odb'
myodb=odbAccess.openOdb(path=OdbName)

# Enter the correct step name in the next line

mystress=myodb.steps['Step-1'].frames[-1].fieldOutputs['S']
mystrain=myodb.steps['Step-1'].frames[-1].fieldOutputs['E']

# Transform the stress to the global coordinate system. The stresses were originally in local coordinates, you have to transform them!

odb = session.odbs[OdbName]
scratchOdb = session.ScratchOdb(odb)

# Build up the global coordinate system

scratchOdb.rootAssembly.DatumCsysByThreePoints(name='AGlobalSys',
coordSysType=CARTESIAN, origin=(Cord100, Cord010,
Cord001), point1=(Cord200, Cord010, Cord001), point2=(
Cord100, Cord200, Cord001))

# The actual transformation happens in the next three lines
s_AGlobalCoord = session.scratchOdbs[OdbName].rootAssembly.datumCsyses['AGlobalSys']
tmpField1 = mystress.getTransformedField(datumCsys=s_AGlobalCoord)
mystress=tmpField1
tmpField2 = mystrain.getTransformedField(datumCsys=s_AGlobalCoord)
mystrain=tmpField2

# Make sure IVOL is defined in the fieldoutputs!

myivol=myodb.steps['Step-1'].frames[-1].fieldOutputs['IVOL']

# Give the instance the correct name!

myelement=myodb.rootAssembly.instances['PART-1-1'].elements

# Home made for exercise 1 - calculation for all boundary conditions

############# Actual calculations ##############
strain11 = 0
strain22 = 0
stress11 = 0
# Loop over all elements
for j in range(len(mystress.values)):
  # data[0] means S11, values[j] indicates the element
  stress11 = stress11 + mystress.values[j].data[0]*myivol.values[j].data



for j in range(len(mystrain.values)):
  # data[0] means E11, values[j] indicates the element
  strain11 = strain11 + mystrain.values[j].data[0]*myivol.values[j].data
  strain22 = strain22 + mystrain.values[j].data[1]*myivol.values[j].data
  

  
# Take the average over the volume
stress11 = stress11/UVol
strain11 = strain11/UVol
strain22 = strain22/UVol
# Calculate stiffness
stiffness = stress11/strain11
poisson =  -strain22/strain11

# Print the values for verification
 
print strain
print stress
print stiffness
print poisson
 

RE: Calculating E from stress and strain in ABAQUS?

(OP)
Is this just a Pearl script that you open in Abaqus?

RE: Calculating E from stress and strain in ABAQUS?

No, it's 100% python script.

You can probably leave out the transformation part in your case. I was working with a local and global CSYS which were different.

RE: Calculating E from stress and strain in ABAQUS?

(OP)
Thanks so much!

RE: Calculating E from stress and strain in ABAQUS?

You're welcome.

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