Phase diagram calculation program




















Please contact SysCAD to purchase their software and the add-in required for the integration. In the excel file you can perform your own calculations with the model. You will also see a number of calculation examples which have been calculated already. These are included in the gallery below:. Software for calculation of salt precipitation. Free demo program.

Download demo. Extended versions of the software. Pressure dependent solubility. Calculation of salt precipitation. Click to enlarge diagrams:. The approaches used in free software for the calculation of geochemical systems, GEMS [ 29 ] and MELTS [ 30 ], are not well suited for the calculation of metallic systems.

Other free software, such as Gibbs [ 31 ] or AMPL-based Gibbs energy minimization [ 32 ], are either limited to a simple regular solution-type model or have specialized in the mapping of phase diagrams. Although well suited for the calculation of alloy systems, the open source code used by Banerjee et al.

Open source code will make it possible to obtain a better integration between all methods used within the ICME framework, including automating the utilization of data from other methods, such as those from Density Functional Theory DFT. Open source software will also provide a tool for interested researchers to implement new thermodynamic models, test new algorithms, and extend the functionalities of the software. Open source codes are already available for DFT calculations [ 33 , 34 ], phase field simulations [ 35 , 36 ], and finite element analysis of the mechanical response of microstructures [ 37 ].

OC fills the gap that exists between the availability of open source codes for the atomic scale and the microscale. We present here the first version of a multicomponent open source thermodynamic code distributed under a GNU license, the OpenCalphad OC software. This software provides the basic functionalities for the calculation of phase equilibria, phase diagrams, and thermophysical quantities such as chemical potentials, entropies, etc.

OC is written in Fortran standard with extensive use of the data structuring facilities provided by this standard. As a result, OC can be used on any system for which these compilers are available. The data needed from the CALPHAD calculations by application programs are usually phase amounts and compositions, chemical potentials, enthalpies, driving forces, or phase boundary slopes.

The application software must be able to set the external conditions for the calculations in a very flexible manner. Transfer of the calculated thermodynamic results to the application software can be made by creating lookup tables for the application software or by direct coupling.

The advantage of lookup tables is that their use is frequently faster than direct coupling. However, since lookup tables are generated prior to the execution of the application software, this advantage may come at the expense of accuracy as the conditions during the course of the calculations by the application software may deviate from the original conditions used for the creation of the lookup table.

The programming interfaces of commercial software are black boxes with limited flexibility with respect to hardware and software demands and prescribe which calculations can be performed and which values can be obtained. For the implementation of OC with other application software, it is possible to call the routines of OC directly. Data structure and routines of the General Thermodynamic Package GTP are documented in detail, and the documentation is provided together with the source code.

Although the direct implementation of the OC routines may be advantageous for reducing execution time of the application software, it can be time consuming to program and debug as special care needs to be taken when directly implementing the routines. The availability of a software interface overcomes this problem.

Such a software interface can be a custom-designed interface as was used for the casting simulations by Banerjee at al. A software interface should consist of a simple set of routines that can select a material from a database; set the external conditions on T , P , and composition; calculate the set of stable phases; and provide the needed property data to the application software.

An established software interface for thermodynamic software called the TQ interface [ 38 , 39 ], originally developed for FactSage [ 15 ] and Thermo-Calc [ 19 ], has been implemented in OC. This interface provides functions to set the values of external conditions such as T , P , and composition as well as to prescribe the set of stable phases, volume, heat content, etc.

The TQ interface can be used to calculate local equilibria , such as ongoing transformations during a phase field simulation, and can thus provide important information on thermodynamic and kinetic driving forces. The TQ interface is an open definition and can be extended to also provide other properties such as mobilities and elastic constants that are needed for the simulation of a phase transition.

Such properties often depend on T as well as the phases and their constitutions and can be modeled in a way similar to the thermodynamic properties and stored in databases together with such data.

For example, the FEM code used for a casting simulation [ 25 ] used two routines, Lever and Slopes , from a custom interface for an older open source code. These two routines can be replaced by a sequence of routines from the OC-TQ interface, as shown in Table 1. Xiong et al. A thermodynamic system consists of elements that can form many different molecules or ions, here called species. The elements are neutral monatomic species. The species are the constituents of the phases, and it is important to distinguish between the constituents of a phase and the components , the latter are usually the same as the elements.

The number of constituents can be larger than the number of components; for example, the number of species in the gas phase is frequently larger than the number of elements. For the calculation of phase equilibria, it is important that the controlling conditions of the system can be specified in a general way.

The most simple conditions for minimizing the Gibbs energy are fixed amounts of components, T , and P , but it must be possible to set chemical potentials, values of enthalpy, volume, etc. Based on single equilibrium calculations, it must also be possible to generate property diagrams and phase diagrams for varying conditions.

The optimal model parameters are determined from experimental and theoretical data in an assessment procedure. All thermodynamic parameters are stored in OC relative to the phases and depend on the model selected for the phase. These parameters can be read from a file database containing the phase descriptions. There can be many different kinds of models, from a simple stoichiometric model with no variation in composition to multisublattice models for complex crystalline phases and liquids with a short range order to a gas phase with more than species.

This formalism describes the gas phase, regular solutions, intermetallics, and ordered phases and liquids with a short range order. The phase superscript is omitted in the following equations unless several phases are involved. The interaction parameters may depend on T , P , and the constitution.

More details about the CEF and other models can be found in Lukas et al. An efficient and flexible data structure [ 44 ] has been implemented in OC to store composition dependencies in the program memory as binary trees as shown in Figure 1. Each binary tree is independent, and this allows parallel processing which can speed up calculations. This modular data structure is extremely useful for the implementation of new models as new trees can be easily added to the code.

Parameter structure. Example of the linked structure for storing the parameters describing the composition dependence of the Gibbs energy, or any other property, for a phase modeled as A,D B,C. This approach was chosen to simplify the calculation of several equilibria in parallel, each with its own equilibrium record, for example, for calculating separate lines in a phase diagram or assessing model parameters using many experimental points.

The ability for parallel execution of the calculations is especially important for the coupling with other codes, such as phase field, fluid flow, or FEM. Data structures. The static data structure a contains all data that do not depend on the current set of conditions. In the dynamic data structure b , each equilibrium record has a separate set of conditions and for all phases the current set of constitutions and the last calculated results. The total Gibbs energy of the system must be minimized to find the equilibrium at a fixed temperature, pressure, and composition.

At the start, neither the set of stable phases nor its constitution is known. The total Gibbs energy is related to the molar Gibbs energy for the current set of stable phases as. The algorithm for minimization implemented in OC was proposed by Hillert [ 45 ], and the first implementation was made by Jansson [ 46 ]. External conditions and internal constraints are taken into account using Lagrange multipliers. The Lagrange multipliers are also used to replace the Gibbs energy with the appropriate function considering external conditions on the volume, chemical potentials, or prescribed stable phases.

An example for the Lagrange function, L , for conditions of constant composition and fixed T and P is. By differentiating the Lagrange function with respect to the different variables many relations can be derived.

Following Hillert [ 45 ], the first step in solving this equation is to invert the matrix of the second derivatives of the Gibbs energy with respect to the constituent fractions:. These matrix elements are used in several equations in the second step of the algorithm. All partial derivatives are calculated analytically in OC. There is one equation for each stable phase:. For each condition on an extensive variable, we obtain an equation which in a simple case where N A is fixed is.

The new values of the chemical potentials allow the updating of the phase constitutions using Equation 9. Equation 12 requires that the constitution of the metastable phases be updated using Equation 9 at each iteration. When the changes in chemical potentials and phase amounts are sufficiently small and all external conditions are fulfilled, the calculation has converged; otherwise, the calculation is repeated beginning with the first step.

This is more efficient if the set of stable phases does not change between the iterations, but each time such a change occurs, the matrix of linear equations must be reconstructed.

The two-step method does not require such reconstruction. Calculations using the same models and parameters and the same external conditions with different software will give the same results if the criteria for convergence are similar.

Rounding errors are the likely cause for differences in the sixth or seventh significant digit of the results. The algorithm described above is an iterative method which depends strongly on the initial configuration of the phases. In Figure 3 , the Gibbs energy curves for two phases are shown. If the start constitutions of the two phases are as marked in Figure 3 b, an iterative algorithm will find the common tangent shown in Figure 3 c.

This is a metastable equilibrium because it lies above the most stable common tangent as shown in Figure 3 d. Iterative minimization. The iterative minimizer for the Gibbs energy curves in a with the start constitutions given in b will find the metastable equilibrium in c. The global minimum is given in d. To avoid the problem of not finding the global equilibrium for the given conditions, Chen et al.

Subsequently, similar approaches were implemented into other software such as Thermo-Calc [ 19 ] or CaTCalc [ 14 ]. The OC software has as an initial step a grid minimizer which calculates the Gibbs energy of all phases over a grid of compositions as shown in Figure 4 a.

These grid points are treated as stoichiometric phases, illustrated in Figure 4 b. In a preliminary minimization, the set of grid points representing the minimum as shown in Figure 4 c is determined.

The grid points from the grid minimizer are then used as an initial guess, and their compositions are inserted as the start constitutions for the iterative algorithm which will find the global minimum in Figure 4 d. Even in multicomponent systems, only a few 1, grid points are needed for each phase.

Grid minimization. Sodium hydroxide — phosphoric acid — water. Many solid phases appear in this phase diagram. The phase diagram includes all compositions from the acidic region to the basic region. Ammonia-phosphoric acid-water. Sodium chloride — potassium sulfate — water. Further details can be seen under quaternary diagrams. Calcium chloride — potassium chloride — sodium chloride — water. All compositions are in mass percent. Magnesium hydroxide — phosphoric acid — water.

Only the acidic region of the phase diagram is shown. At high fractional content of magnesium hydroxide, the solubility in this system is extremely low. Lithium hydroxide — boric acid — water. Going from the acidic side to the basic side, the solid phases are boric acid, lithium pentaborate pentahydrate, lithium tetraborate trihydrate, lithium metaborate dihydrate, and lithium hydroxide monohydrate.

Aluminum sulfate — potassium sulfate — water. The low solubility og potassium alum dominates this phase diagram. Ammonia — carbon dioxide — water. More details about this system can be found under ternary systems.



0コメント

  • 1000 / 1000