DDD-XRD Matlab implementation and validation: Difference between revisions

From Micro and Nano Mechanics Group
Jump to navigation Jump to search
Line 96: Line 96:
The computation of the non-singular displacement gradient based on the expressions provided in the above (Bertin and Cai, CMS, 2018) is implemented in a Matlab code available here:
The computation of the non-singular displacement gradient based on the expressions provided in the above (Bertin and Cai, CMS, 2018) is implemented in a Matlab code available here:


[[File:ddd_xrd_matlab.tar | ddd_xrd_matlab.tar]]
[[Media:ddd_xrd_matlab.tar | ddd_xrd_matlab.tar]]


Function <tt>displacement_gradient_seg.m</tt> readily implements the displacement gradient for a straight dislocation segment using the expressions presented in the above. An optimized version (faster) is provided in <tt>displacement_gradient_seg_opt.m</tt>. The calculation of the displacement gradient field for a set of dislocation segments can be performed using function <tt>displacement_gradient_structure.m</tt>. Note that this implementation uses the [http://micro.stanford.edu/~caiwei/Forum/2005-12-05-DDLab/ DDLab] data structure to represent the dislocations.
Function <tt>displacement_gradient_seg.m</tt> readily implements the displacement gradient for a straight dislocation segment using the expressions presented in the above. An optimized version (faster) is provided in <tt>displacement_gradient_seg_opt.m</tt>. The calculation of the displacement gradient field for a set of dislocation segments can be performed using function <tt>displacement_gradient_structure.m</tt>. Note that this implementation uses the [http://micro.stanford.edu/~caiwei/Forum/2005-12-05-DDLab/ DDLab] data structure to represent the dislocations.

Revision as of 19:38, 31 January 2018

DDD-XRD approach

DDD-XRD: Matlab implementation and validation

Nicolas Bertin and Wei Cai

January 2018


This page provides Matlab functions to compute the displacement gradient associated with discrete dislocation segments based on the non-singular formulation presented in Bertin and Cai, CMS, 2018.


Analytical non-singular displacement gradient formulation

It can be shown that the deformation gradient produced by a dislocation loop with Burgers vector can be written as (see Bertin and Cai, CMS, 2018):

where is the norm of the distance vector linking the field point and the coordinate spanning the dislocation line, is the permutation tensor, and is Poisson's ratio of the medium. denotes the third derivative of the radius vector wrt. the field coordinate.

Following the isotropic Burgers distribution proposed in Cai et al., JMPS, 2006, the singularity in the above expression can be eliminated by employing the modified radius vector defined as:

where denotes the dislocation core radius. With this, the displacement gradient produced by a straight dislocation segment with end points and can be analytically expressed as:

where line integrals and are given by:

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle A_{jk}(\vec{x}) = t_k \left[ 3a^2 d_j J_{05} + 2d_j J_{03} + 3a^2 t_j J_{15} + 2t_j J_{13} \right] }
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{align} B_{jklm}(\vec{x}) = &t_k \left[ (\delta_{mj}d_l + \delta_{jl}d_m + \delta_{lm}d_j)J_{03} + (\delta_{mj}t_l + \delta_{jl}t_m + \delta_{lm}t_j)J_{13} - 3(d_m d_j d_l)J_{05} \right. \\ &\left. -3(d_m d_j t_l + d_m t_j d_l + t_m d_j d_l)J_{15} - 3(d_m t_j t_l + t_m d_j t_l + t_m t_j d_l)J_{25} -3(t_m t_j t_l)J_{35} \right] \end{align} }

where Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \vec{t}} denotes the unit dislocation line tangent, and Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \vec{d} = \vec{x}_0-\vec{x}} is the vector linking field point Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \vec{x}} to its orthogonal projection Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \vec{x}_0} on the dislocation line.

When adopting the following segment parametric representation

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \vec{x'} = \vec{x}_0 + s\vec{t}, \; s \in (s_1,s_2) }

an analytical expression for the line integrals Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle J_{ij}} is obtained as follows:

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{align} &J_{03} = \int_{s_1}^{s_2} \frac{1}{R_a^3} ds = \left. \frac{s}{( \vec{d} \cdot \vec{d} + a^2 ) R_a } \right|_{s_1}^{s_2} \\ &J_{13} = \int_{s_1}^{s_2} \frac{s}{R_a^3} ds = \left. -\frac{1}{R_a} \right|_{s_1}^{s_2} \\ &J_{05} = \int_{s_1}^{s_2} \frac{1}{R_a^5} ds = \left. \frac{2s^3}{3( \vec{d} \cdot \vec{d} + a^2 )^2 R_a^3 } \right|_{s_1}^{s_2} + \left. \frac{s}{( \vec{d} \cdot \vec{d} + a^2 ) R_a^3 } \right|_{s_1}^{s_2} \\ &J_{15} = \int_{s_1}^{s_2} \frac{s}{R_a^5} ds = \left. -\frac{1}{3 R_a^3} \right|_{s_1}^{s_2} \\ &J_{25} = \int_{s_1}^{s_2} \frac{s^2}{R_a^5} ds = \left. \frac{s^3}{3( \vec{d} \cdot \vec{d} + a^2 ) R_a^3 } \right|_{s_1}^{s_2} \\ &J_{35} = \int_{s_1}^{s_2} \frac{s^3}{R_a^5} ds = \left. -\frac{2(\vec{d} \cdot \vec{d} + a^2)}{3 R_a^3} \right|_{s_1}^{s_2} -\left. \frac{s^2}{R_a^3 } \right|_{s_1}^{s_2} \end{align} }


Matlab implementation

Code

The computation of the non-singular displacement gradient based on the expressions provided in the above (Bertin and Cai, CMS, 2018) is implemented in a Matlab code available here:

ddd_xrd_matlab.tar

Function displacement_gradient_seg.m readily implements the displacement gradient for a straight dislocation segment using the expressions presented in the above. An optimized version (faster) is provided in displacement_gradient_seg_opt.m. The calculation of the displacement gradient field for a set of dislocation segments can be performed using function displacement_gradient_structure.m. Note that this implementation uses the DDLab data structure to represent the dislocations.

Validation: triangular loop test case

The code includes a test case (test_triangular_loop.m) that (i) provides an example of how to use the calculation functions, and (ii) performs calculations that validate the non-singular displacement gradient formulation.

This test case does the following:

  • generates a random triangular dislocation loop
  • computes the displacement gradient field along a line using the non-singular expression provided in Bertin and Cai, CMS, 2018.
  • compares it with the displacement gradient field obtained by numerically differentiating the displacement field
  • compares the stress obtained from the displacement gradient field with the non-singular stress expression provided in Cai et al., JMPS, 2006