Package “base”¶
- class +tc_toolbox.+process_metallurgy.+base.AbstractAddition¶
The base class for representing an addition to an equilibrium calculation or process simulation.
- get_composition()¶
Returns the composition of the addition - without containing a dependent component.
- Returns:
The composition [in the unit provided by
getCompositionUnit()
]
- get_composition_unit()¶
Returns the composition unit used in this addition.
- Returns:
The composition unit
- get_dependent_component()¶
Returns the dependent component.
- Returns:
The dependent component or an empty string if no dependent component is defined
- get_elements()¶
Returns all elements of the addition.
- Returns:
The elements
- get_id()¶
Returns the unique ID of the addition.
- Returns:
The unique ID of the addition
- get_temperature()¶
Returns the temperature of the addition. This refers to the temperature before it is added to the process.
- Returns:
The temperature [K]
- is_do_scale()¶
Returns if the composition of the addition is being scaled to 100% / 1 or not.
- Returns:
If the composition is scaled
- is_empty()¶
Returns if the addition is “empty”, i.e., has zero amount.
- Returns:
If the addition is empty
- class +tc_toolbox.+process_metallurgy.+base.ActivityReference¶
The reference for a slag activity calculation. The actual reference phase depends on the component for which the activity is request and can be obtained by using these methods on the result object:
+tc_toolbox.process_metallurgy.process.ProcessSimulationResult.get_formula_for_activity_of_slag()
or+tc_toolbox.process_metallurgy.equilibrium.EquilibriumResult.get_formula_for_activity_of_slag()
.
- class +tc_toolbox.+process_metallurgy.+base.PhaseGroup¶
The phase group, such a group is collecting all phases that belong to a certain type.
- class +tc_toolbox.+process_metallurgy.+base.ProcessDatabase¶
The database used for a Process Metallurgy calculation.
- class +tc_toolbox.+process_metallurgy.+base.ProcessMetallurgyOptions¶
The options for a process metallurgy calculation.
- ProcessMetallurgyOptions()¶
The options for a process metallurgy calculation. Constructs an instance of
ProcessMetallurgyOptions
.
- disable_approximate_driving_force_for_metastable_phases()¶
Disables the approximation of the driving force for metastable phases.
Default: Enabled
Note
When enabled, the metastable phases are included in all iterations. However, these may not have reached their most favorable composition and thus their driving forces may be only approximate.
- Returns:
This
ProcessMetallurgyOptions
object
- disable_control_step_size_during_minimization()¶
Disables step size control during minimization (non-global).
Default: Enabled
- Returns:
This
ProcessMetallurgyOptions
object
- disable_force_positive_definite_phase_hessian()¶
Disables forcing of positive definite phase Hessian. This determines how the minimum of an equilibrium state in a normal minimization procedure (non-global) is reached. For details, search the Thermo-Calc documentation for “Hessian minimization”.
Default: Enabled
- Returns:
This
ProcessMetallurgyOptions
object
- enable_approximate_driving_force_for_metastable_phases()¶
Enables the approximation of the driving force for metastable phases.
Default: Enabled
Note
When enabled, the metastable phases are included in all iterations. However, these may not have reached their most favorable composition and thus their driving forces may be only approximate.
- Returns:
This
ProcessMetallurgyOptions
object
- enable_control_step_size_during_minimization()¶
Enables step size control during normal minimization (non-global).
Default: Enabled
- Returns:
This
ProcessMetallurgyOptions
object
- enable_force_positive_definite_phase_hessian()¶
Enables forcing of positive definite phase Hessian. This determines how the minimum of an equilibrium state in a normal minimization procedure (non-global) is reached. For details, search the Thermo-Calc documentation for “Hessian minimization”.
Default: Enabled
- Returns:
This
ProcessMetallurgyOptions
object
- set_global_minimization_max_grid_points(max_grid_points)¶
Sets the maximum number of grid points in global minimization. Only applicable if global minimization is actually used.
Default: 2000 points
- Parameters:
max_grid_points – The maximum number of grid points
- Returns:
This
ProcessMetallurgyOptions
object
- set_max_no_of_iterations(max_no_of_iterations)¶
Sets the maximum number of iterations for the CALPHAD minimizer.
Default: max. 2000 iterations
Note
As some models give computation times of more than 1 CPU second/iteration, this number is also used to check the CPU time and the calculation stops if 500 CPU seconds/iterations are used.
- Parameters:
max_no_of_iterations – The max. number of iterations
- Returns:
This
ProcessMetallurgyOptions
object
- set_process_minimization_policy(minimization_policy)¶
Sets the minimization policy for the process metallurgy calculation. It is possible to choose policies that try different methods if one method fails.
- Parameters:
minimization_policy – The minimization policy to be used
- Returns:
This
ProcessMetallurgyOptions
object
- set_required_accuracy(accuracy)¶
Sets the required relative accuracy.
Default: 1.0E-6
Note
This is a relative accuracy, and the program requires that the relative difference in each variable must be lower than this value before it has converged. A larger value normally means fewer iterations but less accurate solutions. The value should be at least one order of magnitude larger than the machine precision.
- Parameters:
accuracy – The required relative accuracy
- Returns:
This
ProcessMetallurgyOptions
object
- set_smallest_fraction(smallest_fraction)¶
Sets the smallest fraction for constituents that are unstable.
It is normally only in the gas phase that you can find such low fractions.
The default value for the smallest site-fractions is 1E-16 for all phases except for IDEAL phase with one sublattice site (such as the GAS mixture phase in many databases) for which the default value is always as 1E-30.
- Parameters:
smallest_fraction – The smallest fraction for constituents that are unstable
- Returns:
This
ProcessMetallurgyOptions
object
- class +tc_toolbox.+process_metallurgy.+base.ProcessMinimizationPolicy¶
The policy for the CALPHAD minimization routine used in a calculation.
Note
This affects the runtime and stability of a calculation. Global minimization is more stable but more time-consuming. Local minimization is much faster but can miss new phases coming up. Global test is a compromise between both approaches.
- class +tc_toolbox.+process_metallurgy.+base.SlagProperty¶
The slag property, different definitions are available. The actual definition of a certain slag property for the current system can be obtained using these methods on the result object:
+tc_toolbox.process_metallurgy.process.ProcessSimulationResult.getFormulaForSlagProperty()
or+tc_toolbox.process_metallurgy.equilibrium.EquilibriumResult.getFormulaForSlagProperty()
.Note
If not all components required by the definition of slag property are available in a given system, the slag property will return NaN.
- class +tc_toolbox.+process_metallurgy.+base.SlagType¶
The type of slag considered for a slag property calculation.