kawin.EffectiveDiffusion

class kawin.EffectiveDiffusionFunctions(self)

Stores variables and functions to calculate effective diffusion distance 

kawin.EffectiveDiffusionFunctions.setupInterpolation(self, n = 250, lmin = -5, lmax = 1)

Sets up interpolation points for effective diffusion distance 
 
Parameters 
---------- 
n : int 
    Number of points to interpolate between, two endpoints will be added 
    at supersaturation of 0 and 1 
lmin : float 
    Minimum lambda value in log scale 
lmax : float 
    Maximum lambda value in log scale 

kawin.EffectiveDiffusionFunctions.effectiveDiffusionDistance(self, supersaturation)

Effective diffusion distance given supersaturation 
This gives a constant to be multiplied by the particle radius 
 
The effective diffusion distance is given by 
eps = Q/2*lambda 
 
Where Q is the super saturation and lambda is given by 
Q = 2*lambda^2 - 2*lambda^3 * sqrt(pi) * exp(lambda^2) * (1 - erf(lambda)) 
 
Parameters 
---------- 
supersaturation : float or array of floats 
    (x - x_P) / (x_M - x_P) where x is matrix composition, x_M is parent composition and x_P is precipitate composition 
 
Returns 
------- 
Effective diffusion distance (eps) to be used as (eps*R) in the growth rate equation 

kawin.EffectiveDiffusionFunctions.lambdaLow(self, supersaturation)

kawin.EffectiveDiffusionFunctions.lambdaHigh(self, supersaturation)

kawin.EffectiveDiffusionFunctions.effectiveDiffusionDistanceApprox(self, supersaturation)

Effective diffusion distance given supersaturation 
This gives a constant to be multiplied by the particle radius 
 
When Q approaches 1, this equation oscillates due to floating point errors 
Therefore, interpolation is performed between the two limits (Q -> 0 and Q -> 1) 
 
This may be removed in later versions 
 
Parameters 
---------- 
supersaturation : float or array of floats 
    (x - x_P) / (x_M - x_P) where x is matrix composition, x_M is parent composition and x_P is precipitate composition 
 
Returns 
------- 
Effective diffusion distance (eps) to be used as (eps*R) in the growth rate equation 

kawin.EffectiveDiffusionFunctions.noDiffusionDistance(self, supersaturation)

If neglecting the effective diffusion distance, return 1 
 
Parameters 
---------- 
supersaturation : float or array of floats 
    (x - x_P) / (x_M - x_P) where x is matrix composition, x_M is parent composition and x_P is precipitate composition 
 
Returns 
------- 
1 or array of 1s