任务配置参数
本文档列出 TopMat 各任务类型在 POST /api/v2/task 接口中需要传入的 task_config 字段。engine、title、omp_threads、no_cache 等外层字段请参考任务接口。
单点平衡计算
Section titled “单点平衡计算”{ "task_type": "point_calculation", "tdb_code": "TOPDB-B-C-Si-Zr-Hf-La-Y-Ti-O.TOPDB", "task_path": "examples/framework_demo/result/point_calculation_1", "condition": { "components": ["HF", "C"], "activated_phases": ["LIQUID", "HCP_A3_HF"], "temperature": 300, "pressure": 101325, "compositions": { "HF": 0.7, "C": 0.3 }, "topthermo_outputs": ["T", "P", "phase_name", "x(*)", "G", "H", "S"] }}| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
task_type | string | 是 | 固定为 point_calculation。 |
tdb_code | string | 是 | 热力学数据库代码,可通过数据库接口发现。 |
task_path | string | 否 | 结果输出路径。 |
condition.components | string[] | 是 | 参与计算的组分列表。 |
condition.activated_phases | string[] | 否 | 允许参与平衡计算的相,空数组表示不限制。 |
condition.temperature | number | 是 | 计算温度(K)。 |
condition.pressure | number | 是 | 计算压力(Pa),必须大于 0。 |
condition.compositions | object | 是 | 各组分摩尔分数,如 { "HF": 0.7, "C": 0.3 }。 |
condition.topthermo_outputs | string[] | 否 | 需要输出的热力学量。 |
condition.outputs_list_template | string[] | 否 | 可选输出项的有序模板;自定义输出项应追加在模板末尾。 |
{ "task_type": "line_calculation", "tdb_code": "TOPDB-B-C-Si-Zr-Hf-La-Y-Ti-O.TOPDB", "task_path": "examples/framework_demo/result/line_calculation_1", "condition": { "components": ["HF", "C"], "compositions_start": { "HF": 0.8, "C": 0.2 }, "compositions_end": { "HF": 0.8, "C": 0.2 }, "temperature_start": 300, "temperature_end": 3000, "pressure": 101325, "points": 101, "activated_phases": [], "topthermo_outputs": ["T", "P", "phase_name", "x(*)", "G", "H", "S"] }}| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
task_type | string | 是 | 固定为 line_calculation。 |
tdb_code | string | 是 | 热力学数据库代码,可通过数据库接口发现。 |
condition.components | string[] | 是 | 参与计算的组分列表。 |
condition.compositions_start | object | 是 | 起始成分。 |
condition.compositions_end | object | 是 | 终止成分。 |
condition.temperature_start | number | 是 | 起始温度(K)。 |
condition.temperature_end | number | 是 | 终止温度(K)。 |
condition.pressure | number | 是 | 固定压力(Pa),必须大于 0。 |
condition.points | integer | 是 | 扫描点数,必须为正整数;存在变量范围变化时至少为 2。 |
condition.activated_phases | string[] | 否 | 允许参与计算的相。 |
condition.topthermo_outputs | string[] | 否 | 需要输出的热力学量。 |
condition.outputs_list_template | string[] | 否 | 可选输出项的有序模板;自定义输出项应追加在模板末尾。 |
二元相图计算
Section titled “二元相图计算”{ "task_type": "binary_equilibrium", "tdb_code": "TOPDB-B-C-Si-Zr-Hf-La-Y-Ti-O.TOPDB", "task_path": "examples/framework_demo/result/binary_equilibrium_1", "activated_elements": ["C", "HF"], "condition": { "components": ["C", "HF"], "compositions_start": { "C": 1.0, "HF": 0.0 }, "compositions_end": { "C": 0.0, "HF": 1.0 }, "temperature_start": 1000, "temperature_end": 6000, "pressure": 101325, "activated_phases": ["GAS", "LIQUID", "HCP_A3_HF", "DIAMOND_A4", "HFC", "BCC_A2", "GRAPHITE"] }}| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
task_type | string | 是 | 固定为 binary_equilibrium。 |
tdb_code | string | 是 | 热力学数据库代码,可通过数据库接口发现。 |
activated_elements | string[] | 否 | Web 控制台使用的激活元素列表,应与 condition.components 一致且包含 2 个元素。 |
order_disorder | object | 否 | 有序–无序相边界高级配置;省略时不覆盖计算核心的默认策略。 |
condition.components | string[] | 是 | 二元体系的两个组分。 |
condition.compositions_start | object | 是 | 起始成分。 |
condition.compositions_end | object | 是 | 终止成分。 |
condition.temperature_start | number | 是 | 起始温度(K)。 |
condition.temperature_end | number | 是 | 终止温度(K)。 |
condition.pressure | number | 是 | 固定压力(Pa),必须大于 0。 |
condition.activated_phases | string[] | 否 | 允许参与计算的相。 |
order_disorder 支持 enabled、trace_boundaries、stability_filter、plot_boundaries 等布尔开关;phase_scope 可为 order_disorder 或 all,trace_method 当前仅支持 branch_continuation。容差、采样点数、细化层数和绘图参数的精确类型与约束见 OpenAPI 规范中的 OrderDisorderConfig。
热力学性质计算
Section titled “热力学性质计算”{ "task_type": "thermodynamic_properties_next", "tdb_code": "TOPDB-B-C-Si-Zr-Hf-La-Y-Ti-O.TOPDB", "task_path": "examples/framework_demo/result/thermodynamic_properties_next_1", "condition": { "components": ["HF", "C"], "compositions_start": { "HF": 0.8, "C": 0.2 }, "compositions_end": { "HF": 0.8, "C": 0.2 }, "temperature_start": 300, "temperature_end": 3000, "pressure": 101325, "points": 101, "activated_phases": [], "topthermo_outputs": ["T", "P", "phase_name", "x(*)", "G", "H", "S", "Cp"] }}| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
task_type | string | 是 | 固定为 thermodynamic_properties_next。 |
tdb_code | string | 是 | 热力学数据库代码,可通过数据库接口发现。 |
condition.components | string[] | 是 | 参与计算的组分列表。 |
condition.compositions_start | object | 是 | 起始成分。 |
condition.compositions_end | object | 是 | 终止成分。 |
condition.temperature_start | number | 是 | 起始温度(K)。 |
condition.temperature_end | number | 是 | 终止温度(K)。 |
condition.pressure | number | 是 | 固定压力(Pa),必须大于 0。 |
condition.points | integer | 是 | 温度扫描点数,必须为正整数;存在变量范围变化时至少为 2。 |
condition.activated_phases | string[] | 否 | 允许参与计算的相。 |
condition.topthermo_outputs | string[] | 否 | 需要输出的热力学量,如 Cp、mu(*) 等。 |
condition.outputs_list_template | string[] | 否 | 可选输出项的有序模板;自定义输出项应追加在模板末尾。 |
Scheil 凝固模拟
Section titled “Scheil 凝固模拟”{ "task_type": "scheil_solidification", "tdb_code": "TOPDB-B-C-Si-Zr-Hf-La-Y-Ti-O.TOPDB", "task_path": "examples/framework_demo/result/scheil_solidification_1", "condition": { "components": ["SI", "ZR"], "compositions": { "ZR": 0.4, "SI": 0.6 }, "start_temperature": 4000.0, "temperature_step": 1.0, "pressure": 101325, "activated_phases": [], "inhibit_phases": [] }}| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
task_type | string | 是 | 固定为 scheil_solidification。 |
tdb_code | string | 是 | 热力学数据库代码,可通过数据库接口发现。 |
condition.components | string[] | 是 | 参与计算的组分列表。 |
condition.compositions | object | 是 | 合金初始成分。 |
condition.start_temperature | number | 是 | 凝固起始温度(K)。 |
condition.temperature_step | number | 是 | 温度步长(K)。 |
condition.pressure | number | 是 | 计算压力(Pa),必须大于 0。 |
condition.activated_phases | string[] | 否 | 允许参与计算的相。 |
condition.inhibit_phases | string[] | 否 | 强制抑制的相。 |
三维相图计算
Section titled “三维相图计算”{ "task_type": "binary_cpt_diagram", "tdb_code": "TOPDB-B-C-Si-Zr-Hf-La-Y-Ti-O.TOPDB", "task_path": "examples/framework_demo/result/3d_phase_diagram_1", "condition": { "components": ["HF", "C"], "activated_phases": [], "x_component": "C", "composition_start": 0, "composition_end": 1, "composition_step": 0.05, "temperature_start": 500, "temperature_end": 1000, "temperature_step": 50, "pressure_start": 1000000000, "pressure_end": 5000000000, "pressure_points": 5, "pressure_scale": "linear", "include_tielines": false, "tieline_stride": 5, "map_options": { "GLOBAL_MIN_PDENS": 100 } }, "ui_metadata": { "module": "three_dimensional_phase_diagram", "axis_config": { "x": { "variable": "composition", "component": "C" }, "y": { "variable": "pressure" }, "z": { "variable": "temperature" } }, "backend_task_type": "binary_cpt_diagram" }}| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
task_type | string | 是 | 固定为 binary_cpt_diagram(Web 控制台「三维相图计算」的后端任务类型)。 |
tdb_code | string | 是 | 热力学数据库代码,可通过数据库接口发现。 |
condition.components | string[] | 是 | 参与计算的二元组分列表,当前版本必须且只能填 2 个元素。 |
condition.activated_phases | string[] | 否 | 允许参与计算的相。 |
condition.x_component | string | 是 | 组分轴对应的组元。 |
condition.composition_start | number | 是 | 组分扫描起始值(0–1)。 |
condition.composition_end | number | 是 | 组分扫描结束值(0–1),必须大于起始值。 |
condition.composition_step | number | 是 | 组分扫描步长。 |
condition.temperature_start | number | 是 | 温度扫描起始值(K)。 |
condition.temperature_end | number | 是 | 温度扫描结束值(K),必须大于起始值。 |
condition.temperature_step | number | 是 | 温度扫描步长(K)。 |
condition.pressure_start | number | 是 | 压力扫描起始值(Pa)。 |
condition.pressure_end | number | 是 | 压力扫描结束值(Pa),必须大于起始值。 |
condition.pressure_points | number | 是 | 压力扫描点数,整数且 ≥ 2。 |
condition.pressure_scale | string | 是 | 压力生成方式,linear 或 log。 |
condition.include_tielines | boolean | 否 | 是否包含结线。 |
condition.tieline_stride | number | 否 | 结线采样间隔。 |
condition.map_options.GLOBAL_MIN_PDENS | number | 否 | 全局最小点密度。 |
ui_metadata.axis_config | object | 否 | 三维显示轴映射,x / y / z 分别对应 composition / temperature / pressure 之一,其中 composition 必须指定 component。 |
相场模拟(开发中)
Section titled “相场模拟(开发中)”以下任务类型尚未开放,暂无稳定配置参数:
physical_vapor_depositioncutting_processspinodal_decompositionsolidificationsolution_treatmentagingdirectional_solidification