Determine Yield Point#

  • Contributor: Martin Diehl (https://martin-diehl.net)

  • DAMASK version: 3.0.2

  • Prerequisites (data): DADF5 results file with 1. Piola-Kirchhoff stress (‘P’) and deformation gradient (‘F’)

[1]:
%matplotlib inline
[2]:
import damask
import numpy as np
import matplotlib.pyplot as plt
from scipy import interpolate
[3]:
# adjust to your situation
result_file = 'determine_yield_point/20grains16x16x16_tensionX.hdf5'
idx = [0,0] # xx-component

Procedure#

The yield point is determined as the intersection of a line with the slope of the elastic response shifted by 0.2%. To ensure that the solution is insensitive to the selected time stepping, stress and strain are resampled.

[4]:
result = damask.Result(result_file)
result.add_strain()
result.add_stress_Cauchy()
[5]:
sigma = np.array([np.average(s[:,idx[0],idx[1]]) for s in result.place('sigma').values()])
epsilon = np.array([np.average(e[:,idx[0],idx[1]]) for e in result.place('epsilon_V^0.0(F)').values()])
E_load = sigma[1]/epsilon[1]
[6]:
# interpolate and resample, mainly useful for a coarse time discretization
sigma_interpolated = interpolate.CubicSpline(epsilon,sigma)
epsilon_resampled = np.linspace(epsilon[0],epsilon[-1],num=1000)
sigma_resampled = sigma_interpolated(epsilon_resampled)
[7]:
i = np.argmax(sigma_resampled < (epsilon_resampled - 0.002)*E_load)
[8]:
print(f"Young's modulus in loading direction: {round(E_load/1e9)} GPa")
print(f'Yield stress: {round(sigma_resampled[i]/1e6)} MPa at a strain of {round(epsilon_resampled[i]*100,3)} %')
Young's modulus in loading direction: 65 GPa
Yield stress: 77 MPa at a strain of 0.325 %
[9]:
fig, ax = plt.subplots()
ax.plot(epsilon,sigma)
ax.plot([0.002,0.002+sigma[-1]/E_load],[0,sigma[-1]],label='shifted elastic response')
ax.scatter(epsilon_resampled[i],sigma_resampled[i],label='R_p 0.2%',zorder=2)

ax.set_title('stress–strain curve with yield point')
ax.set_xlabel('strain in loading direction')
ax.set_ylabel('stress in loading direction in Pa')
ax.legend()

plt.show()
../../_images/documentation_how-to_guides_determine_yield_point_10_0.png