Nucleation Rate

This example will compute the nucleation rate with various precipitate parameters.

Note: the computeSteadyStateNucleation function does not account for the number of nucleation sites

Comparing multiple phases in Al-Mg-Si system

 1  import numpy as np
 2  import matplotlib.pyplot as plt
 3  
 4  from kawin.thermo import MulticomponentThermodynamics
 5  from kawin.precipitation.NucleationRate import computeSteadyStateNucleation
 6  from kawin.precipitation.PrecipitationParameters import MatrixParameters, PrecipitateParameters
 7  
 8  phases = ['FCC_A1', 'MGSI_B_P', 'MG5SI6_B_DP', 'B_PRIME_L', 'U1_PHASE', 'U2_PHASE']
 9  therm = MulticomponentThermodynamics('AlMgSi.tdb', ['AL', 'MG', 'SI'], phases)
10  
11  matrix = MatrixParameters(['MG', 'SI'])
12  matrix.volume.setVolume(1e-5, 'VM', 4)
13  
14  gamma = {
15      'MGSI_B_P': 0.18,
16      'MG5SI6_B_DP': 0.084,
17      'B_PRIME_L': 0.18,
18      'U1_PHASE': 0.18,
19      'U2_PHASE': 0.18
20          }
21  
22  precipitates = []
23  for p in phases[1:]:
24      params = PrecipitateParameters(p)
25      params.gamma = gamma[p]
26      params.volume.setVolume(1e-5, 'VM', 4)
27      precipitates.append(params)
28  
29  fig, ax = plt.subplots(figsize=(5,5))
30  T = np.linspace(50, 400, 100) + 273.15
31  for prec in precipitates:
32      nucRate = computeSteadyStateNucleation(therm, [0.0072, 0.0057], T, prec, matrix)
33      ax.plot(nucRate.nucleation_rate, T-273.15, label=prec.name)
34  ax.set_ylim([100, 400])
35  ax.set_xlim([1e-24, 1e-3])
36  ax.set_xscale('log')
37  ax.set_xlabel(r'Nucleation Rate ($s^{-1}$)')
38  ax.set_ylabel(r'Temperature ($\degree C $)')
39  ax.legend()
40  plt.show()

Comparing nucleation on different nucleation sites for Al-Zr

41  from kawin.thermo import BinaryThermodynamics
42  
43  therm = BinaryThermodynamics('AlScZr.tdb', elements=['AL', 'ZR'], phases=['FCC_A1', 'AL3ZR'])
44  therm.setGuessComposition(0.24)
45  
46  D0 = 0.0768         #Diffusivity pre-factor (m2/s)
47  Q = 242000          #Activation energy (J/mol)
48  diff = lambda T: D0 * np.exp(-Q / (8.314 * T))
49  therm.setDiffusivity(diff, 'FCC_A1')
50  
51  a = 0.405e-9      # nm
52  Va = a**3         # nm^3
53  atomsPerCell = 4
54  
55  matrix = MatrixParameters(solutes=['ZR'])
56  matrix.volume.setVolume(Va, 'VA', atomsPerCell)
57  matrix.GBenergy = 0.3
58  matrix.nucleationSites.setDislocationDensity(1e15)
59  matrix.nucleationSites.setGrainSize(100)
60  
61  precipitate = PrecipitateParameters('AL3ZR')
62  precipitate.gamma = 0.25   # J/m2
63  precipitate.volume.setVolume(Va, 'VA', atomsPerCell)
64  precipitate.nucleation.gbEnergy = matrix.GBenergy
65  
66  nucleationSites = ['dislocations', 'grain boundaries', 'grain edges', 'grain corners']
67  N0 = {
68      'dislocations': matrix.nucleationSites.dislocationN0,
69      'grain boundaries': matrix.nucleationSites.GBareaN0,
70      'grain edges': matrix.nucleationSites.GBedgeN0,
71      'grain corners': matrix.nucleationSites.GBcornerN0
72  }
73  
74  fig, ax = plt.subplots(figsize=(5,5))
75  T = np.linspace(300, 1200, 100)
76  for site in nucleationSites:
77      precipitate.nucleation.setNucleationType(site)
78      nucRate = computeSteadyStateNucleation(therm, 4e-3, T, precipitate, matrix)
79      ax.plot(N0[site]*nucRate.nucleation_rate, T, label=site.capitalize())
80  ax.legend()
81  ax.set_xlim([1e-20, 1e20])
82  ax.set_xscale('log')
83  ax.set_ylim([300, 1300])
84  ax.set_xlabel('Nucleation Rate (#/s)')
85  ax.set_ylabel('Temperature (K)')
86  plt.show()