Calculate r-Value#

  • Contributer: Franz Roters

  • DAMASK version: 3.0.1

  • Prerequisites (data): DADF5 results file from MSC.Marc with plastic deformation gradient (‘F_p’)

[1]:
%matplotlib inline
[2]:
import damask
import numpy as np
import matplotlib.pyplot as plt
[3]:
# adjust to your situation, file needs to exist
result_file = 'r-value_Marc/r-value_texture.hdf5'
[4]:
result = damask.Result(result_file)
result.add_strain('F_p','U')
result.add_equivalent_Mises('epsilon_U^0.0(F_p)')
[5]:
epsilon_avg = np.array([np.average(eps,0) for eps in result.get('epsilon_U^0.0(F_p)').values()])
r = epsilon_avg[:,1,1]/epsilon_avg[:,2,2]
s = np.array([np.average(strain) for strain in result.get('epsilon_U^0.0(F_p)_vM').values()])
[6]:
plt.plot(s[10:],r[10:])
plt.ylabel('r-value')
plt.xlabel('plastic vM strain')
plt.axis([0, 0.2, 0, 1])
plt.show()
../../_images/documentation_examples_r-value_Marc_6_0.png