Pandat软件培训资料

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

CompuTherm Training Class
Shanghai, China
November 15, 2007
CompuTherm, LLC
Madison, WI 53179, USA
Copyright © 2007 CompuTherm LLC
CompuTherm Training Class, 2007
CompuTherm Training Class, 2007
1
1.1 Optimization
This material is intended for training users on how to use PanOptimizer with Al-Zn as an example. Understanding optimization process itself is more complicated and requires extensive experience.
Users should follow the seven steps below to perform the model parameter optimization using PanOptimizer. Here we use Al-Zn binary as an example.
9 Step 1: Load Thermodynamic Database File
Load thermodynamic database AlZn_0.TDB file into Pandat workspace. This database file contains the phases to be modeled. The database file definition is consistent with the current accepted format in the CALPHAD society.
9 Step 2: Define Model Parameters
PanOptimizer asks user to define the optimization parameters in the TDB file. Each model parameter is defined by the keyword “OPTIMIZATION ”. The format of defining a model parameter is:
Optimization [name of model parameter][low bound][initial value][high bound] N !
For example:
// Keyword Name Low Bound Init. Value High Bound Optimization LIQ_AA 0 0; 60000 N ! Optimization LIQ_AAT -20 0; 20 N !
Phase LIQUID % 1 1 !
Constituent LIQUID : AL, ZN : !
Parameter G(LIQUID, AL; 0) 298.15 G_Al_LIQUID; 6000 N ! Parameter G(LIQUID, ZN; 0) 298.15 G_Zn_LIQUID; 6000 N ! Parameter G(LIQUID, AL, ZN; 0) 298.15 LIQ_AA + LIQ_AAT*T; 6000 N !
9 Step 3: Prepare Experimental File
The most widely accepted format for experimental data file in the CALPHAD society is a POP file. PanOptimizer accepts most of the keywords in the POP format and adds a few special keywords. Typical format of a POP file to define a tie line looks like:
CREATE_NEW_EQUILIBRIUM 1,1 CHANGE_STATUS PHASE * = S
CHANGE_STATUS PHASE LIQUID, FCC_A1 = FIX 1 SET_CONDITION P = P0, T = 656
EXPERIMENT X(LIQUID, AL)= 0.33 : DX1, EXPERIMENT X(FCC_A1, AL)= 0.11 : DX1,
CompuTherm Training Class, 2007 2
9 Step 4: Load and Compile Experimental File
Through the function Load Experimental File , AlZn_Sample.pop file can be loaded into the Pandat workspace and compiled with the database file loaded in step 1.
9 Step 5: Optimization
Model parameter optimization is controlled through the optimization control panel as shown below. There are four control areas in the optimization control panel. They are: Histogram (A), Bound/Unbound Variables (B), Optimization (C), and Optimization Results (D). Histogram (A)
Histogram is for displaying and tracing the history of the discrepancy between model-calculated values and experimental data. Free Bound/Unbound Variables (B)
The user can choose the model parameters to be optimized in either the bounded or the unbounded mode. In the bounded mode, the low and high
bounds defined in a TDB file will take into effects.
CompuTherm Training Class, 2007
3
Optimization (C)
The optimization process can be controlled by choosing 1 Iteration or Run . In this example, there are totally 11 parameters to be optimized and all the initial values are set to be zero. The available experimental data include the enthalpy of liquid phase at 953K, two invariant reactions at 655K: LIQUID -> FCC_A1 + HCP_A3 and at 550K: FCC_A1#2 -> FCC_A1#1 + HCP_A3 and tie-lines: FCC_A1#1 + FCC_A1#2, LIQUID + FCC_A1, LIQUID + HCP_A3 and HCP_A3 + FCC_A1 at different temperatures.
Before the optimization, user can check the calculated results using the initial model parameters without optimization. The parameters without optimization result in large discrepancies between the calculated values and the experimental measurements. Optimization of these model parameters (value zero) is needed.
A
B C D
CompuTherm Training Class, 2007
4
By clicking Run twice (two rounds), and each Run with 50 number of function calls, the sum of squares decreases from 904896 to 494.
After another two rounds of Run, the sum of squares decreases from 494 to 2.8. Now, we can do the real time calculation using the instantly obtained optimized parameters. The following two comparisons show excellent agreements between the calculated results and the measurement data.
CompuTherm Training Class, 2007
Optimization Results (D)
•During optimization, user can check model parameters through the Parameters button.
•For each model parameter, user can change its low bound, upper bound and initial value in the dialog window.
•It also allows user to Include or Exclude some model parameters for optimization using “Ctrl” or “Shift” to select those parameters.
•If a set of optimized parameters is satisfactory, user can save this set of values as default ones through Set As Default. Otherwise, user can reject this set of values and go back to previous default values through Reset Default.
5
CompuTherm Training Class, 2007 6
• User also can save the TDB file with the optimized model parameters through Save TDB .
• To track the change of each parameter during the past 100 iterations, user can click the parameter name in the table.

It should be noted that any changes on model parameters made by user will take into effect only after the “Apply” button is clicked.
Comparison with Experimental Data (D)
• Through Experimental Data , users can compare the calculated values and the experimental data for each equilibrium.
• The experimental information such as uncertainty and weight factor can be adjusted as needed during optimization procedure.

Through the column of “Residual ”, user can see different color after each comparison. The green means satisfactory results are achieved, while the red color means large deviation remaining.
• User can Include or Exclude the selected experimental data for the optimization as needed.
• More detailed phase equilibrium information can be accessed by clicking the equilibrium ID in the table.

The “Export Table
” function is used to export the table data to Excel.
CompuTherm Training Class, 2007
7
9 Step 6: Plot Diagram with Pptimized Parameters
During optimization, user can calculate phase equilibria or other properties at anytime using the instantly obtained optimized parameters, and plot the diagrams with experimental data. This provides a graphic presentation on the comparison between the calculated and experimental results. The parameters used for calculation are displayed in the Parameters window.
CompuTherm Training Class, 2007
8
9 Step 7: Save/Load Optimization Results
During optimization, the user may save and load optimization file through Save Optimization Results and Load Optimization Results . The optimization results file has the extension name of POR that can only be read by PanOptimizer. All settings of the optimization are stored and recovered through these two operations. Examples on the settings are: what model parameters used in the optimization, and their changes from previous step; what experimental data used in the optimization, and their weight and uncertainty; and comparisons between calculated results and experimental data.
1.2 Rough Search
“Rough Search ” is used to obtain a rough topology of a phase diagram based on the given experimental data. It might be useful for quickly guessing the initial values of the model parameters at the beginning stage of the
optimization procedure.
9Step 1: Load Thermodynamic Database File (same as
Section 1.1)
9Step 2: Define Model Parameters (same as Section 1.1)
9Step 3: Prepare Experimental File
Keyword CREATE_ROUGH_EQUILIBRIUM is used to define phase equilibrium for rough search. When create a rough equilibrium, the status of phases in equilibrium can only be FIXED. The keyword PHASE_POINT is used to define the calculation conditions. No experimental data are allowed to be optimized for multiple-phase equilibria. However, a special case is the single-phase equilibrium. The thermodynamic property data of the single-phase equilibrium can be used as experimental data to optimize the model parameters. Example is:
$ Tieline between HCP_A3 and FCC_A1 at 500K
$ 10 is the weight factor of this equilibrium
CREATE_ROUGH_EQUILIBRIUM @@, 1, 10
CHANGE_STATUS PHASE FCC_A1, HCP_A3 = FIX 1
PHASE_POINT P = P0, T = 500
PHASE_POINT X(FCC_A1, AL)= 0.92, X(HCP_A3, AL)= 0.01
For a phase described by a sublattice model, the initial value of an element or species in a sublattice should be specified using SET_START_VALUE.
9Step 4: Load and Compile Experimental File
Through the function Load Experimental File, AlZn_Sample_rough.pop file can be loaded into the Pandat workspace and compiled with the database file loaded in step 1. The “Rough Search” button in toolbar will be activated automatically if there are rough equilibria loaded into PanOptimizer.
9Step 5: Rough Search
Again, there are four control areas in the control panel for rough search as shown below (only Area C is marked since the other three areas are the same as the normal optimization control panel).
C
Rough Search (C)
There are two types of built-in optimization algorithms for Rough Search and they are Global Search and Local Search, as shown in area C.
•Global Search is to search a set of good initial values of the model parameters within the whole searching domain, the initial values defined in TDB file will be ignored.
•Local Search leads to a quick convergence to an optimal solution based on the given initial values of model parameters.
The user can set the maximum number of function calls for both algorithms.
For example, 1000 function evaluations of Global search lead to the sum of squares of 2.91. The figure below shows the calculated phase boundaries after a global search with 1000 function evaluations. It can be seen that the optimized parameters give a very similar topology with the known Al-Zn phase diagram. By clicking Local Search , the sum of squares decrease from 2.91 to 0.059, which reproduces the phase diagram in better agreement with the experimental one as you can see below.
Optimization Results (D)

Model parameters can be checked through Parameters .

Chemical potential differences between any two phases in equilibrium can be accessed by Experimental Data . They are reflected by the values in column “(Wtd. Residual)^2” as shown in the dialog window below.
• The weight factor of the equilibrium can be adjusted as needed during optimization procedure.
• Chemical potential values of each phase in equilibrium can be accessed by clicking the buttons in the first column.
• The “Export Table ” function is used to export the table data to Excel.
9Step 6: Go Back to Normal Optimization
Once the phase diagram topology is obtained, user can append the AlZn_sample.pop, and go through Steps 5-7 to obtain an optimal set of model parameters which can best fit phase diagram and thermodynamic properties.。

相关文档
最新文档