get_strain¶
- torch_sim.elastic.get_strain(deformed_state, reference_state=None)[source]¶
Calculate strain tensor in Voigt notation.
Computes the strain tensor as a 6-component vector following Voigt notation. The calculation is performed relative to a reference (undeformed) state.
- Parameters:
- Returns:
- 6-component strain vector [εxx, εyy, εzz, εyz, εxz, εxy]
following Voigt notation
- Return type:
Notes
The strain is computed as ε = (u + u^T)/2 where u = M^(-1)ΔM, with M being the cell matrix and ΔM the cell difference.
Voigt notation mapping: - ε[0] = εxx = u[0,0] - ε[1] = εyy = u[1,1] - ε[2] = εzz = u[2,2] - ε[3] = εyz = u[2,1] - ε[4] = εxz = u[2,0] - ε[5] = εxy = u[1,0]