lattice
Compute variables describing the evolution of the crystal lattice.
- lattice.compute_alpha_nonideal(dt, yVa, yVa_eq, V, Vp, fm, k_dislo, k_pores)[source]
Compute lattice sink rate in non-ideal case.
- Parameters:
dt (float) – Time step.
yVa (1D array) – Vacancy site fraction, shape (nz - 1,).
yVa_eq (1D array) – Equilibrium vacancy site fraction, shape (nz - 1,).
V (1D array) – System average molar volume, shape (nz - 1,).
Vp (dict of floats) – Partial molar volumes.
fm (1D array) – Metal volume fraction, shape (nz - 1,).
k_dislo (1D array) – Sink strength associated with dislocation climb, shape (nz - 1,).
k_pores (1D array) – Sink strength associated with pore growth, shape (nz - 1,).
- Returns:
alpha_d (1D array) – Sink term associated with dislocation climb, shape (nz - 1,).
alpha_p (1D array) – Sink term associated with pore growth, shape (nz - 1,).
- lattice.compute_gamma(Jlat, z, Vk, V0, Vp, V, alpha_d, alpha_p, y_Va, geometry)[source]
Compute relative volume variation rate.
- Parameters:
Jlat (1D array) – Fluxes in the lattice frame, shape (ninds + 1, nz).
z (1D array) – Node positions, shape (nz,).
Vk (1D array) – Partial molar volumes.
V0 (float or 1D array) – Partial molar volume of the vacancy.
Vp (float or 1D array) – Partial molar volume of the pore.
V (1D array) – System average molar volume, shape (nz - 1,).
alpha_d (1D array) – Sink term associated with dislocation climb, shape (nz - 1,).
alpha_p (1D array) – Sink term associated with pore growth, shape (nz - 1,).
y_Va (1D array) – Vacancy site fraction, shape (nz - 1,).
geometry (str) – Domain geometry (planar, cylindrical or spherical).
- Returns:
gamma – Relative volume variation rate, shape (nz - 1,).
- Return type:
1D array
- lattice.compute_gamma_V(Jlat, z, Vk, V0, Vm, V, y_Va, alpha, geometry)[source]
Compute relative volume variation rate due to molar volume variation.
- Parameters:
Jlat (1D array) – Fluxes in the lattice frame, shape (ninds + 1, nz).
z (1D array) – Node positions, shape (nz,).
Vk (1D array) – Partial molar volumes.
V0 (float or 1D array) – Partial molar volume of the vacancy.
Vm (1D array) – Average molar volume of the metal phase, shape (nz - 1,).
V (1D array) – System average molar volume, shape (nz - 1,).
y_Va (1D array) – Vacancy site fraction, shape (nz - 1,).
alpha (1D array) – Sink term, shape (nz - 1,).
geometry (str) – Domain geometry (planar, cylindrical or spherical).
- Returns:
gamma_V – Relative volume variation rate due to molar volume variation, shape (nz - 1,).
- Return type:
1D array
- lattice.compute_velocity(gamma, z, Vk, V0, Jlat, yVa, geometry)[source]
Compute velocity field of the lattice in the laboratory frame.
v is calculated via an integral from 0 to z -> need to add value at 0. v_left is obtained assuming ideal lattice activity on left boundary (and neglecting the gradient of Vm/(1 - yVa) in getting the primitive).
- Parameters:
gamma (1D array) – Relative volume variation rate, shape (nz - 1,).
z (1D array) – Node positions, shape (nz,).
Vk (1D array) – Partial molar volumes.
V0 (float or 1D array) – Partial molar volume of the vacancy.
Jlat (1D array) – Fluxes in the lattice frame, shape (ninds + 1, nz).
yVa (1D array) – Vacancy site fraction, shape (nz - 1,).
geometry (str) – Domain geometry (planar, cylindrical or spherical).
- Returns:
v – Lattice velocity, shape (nz,)
- Return type:
1D array