\$\$************************************************************************************************** ************************************** GENERAL INFORMATION ***************************************** **************************************************************************************************** Script for calculating a phase diagram in a binary system according to Tutorial 8. The following contents will be covered: - Calculating phase boundaries - Building up the phase diagram from the calculated boundaries - Choosing appropriate calculation parameters - Phase diagrams using stable and metastable equilibria A phase diagram consists of a number of phase-boundaries separating regions of temperature- and composition-space in which different phases are stable at equilibrium. Published equilibrium diagrams for the Fe-C system often show equilibria between Fe-rich phases and both C (in the form of graphite) and cementite (Fe3C). Graphite is the more stable of these two phases, and forms readily in cast irons (2-4 wt.% C), but usually with great difficulty in steels (up to 1.5 wt.% C). In the latter, it is more practically useful to consider metastable equilibria involving Fe3C. In this tutorial, phase diagrams for both Fe-C and Fe-Fe3C will be calculated. Database: mc_fe.tdb Author: P. Warczok Creation date: 10.11.2008 This is a script for MatCalc version 6.00 (rel 0.200) Last update: 06.02.2017 (M. Lueckl, Update for version 6.00) **************************************************************************************************** ************************************** SETUP INFORMATION ******************************************* **************************************************************************************************\$\$ use-module core \$ Use "core" module (MatCalc uses "core" module by default anyway) new-workspace \$ creates a new workspace \$\$************************************************************************************************** **************************************** SYSTEM SETUP ********************************************** **************************************************************************************************\$\$ \$ verify correct MatCalc version (is accessible as internal variable) if (matcalc_version<5440008) send-dialog-string "MatCalc version must be 5.44.0008 or higher to run this script. Stopping." stop_run_script \$ stop script endif \$\$************************************************************************************************** DATABASES, CHEMICAL COMPOSITION, SELECTED PHASES **************************************************************************************************\$\$ if (matcalc_version<6000000) open-thermodyn-database mc_sample_fe2.tdb \$ Opens thermodynamic database mc_sample_fe.tdb else test-exist-td-database mc_fe.tdb if(test_result==1) open-thermodyn-database mc_fe.tdb \$ Opens thermodynamic database mc_fe.tdb else send-dialog-string ""mc_fe.tdb"-database not found. Please, download it from MatCalc Website" endif endif select-elements FE C VA \$ Components: Fe, C select-phases LIQUID FCC_A1 BCC_A2 CEMENTITE GRAPHITE \$ Phaseselection read-thermodyn-database set-reference-element FE enter-composition WP C=0,05 \$ Composition: 0.05 wt.% C set-temperature-celsius 1000 \$ Temperature 1000C set-automatic-startvalues calculate-equilibrium \$ Initial equilibrium new-gui-window p1 \$ Plot of the phase diagram \$ Suspend graphite phase - a [f]lag for the [s]uspended status is [s]et change-phase-status graphite F S S \$\$************************************************************************************************** FE-FE3C PHASE DIAGRAM **************************************************************************************************\$\$ \$-------------------------------- Upper boundary of delta-ferrite ---------------------------------\$ set-temperature-celsius 1530 \$ Temperature 1530C calculate-equilibrium search-phase-boundary T BCC_A2 \$ Varying temperature for the phase boundary search set-step-option Y P \$ "Phase boundary" type set-step-option P BCC_A2 \$ Phase boundary of bcc phase field set-step-option E C \$ Carbon content varied set-step-option R 0 5 L 0.01 \$ Range 0 - 5; linear step of 0,01 set-step-option O E Y \$ Composition in wt.% set-step-option O C Y \$ Temperature in Celsius set-step-option X 20 \$ Setting the ma(x). T-step to 20 step-equilibrium set-plot-option . S N B T\$C %s \$ Plotting the phase boundary \$ In the [g]ridlines section, the option of showing [m]ajor grids for [x]-axis is switched to [y]es set-plot-option . G M X Y \$ In the [g]ridlines section, the option of showing [m]ajor grids for [y]-axis is switched to [y]es set-plot-option . G M Y Y \$ In the active[.] GUI-window, all unlocked series will be duplicated and [l]ocked set-gui-window-property . L \$ Renaming series: "*_T\$C" --> "bcc_high_1" set-plot-option . S M -1 *_T\$C bcc_high_1 \$---------------------------------- Lower boundary of liquid --------------------------------------\$ set-temperature-celsius 1500 \$ Temperature 1500C calculate-equilibrium search-phase-boundary T LIQUID \$ Varying temperature for the phase boundary search set-step-option Y P \$ "Phase boundary" type set-step-option P LIQUID \$ Phase boundary of liquid phase field set-step-option E C \$ Carbon content varied set-step-option R 0 5 L 0.01 \$ Range 0 - 5; linear step of 0,01 set-step-option O E Y \$ Composition in wt.% set-step-option O C Y \$ Temperature in C set-step-option X 20 \$ Setting the ma(x). T-step to 20 step-equilibrium \$ In the active[.] GUI-window, all unlocked series will be duplicated and [l]ocked set-gui-window-property . L set-plot-option . S M -1 *_T\$C liquid \$ Renaming series: "*_T\$C" --> "liquid" \$------------------------------- Lower boundary of delta-ferrite ----------------------------------\$ set-temperature-celsius 1400 \$ Temperature 1400C calculate-equilibrium search-phase-boundary T BCC_A2 \$ Varying temperature for the phase boundary search set-step-option Y P \$ "Phase boundary" type set-step-option P BCC_A2 \$ Phase boundary of bcc phase field set-step-option E C \$ Carbon content varied set-step-option R 0 5 L 0.01 \$ Range 0 - 5; linear step of 0,01 set-step-option O E Y \$ Composition in wt.% set-step-option O C Y \$ Temperature in Celsius set-step-option X 20 \$ Setting the ma(x). T-step to 20 step-equilibrium set-gui-window-property . L \$ Locking all unlocked series set-plot-option . S M -1 *_T\$C bcc_high_2 \$ Renaming series: "*_T\$C" --> "bcc_high_2" \$---------------------------------- Upper boundary of austenite -----------------------------------\$ set-temperature-celsius 1500 \$ Temperature 1500C calculate-equilibrium search-phase-boundary T FCC_A1 \$ Varying temperature for the phase boundary search set-step-option Y P \$ "Phase boundary" type set-step-option P FCC_A1 \$ Phase boundary of fcc phase field set-step-option E C \$ Carbon content varied set-step-option R 0 5 L 0.01 \$ Range 0 - 5; linear step of 0,01 set-step-option O E Y \$ Composition in wt.% set-step-option O C Y \$ Temperature in Celsius set-step-option X 20 \$ Setting the ma(x). T-step to 20 step-equilibrium set-gui-window-property . L \$ Locking all unlocked series set-plot-option . S M -1 *_T\$C fcc_1 \$ Renaming series: "*_T\$C" --> "fcc_1" \$-------------------------------- Upper boundary of alpha-ferrite ---------------------------------\$ set-temperature-celsius 900 \$ Temperature 900C calculate-equilibrium search-phase-boundary T BCC_A2 \$ Varying temperature for the phase boundary search set-step-option Y P \$ "Phase boundary" type set-step-option P BCC_A2 \$ Phase boundary of bcc phase field set-step-option E C \$ Carbon content varied set-step-option R 0 5 L 0.01 \$ Range 0 - 5; linear step of 0,01 set-step-option O E Y \$ Composition in wt.% set-step-option O C Y \$ Temperature in Celsius set-step-option X 20 \$ Setting the ma(x). T-step to 20 step-equilibrium set-gui-window-property . L \$ Locking all unlocked series set-plot-option . S M -1 *_T\$C bcc_low \$ Renaming series: "*_T\$C" --> "bcc_low" \$--------------------------------- Lower boundary of austenite ------------------------------------\$ set-temperature-celsius 600 \$ Temperature 600C calculate-equilibrium search-phase-boundary T FCC_A1 \$ Varying temperature for the phase boundary search set-step-option Y P \$ "Phase boundary" type set-step-option P FCC_A1 \$ Phase boundary of fcc phase field set-step-option E C \$ Carbon content varied set-step-option R 0 5 L 0.001 \$ Range 0 - 5; linear step of 0,001 set-step-option O E Y \$ Composition in wt.% set-step-option O C Y \$ Temperature in Celsius set-step-option X 20 \$ Setting the ma(x). T-step to 20 step-equilibrium set-gui-window-property . L \$ Locking all unlocked series set-plot-option . S M -1 *_T\$C fcc_2 \$ Renaming series: "*_T\$C" --> "fcc_2" \$-------------------------------- Cementite upper phase boundary ----------------------------------\$ set-temperature-celsius 800 \$ Temperature 800C calculate-equilibrium search-phase-boundary T CEMENTITE \$ Varying temperature for the phase boundary search set-step-option Y P \$ "Phase boundary" type set-step-option P CEMENTITE \$ Phase boundary of cementite phase field set-step-option E C \$ Carbon content varied set-step-option R 0 5 L 0.01 \$ Range 0 - 5; linear step of 0,01 set-step-option O E Y \$ Composition in wt.% set-step-option O C Y \$ Temperature in Celsius set-step-option X 200 \$ Setting the ma(x). T-step to 200 step-equilibrium \$ For current plot [.], [s]eries section, [l]ock is performed by name [-1] on "T\$C" ([y]es) set-plot-option . S L -1 T\$C Y set-plot-option . S M -1 *_T\$C cementite \$ Renaming series: "*_T\$C" --> "cementite" \$------------------------------------- The finished diagram ---------------------------------------\$ \$ Plot title. "" and "" are used to mark the text which should be written as a subscript set-plot-option 1 T Fe-Fe3C phase diagram set-plot-option 1 A X 1 T Carbon content [wt.%] \$ x-axis title set-plot-option 1 A Y 1 T Temperature [C] \$ y-axis title \$ In the [a]xis section, the [y]-axis no.[1] has [s]caling starting from 400 set-plot-option 1 A Y 1 S 400.. set-plot-option 1 L B \$ Legend on the bottom \$\$************************************************************************************************** FE-C PHASE DIAGRAM **************************************************************************************************\$\$ \$ Activating graphite phase - a [f]lag for the [s]uspended status is [c]leared change-phase-status graphite F S C set-temperature-celsius 1600 \$ Temperature 1600C calculate-equilibrium create-new-plot X . \$ Fe-C phase diagram will be drawn on the new plot set-plot-option . G M X Y \$ Switching on the major gridlines for x-axis set-plot-option . G M Y Y \$ Switching on the major gridlines for y-axis \$------------------------------- Upper boundary of delta-ferrite ----------------------------------\$ search-phase-boundary T BCC_A2 \$ Varying temperature for the phase boundary search set-step-option Y P \$ "Phase boundary" type set-step-option P BCC_A2 \$ Phase boundary of bcc phase field set-step-option E C \$ Carbon content varied set-step-option R 0 5 L 0.01 \$ Range 0 - 5; linear step of 0,01 set-step-option O E Y \$ Composition in wt.% set-step-option O C Y \$ Temperature in Celsius set-step-option X 20 \$ Setting the ma(x). T-step to 20 step-equilibrium set-plot-option . S N B T\$C %s \$ Drawing the phase boundary in the new plot set-gui-window-property . L \$ Locking all unlocked series set-plot-option . S M -1 *_T\$C bcc_high_1 \$ Renaming series: "*_T\$C" --> "bcc_high_1" \$----------------------------------- Lower boundary of liquid -------------------------------------\$ set-temperature-celsius 1500 \$ Temperature 1500C calculate-equilibrium search-phase-boundary T LIQUID \$ Varying temperature for the phase boundary search set-step-option Y P \$ "Phase boundary" type set-step-option P LIQUID \$ Phase boundary of liquid phase field set-step-option E C \$ Carbon content varied set-step-option R 0 5 L 0.01 \$ Range 0 - 5; linear step of 0,01 set-step-option O E Y \$ Composition in wt.% set-step-option O C Y \$ Temperature in Celsius set-step-option X 20 \$ Setting the ma(x). T-step to 20 step-equilibrium set-gui-window-property . L \$ Locking all unlocked series set-plot-option . S M -1 *_T\$C liquid \$ Renaming series: "*_T\$C" --> "liquid" \$-------------------------------- Lower boundary of delta-ferrite ---------------------------------\$ set-temperature-celsius 1400 \$ Temperature 1400C calculate-equilibrium search-phase-boundary T BCC_A2 \$ Varying temperature for the phase boundary search set-step-option Y P \$ "Phase boundary" type set-step-option P BCC_A2 \$ Phase boundary of bcc phase field set-step-option E C \$ Carbon content varied set-step-option R 0 5 L 0.01 \$ Range 0 - 5; linear step of 0,01 set-step-option O E Y \$ Composition in wt.% set-step-option O C Y \$ Temperature in Celsius set-step-option X 20 \$ Setting the ma(x). T-step to 20 step-equilibrium set-gui-window-property . L \$ Locking all unlocked series set-plot-option . S M -1 *_T\$C bcc_high_2 \$ Renaming series: "*_T\$C" --> "bcc_high_2" \$---------------------------------- Upper boundary of austenite -----------------------------------\$ set-temperature-celsius 1500 \$ Temperature 1500C calculate-equilibrium search-phase-boundary T FCC_A1 \$ Varying temperature for the phase boundary search set-step-option Y P \$ "Phase boundary" type set-step-option P FCC_A1 \$ Phase boundary of fcc phase field set-step-option E C \$ Carbon content varied set-step-option R 0 5 L 0.01 \$ Range 0 - 5; linear step of 0,01 set-step-option O E Y \$ Composition in wt.% set-step-option O C Y \$ Temperature in Celsius set-step-option X 20 \$ Setting the ma(x). T-step to 20 step-equilibrium set-gui-window-property . L \$ Locking all unlocked series set-plot-option . S M -1 *_T\$C fcc_1 \$ Renaming series: "*_T\$C" --> "fcc_1" \$-------------------------------- Upper boundary of alpha-ferrite ---------------------------------\$ set-temperature-celsius 900 \$ Temperature 900C calculate-equilibrium search-phase-boundary T BCC_A2 \$ Varying temperature for the phase boundary search set-step-option Y P \$ "Phase boundary" type set-step-option P BCC_A2 \$ Phase boundary of bcc phase field set-step-option E C \$ Carbon content varied set-step-option R 0 5 L 0.01 \$ Range 0 - 5; linear step of 0,01 set-step-option O E Y \$ Composition in wt.% set-step-option O C Y \$ Temperature in Celsius set-step-option X 20 \$ Setting the ma(x). T-step to 20 step-equilibrium set-gui-window-property . L \$ Locking all unlocked series set-plot-option . S M -1 *_T\$C bcc_low \$ Renaming series: "*_T\$C" --> "bcc_low" \$--------------------------------- Lower boundary of austenite ------------------------------------\$ set-temperature-celsius 700 \$ Temperature 700C calculate-equilibrium search-phase-boundary T FCC_A1 \$ Varying temperature for the phase boundary search set-step-option Y P \$ "Phase boundary" type set-step-option P FCC_A1 \$ Phase boundary of fcc phase field set-step-option E C \$ Carbon content varied set-step-option R 0 5 L 0.01 \$ Range 0 - 5; linear step of 0,01 set-step-option O E Y \$ Composition in wt.% set-step-option O C Y \$ Temperature in Celsius set-step-option X 200 \$ Setting the ma(x). T-step to 200 step-equilibrium set-gui-window-property . L \$ Locking all unlocked series set-plot-option . S M -1 *_T\$C fcc2 \$ Renaming series: "*_T\$C" --> "fcc2" \$-------------------------------- Graphite upper phase boundary -----------------------------------\$ set-temperature-celsius 800 \$ Temperature 800C calculate-equilibrium search-phase-boundary T GRAPHITE \$ Varying temperature for the phase boundary search set-step-option Y P \$ "Phase boundary" type set-step-option P GRAPHITE \$ Phase boundary of graphite phase field set-step-option E C \$ Carbon content varied set-step-option R 0 5 L 0.01 \$ Range 0 - 5; linear step of 0,01 set-step-option O E Y \$ Composition in wt.% set-step-option O C Y \$ Temperature in Celsius set-step-option X 20 \$ Setting the ma(x). T-step to 20 step-equilibrium set-plot-option . S L -1 T\$C Y \$ Locking the last series set-plot-option . S M -1 *_T\$C graphite \$ Renaming series: "*_T\$C" --> "graphite" \$------------------------------------- The finished diagram ---------------------------------------\$ set-plot-option . T Fe-C phase diagram \$ Plot title set-plot-option . A X 1 T Carbon content [wt.%] \$ x-axis title set-plot-option . A Y 1 T Temperature [C] \$ y-axis title \$ In the [a]xis section, the [y]-axis no.[1] has [s]caling starting from 400 set-plot-option . A Y 1 S 400.. set-plot-option . L B \$ Legend on the bottom \$\$************************************************************************************************** SAVING WORKSPACE **************************************************************************************************\$\$ save-workspace Tutorial_8