∂ρ
∂t + ∇· ( ˙q ρ) = 0
from eqn (4.1.4) refers to the evolution of a closed system with pre-existing density. As the com- puter cannot solve the equation analytically, in order to find the solution at time t2, first the state
at a given time t1 must be known and then a numerical scheme must be chosen to iterate for-
ward/backwards.
To iterate temporally, the time differential for a variable can be broken into a function of the states before and after a short time interval ∆t has elapsed. These density states are given by ρt
and ρt+∆t respectively.
∂ρ ∂t ≈ (
ρt+∆t − ρt
∆t ) (5.3.1)
To iterate spatially first the divergence operator must be expanded into its x and y components ∇ · ( ˙q ρ) = ∂( ˙qxρ)
∂x +
∂( ˙qyρ)
∂y (5.3.2)
Then the spatial domain must be discretised into a grid of known spacing. In this case a uniform grid was chosen, with spacing ∆x in the horizontal dimension and ∆y in the vertical dimension.
The local information (dislocation density etc.) that exists for each grid location is stored within the computer memory as a 2D array with indices [j, i]. The array is set up such that the i index scans across the array locations in the x-direction, the j scans in the y-direction, and the coordinate location is merely the index multiplied by the grid spacing.
x = [x, y] → x = x i e1 + yj e2 ˙ q = ˙q(x) → q =˙ q˙ xj,i e1 + q˙yj,i e2 ρ = ρ(x) → ρ = ρ j,i (5.3.3)
With this discretisation in place, a number of schemes are available for approximating spatial dif- ferentials in eqn (5.3.2). Each scheme will calculate the spatial gradient at a point in the same manner, using the values of surrounding array points to approximate the gradient over short dis- tances. The degree of accuracy in this approximation can differ according to the points used.
The simplest approximation, analogous to the temporal approximation in eqn (5.3.1), would involve looking at the array value at [j, i] and one other neighbouring point [j, i − 1]. The value change between these points can give an estimate of the gradient of a function, as long as the function is continuous. ∂( ˙qxρ) ∂x j,i ≈ ˙ q
xj,i ρj,i − ˙qxj,i−1 ρj,i−1
∆x (5.3.4)
This is termed a backwards two-point scheme. Backwards refers to the fact that the neighbouring point [j, i − 1] has been chosen in the negative x direction. Two-point refers to the number of array locations sampled within the scheme. FD schemes can be either forward facing, backward facing or two-sided depending on the points chosen. One scheme may suit a particular function more than another due to the characteristics of the chosen function. For example, for a very smooth continuous function it can be desirable to sample multiple points to improve the accuracy of the approximation. In general this is a way to lower the error associated with the final value [133]. However, for a jagged function in which the values change abruptly near the location of interest then the same approximation could sample an area of points much wider than a sharp feature and so the approximation would not provide an accurate local gradient measurement.
ρt+∆t, provides the updated dislocation density value at location [j, i] after a short interval. If this
calculation is performed at all locations then the dislocation density across the entire domain is updated and the quantity is said to have advected across the domain (at velocity ˙q).
Depending on the advection direction of the density there is a preferable direction for the spa- tial FD scheme to face, in order to produce a better approximation. Backwards differencing is preferred when the direction of travel is in the positive direction along a principal axis and forward differencing is preferred when the travel is in a negative direction. In the case of an edge dislocation within a crystal it is possible for the direction of movement to be either positive or negative, as its velocity has been shown to depend upon the forces applied to it. These forces may also flip direction as a reaction to applied or internal stresses during the course of a FE simulation; there- fore using a uni-directional scheme would not be appropriate to model this behaviour. To allow for this dynamic behaviour an Upwind approach was chosen. The upwind method switches between forward and backward schemes depending on the direction of travel, a decision which can be made simply by inspection of the sign of the velocity vector at the point of interest; this guarantees the best approximation under the local conditions.
For this model the forward and backward three-point schemes were found to be most appropri- ate for advection of dislocation density across the bulk material. Trials found this approximation best conserved the total density over long distances of advection and was less prone to numeri- cal instability forming unwanted density spikes. The three-point scheme weights the contribution of different local points with a numerical constant and samples over a distance of 2∆x or 2∆y. As the majority of motion within this model is in the positve direction then only the backwards differencing equations are displayed below:
∂( ˙qxρ)
∂x
j,i
≈ 3 ˙q
xj,i ρj,i − 4 ˙qxj,i−1 ρj,i−1 + ˙qxj,i−2 ρj,i−2
2∆x ∂( ˙qyρ) ∂y j,i ≈ 3 ˙q
yj,i ρj,i − 4 ˙qyj−1,i ρj−1,i + ˙qyj−2,i ρj−2,i
Substituting eqns (5.3.1), (5.3.2) and (5.3.5) into continuity eqn (4.1.4) gives ρ
t+∆tj,i − ρtj,i
∆t +
3 ˙q
xj,i ρtj,i − 4 ˙qxj,i−1 ρtj,i−1 + ˙qxj,i−2 ρtj,i−2
2∆x
!
+ 3 ˙q
yj,i ρtj,i − 4 ˙qyj−1,i ρtj−1,i + ˙qyj−2,i ρtj−2,i
2∆y
!
= 0 (5.3.6) Solving for local ρt+∆t gives the final equation for updating the density each iteration
ρ
t+∆tj,i = ρtj,i − ∆t
3 ˙q
xj,i ρtj,i − 4 ˙qxj,i−1 ρtj,i−1 + ˙qxj,i−2 ρtj,i−2
2∆x
!
− ∆t 3 ˙q
yj,i ρtj,i − 4 ˙qyj−1,i ρtj−1,i + ˙qyj−2,i ρtj−2,i
2∆y
!
(5.3.7) This equation may estimate the evolution of dislocation density across the regular grid (left-hand side), using the state of the current system as input (right-hand side). Once an estimation is made the dislocation state can be recycled into the equation again, using the new velocity fields, until the required time period has been achieved through small timesteps.
Examples of different schemes are displayed graphically in Fig. 5.3.1. The point of interest in each case is denoted by a black dot and any points included in the gradient approximation (the reference domain) are highlighted as circles. Case A shows the Two-Point backwards scheme in the x direction around ρ
t5,2. Case B shows the Three-Point backwards scheme in the x direction
around ρ
t5,3, while case C shows the same scheme in y direction around ρt7,4. Case D shows
the combined possible reference domains (red or black), around ρ
t5,6, for the Three-Point Upwind
Scheme used in this model.
NOTE: The narrower two-point schemes of the type in eqn (5.3.4) were used at hard boundaries and obstacles. These were implemented in the same way as the three-point schemes, but were necessary due to the large discontinuity of the density function across these barriers. As discussed, highly localised phenomena require a smaller reference domain for an accurate gradient estimation. It is also significant that at the edges of the grid the upwind behaviour was dropped, such that the scheme might always look inwards and not search for points outside of the domain.
Figure 5.3.1: Discretised grid showing the reference domain for the spatial gradient calculation used in different FD schemes.