Package “equilibrium”

class +tc_toolbox.+process_metallurgy.+equilibrium.AbstractEquilibriumAddition

The base class for representing an addition to an equilibrium calculation.

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

set_amount(amount)

Change the amount of the addition.

Parameters:

amount – The new amount [in the amount unit of this addition]

Returns:

This AbstractEquilibriumAddition object

set_component_composition(component, content)

Change the composition of a component of the addition.

Parameters:
  • component – The component to be changed

  • content – The new content of the component [in the composition unit defined for this addition]

Returns:

This AbstractEquilibriumAddition object

class +tc_toolbox.+process_metallurgy.+equilibrium.AdiabaticEquilibriumCalculation(back)

An adiabatic Process Metallurgy equilibrium calculation. Such calculations can for example be used to determine the global equilibrium state of a process.

AdiabaticEquilibriumCalculation(back)

Call base constructor: tc_toolbox.process_metallurgy.equilibrium.EquilibriumCalculation.

add_addition(addition)

Adds an addition to the calculation.

Parameters:

addition – A EquilibriumAddition or EquilibriumGasAddition

Returns:

This AdiabaticEquilibriumCalculation object

add_poly_command(command)

Adds a Thermo-Calc Console syntax POLY module command which will be executed when performing the calculation using the calculate() method.

If multiple commands are added, they will be executed in the order of addition. Each command will only be executed one.

Note

It should not be necessary for most users to use this method, try to use the corresponding method implemented in the API instead.

Warning

As this method runs raw Thermo-Calc commands directly in the engine, it may hang the program in case of spelling mistakes (e.g. forgotten equals sign).

Parameters:

command – The POLY module command in Thermo-Calc console syntax

Returns:

This AdiabaticEquilibriumCalculation object

calculate(timeout_in_minutes)

Runs the Process Metallurgy equilibrium calculation.

Parameters:

timeout_in_minutes – The calculation will be aborted after that time, default: no timeout

Returns:

A new EquilibriumResult object

remove_addition(addition)

Removes an addition from the calculation.

Parameters:

addition – The addition to be removed

Returns:

This AdiabaticEquilibriumCalculation object

remove_all_additions()

Removes all additions from the calculation.

Returns:

This AdiabaticEquilibriumCalculation object

set_pressure(pressure)

Sets the pressure.

Parameters:

pressure – The pressure [Pa]

Returns:

This AdiabaticEquilibriumCalculation object

update_addition(addition)

Replaces an already added addition with an updated one. This is usually used to change the composition or amount of an addition while iterating over them. Typically, this is done for stepping or mapping calculations.

Note

The calculation must already contain the addition object to be updated.

Parameters:

addition – The new addition containing updated values

Returns:

This IsoThermalMetallurgyCalculation object

with_options(options)

Sets the options for the calculation.

Parameters:

options – The options

Returns:

This AdiabaticEquilibriumCalculation object

class +tc_toolbox.+process_metallurgy.+equilibrium.EquilibriumAddition(composition, amount, temperature, composition_unit, do_scale)

An addition to an equilibrium calculation.

Tip

By setting do_scale=True, the composition will be scaled to 100% / fraction of 1. This is useful if the composition provided is not summing to 100% / 1. An example could be a slag addition which is provided like this: 90 wt-% CaO - 5 wt-% Al2O3 - 4 wt-% SiO2.

Parameters:
  • composition – The composition

  • amount – The amount [kg]

  • temperature – The initial addition temperature (default: 20 °C) [K]

  • composition_unit – The composition unit

  • do_scale – If the composition is scaled to 100% / fraction of 1

EquilibriumAddition(composition, amount, temperature, composition_unit, do_scale)

An addition to an equilibrium calculation.

Tip

By setting do_scale=True, the composition will be scaled to 100% / fraction of 1. This is useful if the composition provided is not summing to 100% / 1. An example could be a slag addition which is provided like this: 90 wt-% CaO - 5 wt-% Al2O3 - 4 wt-% SiO2.

Parameters:
  • composition – The composition

  • amount – The amount [kg]

  • temperature – The initial addition temperature (default: 20 °C) [K]

  • composition_unit – The composition unit

  • do_scale – If the composition is scaled to 100% / fraction of 1

get_amount()

Returns the amount of this addition.

Returns:

The amount [kg]

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

set_amount(amount)

Change the amount of the addition.

Parameters:

amount – The new amount [in the amount unit of this addition]

Returns:

This AbstractEquilibriumAddition object

set_component_composition(component, content)

Change the composition of a component of the addition.

Parameters:
  • component – The component to be changed

  • content – The new content of the component [in the composition unit defined for this addition]

Returns:

This AbstractEquilibriumAddition object

class +tc_toolbox.+process_metallurgy.+equilibrium.EquilibriumCalculation(back)

A Process Metallurgy equilibrium calculation. Such calculations can for example be used to determine the global equilibrium state of a process.

EquilibriumCalculation(back)

Constructs an instance of EquilibriumCalculation.

add_addition(addition)

Adds an addition to the calculation.

Parameters:

addition – The addition

Returns:

This EquilibriumCalculation object

add_poly_command(command)

Adds a Thermo-Calc Console syntax POLY module command which will be executed when performing the calculation using the calculate() method.

If multiple commands are added, they will be executed in the order of addition. Each command will only be executed one.

Note

It should not be necessary for most users to use this method, try to use the corresponding method implemented in the API instead.

Warning

As this method runs raw Thermo-Calc commands directly in the engine, it may hang the program in case of spelling mistakes (e.g. forgotten equals sign).

Parameters:

command – The POLY module command in Thermo-Calc console syntax

Returns:

This EquilibriumCalculation object

calculate(timeout_in_minutes)

Runs the Process Metallurgy equilibrium calculation.

Parameters:

timeout_in_minutes – The calculation will be aborted after that time, default: no timeout

Returns:

A new EquilibriumResult object

remove_addition(addition)

Removes an addition from the calculation.

Parameters:

addition – The addition to be removed

Returns:

This EquilibriumCalculation object

remove_all_additions()

Removes all additions from the calculation.

Returns:

This EquilibriumCalculation object

set_pressure(pressure)

Sets the pressure.

Parameters:

pressure – The pressure [Pa]

Returns:

This EquilibriumCalculation object

update_addition(addition)

Replaces an already added addition with an updated one. This is usually used to change the composition or amount of an addition while iterating over them. Typically, this is done for stepping or mapping calculations.

Note

The calculation must already contain the addition object to be updated.

Parameters:

addition – The new addition containing updated values

Returns:

This IsoThermalMetallurgyCalculation object

with_options(options)

Sets the options for the calculation.

Parameters:

options – The options

Returns:

This EquilibriumCalculation object

class +tc_toolbox.+process_metallurgy.+equilibrium.EquilibriumGasAddition(composition, amount, temperature, amount_unit, composition_unit, do_scale)

A gas addition to an equilibrium calculation.

Tip

By setting do_scale=True, the composition will be scaled to 100% / fraction of 1. This is useful if the composition provided is not summing to 100% / 1. An example could be a gas addition which is provided like this: 90 vol–% Ar - 10 vol-% O2.

EquilibriumGasAddition(composition, amount, temperature, amount_unit, composition_unit, do_scale)

A gas addition to an equilibrium calculation.

Tip

By setting do_scale=True, the composition will be scaled to 100% / fraction of 1. This is useful if the composition provided is not summing to 100% / 1. An example could be a gas addition which is provided like this: 90 vol–% Ar - 10 vol-% O2.

Parameters:
  • composition – The composition

  • amount – The amount

  • temperature – The initial addition temperature (default: 20 °C) [K]

  • amount_unit – The amount unit

  • composition_unit – The composition unit

  • do_scale – If the composition is scaled to 100% / fraction of 1

get_amount()

Returns the amount of this addition.

Note

The amount unit can be obtained using get_amount_unit().

Returns:

The amount [in the amount unit]

get_amount_unit()

Returns the amount unit used in this addition.

Returns:

The amount unit

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

set_amount(amount)

Change the amount of the addition.

Parameters:

amount – The new amount [in the amount unit of this addition]

Returns:

This AbstractEquilibriumAddition object

set_component_composition(component, content)

Change the composition of a component of the addition.

Parameters:
  • component – The component to be changed

  • content – The new content of the component [in the composition unit defined for this addition]

Returns:

This AbstractEquilibriumAddition object

class +tc_toolbox.+process_metallurgy.+equilibrium.EquilibriumResult(back)

The result of a Process Metallurgy equilibrium calculation.

EquilibriumResult(back)

Call base constructor: tc_toolbox.AbstractResult.

get_activity_of_slag(component, reference)

Returns the activity of a component in the slag.

Parameters:
  • component – The component

  • reference – The reference for the activity, can be liquid or solid slag, default: liquid slag

Returns:

The activity of the component [-]

get_amount()

Returns the total amount.

Returns:

The total amount [kg]

get_amount_of_elements()

Returns the amount of each element.

Returns:

The amount of the elements [kg]

get_amount_of_phase_groups()

Returns the amount of each phase group (e.g., for example all liquid slag).

Returns:

The amount of the phase groups [kg]

get_amount_of_phases()

Returns the amount of each phase.

Returns:

The amount of the phases [kg]

get_components()

Returns all components defined for the elements present in this result.

Returns:

The components present in this result

get_composition(composition_unit)

Returns the composition of the result.

Parameters:

composition_unit – The composition unit, default: mass percent

Returns:

The composition

get_composition_of_phase(phase, composition_unit, composition_type)

Returns the composition of a phase in the result.

Parameters:
  • phase – The phase name

  • composition_unit – The composition unit, default: mass percent

  • composition_type – Defines if the composition is given by element (e.g., 75 wt-% Fe - 25 wt-% Cr) or by component (e.g. 65 wt-% Al2O3 - 35 wt-% CaO). In case of a metallic phase, the composition is given by element even if component is selected. Default: by component.

Returns:

The composition

get_composition_of_phase_group(phase_group, composition_unit, composition_type)

Returns the composition of a phase group (e.g., all liquid slag) in the result.

Parameters:
  • phase_group – The phase group

  • composition_unit – The composition unit, default: mass percent

  • composition_type – Defines if the composition is given by element (e.g., 75 wt-% Fe - 25 wt-% Cr) or by component (e.g. 65 wt-% Al2O3 - 35 wt-% CaO). In case of a metallic phase, the composition is given by element even if component is selected. Default: by component.

Returns:

The composition

get_elements()

Returns all elements defined for the result.

Returns:

All elements present in this result

get_formula_for_activity_of_slag(component, reference)

Returns the Thermo-Calc Console syntax formula used for calculating the activity of a component in the slag (e.g. AC(AL2O3, IONIC_LIQ). The actual activity can be obtained using get_activity_of_slag().

Parameters:
  • component – The component

  • reference – The reference for the activity, can be liquid or solid slag, default: liquid slag

Returns:

The formula for calculating the activity

get_formula_for_slag_property(slag_property, slag_type)

Returns the Thermo-Calc Console syntax formula used for calculating a property of the slag (e.g. B(CAO)/B(SIO2). The actual slag property can be obtained using get_slag_property().

Parameters:
  • slag_property – The slag property

  • slag_type – The part of the slag for which the property will be calculated. Can be all slag, the liquid or the solid slag. Default: all slag

Returns:

The formula for calculating the slag property

get_fraction_of_phase_groups(unit)

Returns the fraction of the phase groups (e.g., all liquid slag) in the result.

Parameters:

unit – The unit of the fraction, default: volume fraction

Returns:

The phase fractions

get_fraction_of_phases(unit)

Returns the fraction of the stable phases in the result.

Parameters:

unit – The unit of the fraction, default: volume fraction

Returns:

The phase fractions

get_gas_components()

Returns all components of the gas phase defined for the elements present in this result.

Returns:

The components of the gas phase present in this result

get_oxygen_partial_pressure()

Returns the partial pressure of oxygen in the result.

Returns:

The partial pressure [Pa]

get_pressure()

Returns the pressure in the result.

Returns:

The pressure [Pa]

get_slag_property(slag_property, slag_type)

Returns a property of the slag. These properties are mostly used to describe the property of a slag to pick up sulfur.

Parameters:
  • slag_property – The slag property

  • slag_type – The part of the slag for which the property will be calculated. Can be all slag, the liquid or the solid slag. Default: all slag

Returns:

The slag property [unit depending on the property]

get_stable_phases()

Returns the stable phases in the result.

Returns:

The stable phases

get_stable_phases_in_phase_group(phase_group)

Returns the stable phases of a phase group (e.g., all liquid slag) in the result.

Parameters:

phase_group – The phase group

Returns:

The stable phases

get_temperature()

Returns the temperature in the result.

Returns:

The temperature [K]

get_value_of(classic_expression)

Returns a value for a thermodynamic quantity.

Warning

It should normally not be required to use this method, use the appropriate method available in the API instead.

Parameters:

classic_expression – The thermodynamic quantity to get the value of in Thermo-Calc Console Mode syntax (for example “NPM(FCC_A1)”)

Returns:

The requested value

get_viscosity_dynamic_of_phase(phase)

Returns the dynamic viscosity of a phase in the result.

Parameters:

phase – The phase name

Returns:

The dynamic viscosity [Pa*s]

get_viscosity_kinematic_of_phase(phase)

Returns the kinematic viscosity of a phase in the result.

Parameters:

phase – The phase name

Returns:

The kinematic viscosity [m**2/s]

invalidate()

Invalidates the object and frees the disk space used by it. This is only required if the disk space occupied by the object needs to be released during the calculation. No data can be retrieved from the object afterwards.

class +tc_toolbox.+process_metallurgy.+equilibrium.IsoThermalEquilibriumCalculation(back)

An isothermal Process Metallurgy equilibrium calculation. Such calculations can for example be used to determine the global equilibrium state of a process.

IsoThermalEquilibriumCalculation(back)

Call base constructor: tc_toolbox.process_metallurgy.equilibrium.EquilibriumCalculation.

add_addition(addition)

Adds an addition to the calculation.

Parameters:

addition – A EquilibriumAddition or EquilibriumGasAddition

Returns:

This IsoThermalEquilibriumCalculation object

add_poly_command(command)

Adds a Thermo-Calc Console syntax POLY module command which will be executed when performing the calculation using the calculate() method.

If multiple commands are added, they will be executed in the order of addition. Each command will only be executed one.

Note

It should not be necessary for most users to use this method, try to use the corresponding method implemented in the API instead.

Warning

As this method runs raw Thermo-Calc commands directly in the engine, it may hang the program in case of spelling mistakes (e.g. forgotten equals sign).

Parameters:

command – The POLY module command in Thermo-Calc console syntax

Returns:

This IsoThermalEquilibriumCalculation object

calculate(timeout_in_minutes)

Runs the Process Metallurgy equilibrium calculation.

Parameters:

timeout_in_minutes – The calculation will be aborted after that time, default: no timeout

Returns:

A new EquilibriumResult object

remove_addition(addition)

Removes an addition from the calculation.

Parameters:

addition – The addition to be removed

Returns:

This IsoThermalEquilibriumCalculation object

remove_all_additions()

Removes all additions from the calculation.

Returns:

This IsoThermalEquilibriumCalculation object

set_pressure(pressure)

Sets the pressure.

Parameters:

pressure – The pressure [Pa]

Returns:

This IsoThermalEquilibriumCalculation object

set_temperature(temperature)

Sets the temperature.

Parameters:

temperature – The temperature [K]

Returns:

This IsoThermalEquilibriumCalculation object

update_addition(addition)

Replaces an already added addition with an updated one.

Tip

This is usually used to change the composition or amount of an addition while iterating over multiple values. Typically, this is done for stepping or mapping calculations.

Note

The calculation must already contain the addition object to be updated.

Parameters:

addition – A previously added addition object with the updated values

Returns:

This IsoThermalEquilibriumCalculation object

with_options(options)

Sets the options for the calculation.

Parameters:

options – The options

Returns:

This IsoThermalEquilibriumCalculation object