Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. # tensors for loading and unloading frame of cycle
  2. loadFieldLE = odb.steps[lastStepName].frames[0].fieldOutputs['LE']
  3. loadFieldS = odb.steps[lastStepName].frames[0].fieldOutputs['S']
  4. unloadFieldLE = odb.steps[lastStepName].frames[-1].fieldOutputs['LE']
  5. unloadFieldS = odb.steps[lastStepName].frames[-1].fieldOutputs['S']
  6.  
  7. # calculate tensor mean and amplitude values
  8. meanLE = 0.5*(loadFieldLE+unloadFieldLE)
  9. ampLE = 0.5*(loadFieldLE-unloadFieldLE)
  10. meanS = 0.5*(loadFieldS+unloadFieldS)
  11. ampS = 0.5*(loadFieldS-unloadFieldS)
  12.  
  13. #store strain amplitude, and update maxumum strain amplitude
  14. cycEA = []
  15. for v in ampLE.values:
  16. cycE3 = v.maxPrincipal
  17. cycE1 = v.minPrincipal
  18. if abs(cycE3) > abs(cycE1):
  19. cycE3abs = cycE3
  20. else:
  21. cycE3abs = cycE1
  22. cycEA.append(cycE3abs)
  23. if abs(cycE3abs) > abs(cycEAmax):
  24. cycEAmax = cycE3abs
  25.  
  26. # .002 store shear strain amplitude, and update maxumum strain amplitude
  27. cycTau = []
  28. for v in ampLE.values:
  29. cycE3 = v.maxPrincipal
  30. cycE1 = v.minPrincipal
  31. tau = (abs(cycE3) - abs(cycE1))/2
  32. cycTau.append(tau)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement