Module “process”

class tc_python.process_metallurgy.process.AbstractContinuousAddition

Bases: tc_python.process_metallurgy.process.AbstractProcessAddition

The base class representing an addition in a process simulation that is added continuously over a period of time.

class tc_python.process_metallurgy.process.AbstractProcessAddition

Bases: tc_python.process_metallurgy.base.AbstractAddition

The base class for representing an addition in a process simulation.

class tc_python.process_metallurgy.process.AbstractSingleTimeAddition

Bases: tc_python.process_metallurgy.process.AbstractProcessAddition

The base class representing an addition in a process simulation that is added at a distinct time point.

class tc_python.process_metallurgy.process.BulkZone(density: float, phase_group_to_transfer: tc_python.process_metallurgy.base.PhaseGroup, name: str)

Bases: tc_python.process_metallurgy.process.Zone

A bulk zone in a process simulation, this is representing a large volume in the process, for example the steel melt or the top slag. A zone is a volume in a process that has identical temperature and composition. It has well-defined boundaries to other zones.

Tip

This is a generic class and seldom used directly. Use instead MetalBulkZone or SlagBulkZone.

add_addition(addition: tc_python.process_metallurgy.process.AbstractSingleTimeAddition, time: float = 0.0)

Adds a single-time addition at the specified time point to the zone. The addition will be dissolved immediately.

Parameters
Returns

This BulkZone object

add_continuous_addition(addition: tc_python.process_metallurgy.process.AbstractContinuousAddition, from_time: float = 0.0, to_time: float = nan)

Adds a constant addition continuously during the specified time period to the zone. All added material will be dissolved immediately.

Parameters
Returns

This BulkZone object

add_power(power: float, from_time: float = 0.0, to_time: float = nan)

Adds a constant power during a specified time period to the zone (for example heating or cooling).

Parameters
  • power – The power [MW]

  • from_time – The start time point [s]

  • to_time – The end time point [s]

Returns

This BulkZone object

disable_degassing()

Disables degassing for this zone, i.e. all gas formed at any time step will be staying in this zone.

Returns

This BulkZone object

enable_degassing()

Enables degassing for this zone, i.e. any gas formed at any time step will be removed after that time step. This gas will be transferred into the exhaust gas zone. This is the default.

Returns

This BulkZone object

get_density() → float

Returns the density of the zone

Returns

The density [kg/m**3]

get_elements() → Set[str]

Returns the elements present in the zone. The elements are determined by the additions.

Returns

The elements

get_id() → str

Returns the unique id of the zone. :return: The zone id

get_phase_group_to_transfer()tc_python.process_metallurgy.base.PhaseGroup

Returns the phase group that is transferred from the attached reaction zones back to this zone after each time step.

Returns

The phase group

is_degassing_enabled() → bool

Returns if degassing is enabled in the zone.

Returns

If degassing is enabled

class tc_python.process_metallurgy.process.ContinuousAddition(composition: Dict[str, float], rate: float, temperature: float = 293.15, composition_unit: tc_python.utils.CompositionUnit = <CompositionUnit.MASS_PERCENT: 0>, do_scale: bool = False)

Bases: tc_python.process_metallurgy.process.AbstractContinuousAddition

An addition in a process simulation that is added continuously during a period of time.

It is assumed that the material added during that period is dissolved instantaneously.

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 scaling 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

  • rate – The rate of addition [kg/s]

  • 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_composition_unit()tc_python.utils.CompositionUnit

Returns the composition unit used in this addition.

Returns

The composition unit

get_rate() → float

Returns the rate of addition.

Returns

The addition rate [kg/s]

class tc_python.process_metallurgy.process.ContinuousGasAddition(composition: Dict[str, float], rate: float, temperature: float = 293.15, rate_unit: tc_python.utils.GasRateUnit = <GasRateUnit.NORM_CUBIC_METER_PER_SEC: 0>, composition_unit: tc_python.utils.GasCompositionUnit = <GasCompositionUnit.VOLUME_PERCENT: 4>, do_scale: bool = False)

Bases: tc_python.process_metallurgy.process.AbstractContinuousAddition

A gas addition in a process simulation that is added continuously during a period of time.

It is assumed that the gas added during that period is dissolved instantaneously.

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 scaling to 100% / 1. An example could be a gas addition which is provided like this: 90 vol–% Ar - 10 vol-% O2.

get_composition_unit()tc_python.utils.GasCompositionUnit

Returns the composition unit used in this addition.

Returns

The composition unit

get_rate() → float

Returns the rate of addition.

Note

The rate unit can be obtained using get_rate_unit().

Returns

The addition rate [in the rate unit]

get_rate_unit()tc_python.utils.GasRateUnit

Returns the rate unit used in this addition.

Returns

The rate unit

class tc_python.process_metallurgy.process.ExhaustGasResult(result)

Bases: object

A result representing the exhaust gas zone, here all exhaust gas generated during the process is accumulated.

The data is returned for each time point of the process simulation. These time points can be obtained from this method: ProcessSimulationResult.get_time_points().

get_amount() → List[float]

Returns the amount of exhaust gas present at each time point.

This is the amount of gas accumulated since the beginning of the process.

Returns

The accumulated amount of gas at each time point [kg]

get_amount_of_components() → Dict[str, List[float]]

Returns the amount of each exhaust gas component present at each time point.

This is the amount of gas accumulated since the beginning of the process. This is different from the current composition at each time point obtained using get_composition().

Returns

The accumulated amount of each gas component at each time point [kg]

get_composition(composition_type: tc_python.utils.CompositionType = <CompositionType.COMPONENT: 1>, unit: tc_python.utils.CompositionUnit = <CompositionUnit.MASS_PERCENT: 0>) → Dict[str, List[float]]

Returns the current composition of the exhaust gas zone at each time point. This is the composition at each time point. This is different from the accumulated amount obtained using get_amount_of_components().

Parameters
  • composition_type – The type of the composition, can be by gas component or by element, default: by gas component

  • unit – The composition unit, default: mass percent

Returns

The current composition of the gas components at each time point

get_pressure() → List[float]

Returns the pressure of the exhaust gas zone at each time point.

Returns

The pressure [Pa]

get_stable_phases() → Set[str]

Returns the stable phases within the exhaust gas zone at each time point.

Returns

The stable phases

get_temperature() → List[float]

Returns the temperature of the exhaust gas at each time point.

Returns

The temperature at each time point [K]

class tc_python.process_metallurgy.process.MassTransferCoefficients

Bases: object

The mass transfer coefficients between a reaction zone and a bulk zone vs. time.

add(mass_transfer_coefficient: float, time: float = 0.0)

Adds the mass transfer coefficient valid beginning at a time point.

This value is valid until another value is defined for a later time point.

Parameters
  • mass_transfer_coefficient – The mass transfer coefficient [m/s]

  • time – The time-point where the mass transfer coefficient begins to be valid [s]

Returns

This MassTransferCoefficients object

class tc_python.process_metallurgy.process.MetalBulkZone(density: float)

Bases: tc_python.process_metallurgy.process.Zone

A metallic bulk zone in a process simulation.

This is representing a large volume in the process, for example the steel melt. A zone is a volume in a process that has identical temperature and composition. It has well-defined boundaries to other zones.

The name of this zone is automatically defined and unique.

add_addition(addition: tc_python.process_metallurgy.process.AbstractSingleTimeAddition, time: float = 0.0)

Adds a single-time addition at the specified time point to the zone. The addition will be dissolved immediately.

Parameters
Returns

This MetalBulkZone object

add_continuous_addition(addition: tc_python.process_metallurgy.process.AbstractContinuousAddition, from_time: float = 0.0, to_time: float = nan)

Adds a constant addition continuously during the specified time period to the zone. All added material will be dissolved immediately.

Parameters
Returns

This MetalBulkZone object

add_power(power: float, from_time: float = 0.0, to_time: float = nan)

Adds a constant power during a specified time period to the zone (for example heating or cooling).

Parameters
  • power – The power [MW]

  • from_time – The start time point [s]

  • to_time – The end time point [s]

Returns

This MetalBulkZone object

disable_degassing()

Disables degassing for this zone, i.e. all gas formed at any time step will be staying in this zone.

Returns

This MetalBulkZone object

enable_degassing()

Enables degassing for this zone, i.e. any gas formed at any time step will be removed after that time step. This gas will be transferred into the exhaust gas zone. This is the default.

Returns

This MetalBulkZone object

get_density() → float

Returns the density of the zone

Returns

The density [kg/m**3]

get_elements() → Set[str]

Returns the elements present in the zone. The elements are determined by the additions.

Returns

The elements

get_id() → str

Returns the unique name / id of the zone.

Returns

The zone name / id

get_phase_group_to_transfer()tc_python.process_metallurgy.base.PhaseGroup

Returns the phase group that is transferred from the attached reaction zones back to this zone after each time step.

Returns

The phase group

is_degassing_enabled() → bool

Returns if degassing is enabled in the zone.

Returns

If degassing is enabled

class tc_python.process_metallurgy.process.ProcessSimulationCalculation(calculation)

Bases: object

A Process Metallurgy process simulation. Such calculations represent complete metallurgical processes with several zones and simulate their evolution over time.

calculate(timeout_in_minutes: float = 0.0)tc_python.process_metallurgy.process.ProcessSimulationResult

Runs the Process Metallurgy process simulation.

Parameters

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

Returns

A new ProcessSimulationResult object

set_end_time(end_time: float)

Sets the end time of a process.

Parameters

end_time – The end time point [s]

Returns

This ProcessSimulationCalculation object

set_initial_time_step(initial_time_step: float = 1.0)

Sets the initial time step used in the process simulation.

Note

All later time steps are automatically determined to limit the expected temperature change during that step, this is controlled by set_max_allowed_temp_change_per_step().

Parameters

initial_time_step – The initial time step [s]

Returns

This ProcessSimulationCalculation object

set_max_allowed_temp_change_per_step(max_allowed_temp_change: float = 10.0)

The maximum allowed temperature change per time step. This is implicitly also limiting the composition change during a time step and required for numerical stability.

Parameters

max_allowed_temp_change – The maximum allowed temperature change [K]

Returns

This ProcessSimulationCalculation object

set_max_time_step(max_time_step: float = 180.0)

The maximum time step chosen by the automatic time step control.

Note

All time steps are automatically determined to limit the expected temperature change during that step, this is controlled by set_max_allowed_temp_change_per_step().

Parameters

max_time_step – The maximum time step [s]

Returns

This ProcessSimulationCalculation object

set_min_time_step(min_time_step: float = 1.0)

The minimum time step chosen by the automatic time step control.

Note

All time steps are automatically determined to limit the expected temperature change during that step, this is controlled by set_max_allowed_temp_change_per_step().

Parameters

min_time_step – The minimum time step [s]

Returns

This ProcessSimulationCalculation object

set_pressure(pressure: float = 100000.0)

Sets a constant pressure during the complete process.

Parameters

pressure – The pressure [Pa]

Returns

This ProcessSimulationCalculation object

set_pressure_in_time_period(pressure_in_pa: float, from_time: float = 0.0, to_time: float = nan)

Sets a constant pressure during a time period.

Default: 1.0e5 Pa.

Parameters
  • pressure_in_pa – The pressure [Pa]

  • from_time – The start time [s]

  • to_time – The end time [s]

Returns

This ProcessSimulationCalculation object

with_options(options: tc_python.process_metallurgy.base.ProcessMetallurgyOptions)

Sets the options for the process simulation.

Parameters

options – The options

Returns

This ProcessSimulationCalculation object

with_reaction_zone(reaction_zone: tc_python.process_metallurgy.process.ReactionZone)

Sets the reaction zone of the process simulation. The bulk zones attached to this reaction zone are configured in the reaction zone object.

Note

In the present release, only one reaction zone is supported.

Parameters

reaction_zone – The reaction zone object

Returns

This ProcessSimulationCalculation object

class tc_python.process_metallurgy.process.ProcessSimulationResult(result)

Bases: tc_python.abstract_base.AbstractResult

The result of a Process Metallurgy process simulation.

get_activity_of_slag(zone: Union[tc_python.process_metallurgy.process.Zone, str], component: str, reference: tc_python.process_metallurgy.base.ActivityReference = <ActivityReference.LIQUID: 1>) → List[float]

Returns the activity of a component in the slag in a zone at each time point.

Parameters
  • zone – The zone object or the zone name

  • component – The component

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

Returns

The activity of the component at each time point [-]

get_amount(zone: Union[tc_python.process_metallurgy.process.Zone, str]) → List[float]

Returns the amount of a zone at each time point.

Parameters

zone – The zone object or the zone name

Returns

The amount at each time point [kg]

get_amount_of_elements() → Dict[str, List[float]]

Returns the total amount of each element in the simulation at each time point.

Returns

The total amount of the elements at each time point [kg]

get_amount_of_phase_groups(zone: Union[tc_python.process_metallurgy.process.Zone, str]) → Dict[tc_python.process_metallurgy.base.PhaseGroup, List[float]]

Returns the amount of each phase group (e.g., for example all liquid slag) in a zone at each time point.

Parameters

zone – The zone object or the zone name

Returns

The amount of the phase groups at each time point [kg]

get_amount_of_phases(zone: Union[tc_python.process_metallurgy.process.Zone, str]) → Dict[str, List[float]]

Returns the amount of each phase in a zone at each time point.

Parameters

zone – The zone object or the zone name

Returns

The amount of the phases at each time point [kg]

get_components() → Set[str]

Returns all components defined in the simulation.

Returns

The components

get_composition(zone: Union[tc_python.process_metallurgy.process.Zone, str], composition_unit: tc_python.utils.CompositionUnit = <CompositionUnit.MASS_PERCENT: 0>) → Dict[str, List[float]]

Returns the composition of a zone per element at each time point.

Parameters
  • zone – The zone object or the zone name

  • composition_unit – The composition unit, default: mass percent

Returns

The composition at each time point

get_composition_of_phase(zone: Union[tc_python.process_metallurgy.process.Zone, str], phase: str, composition_unit: tc_python.utils.CompositionUnit = <CompositionUnit.MASS_PERCENT: 0>, composition_type: tc_python.utils.CompositionType = <CompositionType.COMPONENT: 1>) → Dict[str, List[float]]

Returns the composition of a phase in a zone at each time point.

Parameters
  • zone – The zone object or the zone name

  • 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 at each time point

get_composition_of_phase_group(zone: Union[tc_python.process_metallurgy.process.Zone, str], phase_group: tc_python.process_metallurgy.base.PhaseGroup, composition_unit: tc_python.utils.CompositionUnit = <CompositionUnit.MASS_PERCENT: 0>, composition_type: tc_python.utils.CompositionType = <CompositionType.COMPONENT: 1>) → Dict[str, List[float]]

Returns the composition of a phase group (e.g., all liquid slag) in a zone at each time point.

Parameters
  • zone – The zone object or the zone name

  • 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 at each time point

get_elements() → Set[str]

Returns all elements present in the simulation.

Returns

The elements

get_enthalpy() → List[float]

Returns the total enthalpy of the process at each time point.

Returns

The enthalpy at each time point [J]

get_exhaust_gas()tc_python.process_metallurgy.process.ExhaustGasResult

Returns the result for the exhaust gas zone.

This result object can be used to evaluate the exhaust gas zone at each time point.

Returns

The exhaust gas zone result object.

get_formula_for_activity_of_slag(zone: Union[tc_python.process_metallurgy.process.Zone, str], component: str, reference: tc_python.process_metallurgy.base.ActivityReference = <ActivityReference.LIQUID: 1>) → List[str]

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

Parameters
  • zone – The zone object or the zone name

  • 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 at each time point

get_formula_for_slag_property(zone: Union[tc_python.process_metallurgy.process.Zone, str], slag_property: tc_python.process_metallurgy.base.SlagProperty, slag_type: tc_python.process_metallurgy.base.SlagType = <SlagType.ALL: 2>) → List[str]

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

Parameters
  • zone – The zone object or the zone name

  • 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 at each time point

get_fraction_of_phase_groups(zone: Union[tc_python.process_metallurgy.process.Zone, str], unit: tc_python.utils.PhaseUnit = <PhaseUnit.MASS_FRACTION: 1>) → Dict[tc_python.process_metallurgy.base.PhaseGroup, List[float]]

Returns the fractions of the phase groups (e.g., all liquid slag) in a zone at each time point.

Parameters
  • zone – The zone object or the zone name

  • unit – The unit of the fraction

Returns

The phase fractions at each time point

get_fraction_of_phases(zone: Union[tc_python.process_metallurgy.process.Zone, str], unit: tc_python.utils.PhaseUnit = <PhaseUnit.MASS_FRACTION: 1>) → Dict[str, List[float]]

Returns the fractions of all stable phases in a zone at each time point.

Parameters
  • zone – The zone object or the zone name

  • unit – The unit of the fraction

Returns

The phase fractions at each time point

get_gas_components() → Set[str]

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

Returns

The components of the gas phase

get_num_of_performed_steps() → List[int]

Returns the accumulated number of performed time steps at each time point.

Note

The number of performed time steps can differ from the index of the time step in the result list because time steps might have been repeated with smaller step size during a process simulation.

Returns

The accumulated number of performed time steps

get_oxygen_partial_pressure(zone: Union[tc_python.process_metallurgy.process.Zone, str]) → List[float]

Returns the partial pressure of oxygen in the zone at each time point.

Parameters

zone – The zone object or the zone name

Returns

The partial pressure [Pa]

get_pressure(zone: Union[tc_python.process_metallurgy.process.Zone, str]) → List[float]

Returns the pressure in a zone at each time point.

Parameters

zone – The zone object or the zone name

Returns

The pressure at each time point [Pa]

get_slag_property(zone: Union[tc_python.process_metallurgy.process.Zone, str], slag_property: tc_python.process_metallurgy.base.SlagProperty, slag_type: tc_python.process_metallurgy.base.SlagType = <SlagType.ALL: 2>) → List[float]

Returns a property of the slag in a zone at each time point. These properties are mostly used to describe the property of a slag to pick up sulfur.

Parameters
  • zone – The zone object or the zone name

  • 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 at each time point [unit depending on the property]

get_stable_phases(zone: Union[tc_python.process_metallurgy.process.Zone, str]) → Set[str]

Returns the stable phases in a zone.

Parameters

zone – The zone object or the zone name

Returns

The stable phases

get_stable_phases_in_phase_group(zone: Union[tc_python.process_metallurgy.process.Zone, str], phase_group: tc_python.process_metallurgy.base.PhaseGroup) → Set[str]

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

Parameters
  • zone – The zone object or the zone name

  • phase_group – The phase group

Returns

The stable phases of the phase group

get_temperature(zone: Union[tc_python.process_metallurgy.process.Zone, str]) → List[float]

Returns the temperature of a zone at each time point.

Parameters

zone – The zone object or the zone name

Returns

The temperature at each time point [K]

get_time_points() → List[float]

Returns the time points of the process simulation. All result quantities are returned for exactly these time points.

Returns

The time points [s]

get_value_of(zone: Union[tc_python.process_metallurgy.process.Zone, str], classic_expression: str) → List[float]

Returns a value for a thermodynamic quantity in a zone at each time point.

Warning

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

Parameters
  • zone – The zone object or the zone name

  • 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 at each time point

get_viscosity_dynamic_of_phase(zone: Union[tc_python.process_metallurgy.process.Zone, str], phase: str) → List[float]

Returns the dynamic viscosity of a phase in a zone at each time point.

Parameters
  • zone – The zone object or the zone name

  • phase – The phase name

Returns

The dynamic viscosity at each time point [Pa*s]

get_viscosity_kinematic_of_phase(zone: Union[tc_python.process_metallurgy.process.Zone, str], phase: str) → List[float]

Returns the kinematic viscosity of a phase in a zone at each time point.

Parameters
  • zone – The zone object or the zone name

  • phase – The phase name

Returns

The kinematic viscosity at each time point [m**2/s]

class tc_python.process_metallurgy.process.ReactionZone(area: float, left_zone: tc_python.process_metallurgy.process.Zone, mass_transfer_coefficient_left: Union[float, tc_python.process_metallurgy.process.MassTransferCoefficients], right_zone: tc_python.process_metallurgy.process.Zone, mass_transfer_coefficient_right: Union[float, tc_python.process_metallurgy.process.MassTransferCoefficients])

Bases: tc_python.process_metallurgy.process.Zone

A reaction zone in a process simulation, this is representing the interface layer between two bulk zones that are in contact and can react with each other, for example the steel melt and the top slag. The size of the reaction zone is dynamic and determined by the mass transfer coefficient. A zone is a volume in a process that has identical temperature and composition. It has well-defined boundaries to other zones.

add_addition(addition: tc_python.process_metallurgy.process.AbstractSingleTimeAddition, time: float = 0.0)

Adds a single-time addition at the specified time point to the zone. The addition will be dissolved immediately.

Parameters
Returns

This ReactionZone object

add_continuous_addition(addition: tc_python.process_metallurgy.process.AbstractContinuousAddition, from_time: float = 0.0, to_time: float = nan)

Adds a constant addition continuously during the specified time period to the zone. All added material will be dissolved immediately.

Parameters
Returns

This ReactionZone object

add_heat_transfer(heat_transfer_coefficient: float)

Adds heat transfer through the reaction zone, i.e., between the two attached bulk zones.

Parameters

heat_transfer_coefficient – The heat transfer coefficient [W/(K*m**2)]

Returns

This ReactionZone object

add_power(power: float, from_time: float = 0.0, to_time: float = nan)

Adds a constant power during a specified time period to the zone (for example heating or cooling).

Parameters
  • power – The power [MW]

  • from_time – The start time point [s]

  • to_time – The end time point [s]

Returns

This ReactionZone object

add_transfer_of_phase_group(transfer_of_phase_group: tc_python.process_metallurgy.process.TransferOfPhaseGroup)

Adds transfer of a certain phase group through the reaction zone during each time step, i.e. from one of the attached bulk zones to the other. This is for example used to model inclusion flotation from the steel melt to the slag.

Parameters

transfer_of_phase_group – The transfer of phase group configuration, can be time-dependent.

Returns

This ReactionZone object

disable_degassing()

Disables degassing for this zone, i.e. all gas formed at any time step will be staying in this zone.

Returns

This ReactionZone object

enable_degassing()

Enables degassing for this zone, i.e. any gas formed at any time step will be removed after that time step. This gas will be transferred into the exhaust gas zone. This is the default.

Returns

This ReactionZone object

get_elements() → Set[str]

Returns the elements present in the zone. The elements are determined by the additions.

Returns

The elements

get_id() → str

Returns the unique id of the zone. :return: The zone id

is_degassing_enabled() → bool

Returns if degassing is enabled in the zone.

Returns

If degassing is enabled

class tc_python.process_metallurgy.process.SingleTimeAddition(composition: Dict[str, float], amount: float, temperature: float = 293.15, composition_unit: tc_python.utils.CompositionUnit = <CompositionUnit.MASS_PERCENT: 0>, do_scale: bool = False)

Bases: tc_python.process_metallurgy.process.AbstractSingleTimeAddition

An addition in a process simulation that is added at a distinct time point.

It is assumed that the addition is dissolved instantaneously.

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() → float

Returns the amount of this addition.

Returns

The amount [kg]

get_composition_unit()tc_python.utils.CompositionUnit

Returns the composition unit used in this addition.

Returns

The composition unit

class tc_python.process_metallurgy.process.SingleTimeGasAddition(composition: Dict[str, float], amount: float, temperature: float = 293.15, amount_unit: tc_python.utils.GasAmountUnit = <GasAmountUnit.NORM_CUBIC_METER: 0>, composition_unit: tc_python.utils.GasCompositionUnit = <GasCompositionUnit.VOLUME_PERCENT: 4>, do_scale: bool = False)

Bases: tc_python.process_metallurgy.process.AbstractSingleTimeAddition

A gas addition in a process simulation that is added at a distinct time point.

It is assumed that the addition is dissolved instantaneously.

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 scaling 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() → float

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()tc_python.utils.GasAmountUnit

Returns the amount unit used in this addition.

Returns

The amount unit

get_composition_unit()tc_python.utils.GasCompositionUnit

Returns the composition unit used in this addition.

Returns

The composition unit

class tc_python.process_metallurgy.process.SlagBulkZone(density: float)

Bases: tc_python.process_metallurgy.process.Zone

A slag bulk zone in a process simulation.

This is representing a large volume in the process, for example the top slag. A zone is a volume in a process that has identical temperature and composition. It has well-defined boundaries to other zones.

The name of this zone is automatically defined and unique.

add_addition(addition: tc_python.process_metallurgy.process.AbstractSingleTimeAddition, time: float = 0.0)

Adds a single-time addition at the specified time point to the zone. The addition will be dissolved immediately.

Parameters
Returns

This SlagBulkZone object

add_continuous_addition(addition: tc_python.process_metallurgy.process.AbstractContinuousAddition, from_time: float = 0.0, to_time: float = nan)

Adds a constant addition continuously during the specified time period to the zone. All added material will be dissolved immediately.

Parameters
Returns

This SlagBulkZone object

add_power(power: float, from_time: float = 0.0, to_time: float = nan)

Adds a constant power during a specified time period to the zone (for example heating or cooling).

Parameters
  • power – The power [MW]

  • from_time – The start time point [s]

  • to_time – The end time point [s]

Returns

This SlagBulkZone object

disable_degassing()

Disables degassing for this zone, i.e. all gas formed at any time step will be staying in this zone.

Returns

This SlagBulkZone object

enable_degassing()

Enables degassing for this zone, i.e. any gas formed at any time step will be removed after that time step. This gas will be transferred into the exhaust gas zone. This is the default.

Returns

This SlagBulkZone object

get_density() → float

Returns the density of the zone

Returns

The density [kg/m**3]

get_elements() → Set[str]

Returns the elements present in the zone. The elements are determined by the additions.

Returns

The elements

get_id() → str

Returns the unique id of the zone. :return: The zone id

get_phase_group_to_transfer()tc_python.process_metallurgy.base.PhaseGroup

Returns the phase group that is transferred from the attached reaction zones back to this zone after each time step.

Returns

The phase group

is_degassing_enabled() → bool

Returns if degassing is enabled in the zone.

Returns

If degassing is enabled

class tc_python.process_metallurgy.process.TransferOfPhaseGroup(phase_group_to_transfer: tc_python.process_metallurgy.base.PhaseGroup, source_zone: tc_python.process_metallurgy.process.Zone)

Bases: object

The transfer of a percentage of a certain phase group (.e.g., solid slag) between zones during each time step. This is for example used to model inclusion flotation from the steel melt to the slag.

add(transfer_rate: float, time: float = 0)

Adds the transfer rate valid beginning at a time point.

This value is valid until another value is defined for a later time point.

Parameters
  • transfer_rate – The transfer rate [% of phase group amount/s]

  • time – The time point where the transfer of a phase group begins to be valid [s]

Returns

This TransferOfPhaseGroup object

get_phase_group_to_transfer()tc_python.process_metallurgy.base.PhaseGroup

Returns the phase group to be transferred

Returns

The phase group

get_transfer_source_zone_id() → str

The id of the source zone of the transfer

Returns

This source zone id

class tc_python.process_metallurgy.process.Zone

Bases: object

The base class of a zone in a process simulation. A zone is a volume in a process that has identical temperature and composition. It has well-defined boundaries to other zones.

add_addition(addition: tc_python.process_metallurgy.process.AbstractSingleTimeAddition, time: float = 0.0)

Adds a single-time addition at the specified time point to the zone. The addition will be dissolved immediately.

Parameters
Returns

This Zone object

add_continuous_addition(addition: tc_python.process_metallurgy.process.AbstractContinuousAddition, from_time: float = 0.0, to_time: float = nan)

Adds a constant addition continuously during the specified time period to the zone. All added material will be dissolved immediately.

Parameters
Returns

This Zone object

add_power(power: float, from_time: float = 0.0, to_time: float = nan)

Adds a constant power during a specified time period to the zone (for example heating or cooling).

Parameters
  • power – The power [MW]

  • from_time – The start time point [s]

  • to_time – The end time point [s]

Returns

This Zone object

disable_degassing()

Disables degassing for this zone, i.e. all gas formed at any time step will be staying in this zone.

Returns

This Zone object

enable_degassing()

Enables degassing for this zone, i.e. any gas formed at any time step will be removed after that time step. This gas will be transferred into the exhaust gas zone. This is the default.

Returns

This Zone object

get_elements() → Set[str]

Returns the elements present in the zone. The elements are determined by the additions.

Returns

The elements

get_id() → str

Returns the unique id of the zone. :return: The zone id

is_degassing_enabled() → bool

Returns if degassing is enabled in the zone.

Returns

If degassing is enabled