Skip to content

Instantly share code, notes, and snippets.

install.packages("tm")
install.packages("SnowballC")
install.packages("wordcloud")
install.packages("readtext")
library(tm)
library(SnowballC)
library(wordcloud)
library(readtext)
@cbonsig
cbonsig / ivolResults.002.py
Last active February 28, 2017 01:24
calculating shear strain from max principal strain and min principal strain
# tensors for loading and unloading frame of cycle
loadFieldLE = odb.steps[lastStepName].frames[0].fieldOutputs['LE']
loadFieldS = odb.steps[lastStepName].frames[0].fieldOutputs['S']
unloadFieldLE = odb.steps[lastStepName].frames[-1].fieldOutputs['LE']
unloadFieldS = odb.steps[lastStepName].frames[-1].fieldOutputs['S']
# calculate tensor mean and amplitude values
meanLE = 0.5*(loadFieldLE+unloadFieldLE)
ampLE = 0.5*(loadFieldLE-unloadFieldLE)
meanS = 0.5*(loadFieldS+unloadFieldS)