kawin Framework

The implementation of kawin is split into several modules to provide flexibility in its development.

Everything centers around the GenericModel object with which the diffusion and precipitate models are derived from. Models are defined by their input conditions and any additional constants (“properties”, $\boldsymbol{P}$) needed to compute the model. For example, in the precipitation model, we would need the interfacial energy between the precipitate phase and the parent matrix phase. In a diffusion model, the mesh can be viewed as a “property” which defined the number of cells and cell sizes to store composition. The GenericModel object interfaces with the Solver by providing the implementation for calculating the time derivatives in the model and getting the current state of the model ($\boldsymbol{y}$). An Iterator is also defined in the Solver to give what iterative scheme to use to solve the model. For example, in an explicit Euler scheme, the new state of the model $\boldsymbol{y}^{t+1}$ can be found by the following:

$$ y_i^{t+1} = y_i^t + \frac{\partial y_i}{\partial t}|_{t,\boldsymbol{y},\boldsymbol{P}} $$

General model setup

General model setup

Both the diffusion and precipitate models couples with pycalphad for Calphad-based thermodynamics and a GeneralThermodynamics object provides the implementations for driving force, interfacial composition and diffusivity. Most of the Calphad-type calculations are done in the Mobility (for kinetic modeling), Free Energy Hessian (thermodynamic factor and chemical potential gradients) and Local Equilibrium. GeneralThermodynamics is also split into BinaryThermodynamics and MultiComponentThermodynamics since the growth rate in the precipitation models are defined differently between binary and multicomponent systems.

Thermodynamics hierarchy

Thermodynamics hierarchy

There are two implementations in the diffusion model: single phase diffusion and homogenization. The single phase diffusion model considers a single phase with diffusion being modeled through Fick’s 2nd law. The homogenization model is capable of handling multiple phases where the phase fractions are determined by local equilibrium.

Diffusion model setup

Diffusion model setup

There is currently only one implementation of the precipitate model which is the Kampmann-Wagner numerical (KWN) model using Eulerian approach to model the particle size distribution using a population balance model. Regardless, the KWN model allows for multiple non-ideal contributions to be defined. By using the KWN model along with pre-defined stopping conditions, a time-temperature-precipitate diagram can also be made.

Precipitation model setup

Precipitation model setup