Package “step_or_map_diagrams”

class tc_toolbox.step_or_map_diagrams.AbstractAxisType

The abstract base class for all axis types.

class tc_toolbox.step_or_map_diagrams.AbstractPhaseDiagramCalculation

Abstract configuration required for a property diagram calculation.

Note

This is an abstract class that cannot be used directly.

Constructor Summary
AbstractPhaseDiagramCalculation(back)

Call base constructor: tc_toolbox.AbstractCalculation.

Method Summary
add_initial_equilibrium(initial_equilibrium)

Add initial equilibrium start points from which a phase diagram is calculated.

Scans along the axis variables and generates start points when the scan procedure crosses a phase boundary.

It may take a little longer to execute than using the minimum number of start points, as some lines may be calculated more than once. But the core remembers all node points and subsequently stops calculations along a line when it finds a known node point.

It is also possible to create a sequence of start points from one initial equilibria.

Parameters:

initial_equilibrium – The initial equilibrium

Returns:

This PhaseDiagramCalculation object

calculate(keep_previous_results, timeout_in_minutes)
disable_global_minimization()

Disables global minimization.

Default: Enabled

Returns:

This PhaseDiagramCalculation object

dont_keep_default_equilibria()

Do not keep the initial equilibria added by default.

This is only relevant in combination with add_initial_equilibrium().

This is the default behavior.

Returns:

This PhaseDiagramCalculation object

enable_global_minimization()

Enables global minimization.

Default: Enabled

Returns:

This PhaseDiagramCalculation object

get_components()

Returns the names of the components in the system (including all components auto-selected by the database(s)).

Returns:

The component names

get_configuration_as_string()

Returns detailed information about the current state of the calculation object.

Warning

The structure of the calculator objects is an implementation detail and might change between releases without notice. Therefore do not rely on the internal object structure.

get_gibbs_energy_addition_for(phase)

Used to get the additional energy term (always being a constant) of a given phase. The value given is added to the Gibbs energy of the (stoichiometric or solution) phase. It can represent a nucleation barrier, surface tension, elastic energy, etc.

It is not composition-, temperature- or pressure-dependent.

Parameters:

phase – Specify the name of the (stoichiometric or solution) phase with the addition

Returns:

Gibbs energy addition to G per mole formula unit.

get_system_data()

Returns the content of the database for the currently loaded system. This can be used to modify the parameters and functions and to change the current system by using with_system_modifications().

Note

Parameters can only be read from unencrypted (i.e. user) databases loaded as *.tdb-file.

Returns:

The system data

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.

keep_default_equilibria()

Keep the initial equilibria added by default. This is only relevant in combination with add_initial_equilibrium().

Default behavior is to not keep default equilibria.

Returns:

This PhaseDiagramCalculation object

remove_all_initial_equilibria()

Removes all previously added initial equilibria.

Returns:

This PhaseDiagramCalculation object

run_poly_command(command)

Runs a Thermo-Calc command from the Console Mode POLY module immediately in the engine.

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 Thermo-Calc Console Mode command

Returns:

This PhaseDiagramCalculation object

set_gibbs_energy_addition_for(phase, gibbs_energy)

Used to specify the additional energy term (always being a constant) of a given phase. The value (gibbs_energy) given is added to the Gibbs energy of the (stoichiometric or solution) phase. It can represent a nucleation barrier, surface tension, elastic energy, etc.

It is not composition-, temperature- or pressure-dependent.

Parameters:
  • phase – Specify the name of the (stoichiometric or solution) phase with the addition

  • gibbs_energy – Addition to G per mole formula unit

Returns:

This PhaseDiagramCalculation object

set_phase_to_dormant(phase)

Sets the phase to the status DORMANT, necessary for calculating the driving force to form the specified phase.

Parameters:

phase – The phase name or ALL_PHASES for all phases

Returns:

This PhaseDiagramCalculation object

set_phase_to_entered(phase, amount)

Sets the phase to the status ENTERED, that is the default state.

Parameters:
  • phase – The phase name or ALL_PHASES for all phases

  • amount – The phase fraction (between 0.0 and 1.0)

Returns:

This PhaseDiagramCalculation object

set_phase_to_fixed(phase, amount)

Sets the phase to the status FIXED, i.e. it is guaranteed to have the specified phase fraction after the calculation.

Parameters:
  • phase – The phase name

  • amount – The fixed phase fraction (between 0.0 and 1.0)

Returns:

This PhaseDiagramCalculation object

set_phase_to_suspended(phase)

Sets the phase to the status SUSPENDED, i.e. it is ignored in the calculation.

Parameters:

phase – The phase name or ALL_PHASES for all phases

Returns:

This PhaseDiagramCalculation object

with_options(options)

Sets the simulation options.

Parameters:

options – The simulation options

Returns:

This PhaseDiagramCalculation object

with_reference_state(component, phase, temperature, pressure)

The reference state for a component is important when calculating activities, chemical potentials and enthalpies and is determined by the database being used. For each component the data must be referred to a selected phase, temperature and pressure, i.e. the reference state.

All data in all phases where this component dissolves must use the same reference state. However, different databases can use different reference states for the same element/component. It is important to be careful when combining data obtained from different databases.

By default, activities, chemical potentials and so forth are computed relative to the reference state used by the database. If the reference state in the database is not suitable for your purposes, use this command to set the reference state for a component using SER, i.e. the Stable Element Reference (which is usually set as default for a major component in alloys dominated by the component). In such cases, the temperature and pressure for the reference state is not needed.

For a phase to be usable as a reference for a component, the component needs to have the same composition as an end member of the phase. The reference state is an end member of a phase. The selection of the end member associated with the reference state is only performed once this command is executed.

If a component has the same composition as several end members of the chosen reference phase, then the end member that is selected at the specified temperature and pressure will have the lowest Gibbs energy.

Parameters:
  • component – The name of the element must be given.

  • phase – Name of a phase used as the new reference state. Or SER for the Stable Element Reference.

  • temperature – The Temperature (in K) for the reference state. Or CURRENT_TEMPERATURE which means that the current temperature is used at the time of evaluation of the reference energy for the calculation.

  • pressure – The Pressure (in Pa) for the reference state.

Returns:

This PhaseDiagramCalculation object

with_system_modifications(system_modifications)

Updates the system of this calculator with the supplied system modification (containing new phase parameters and system functions).

Note

This is only possible if the system has been read from unencrypted (i.e. user) databases loaded as a *.tdb-file.

Parameters:

system_modifications – The system modification to be performed

Returns:

This PhaseDiagramCalculation object

class tc_toolbox.step_or_map_diagrams.AbstractPropertyDiagramCalculation

Abstract configuration required for a property diagram calculation.

Note

This is an abstract class that cannot be used directly.

Constructor Summary
AbstractPropertyDiagramCalculation(back)

Call base constructor: tc_toolbox.AbstractCalculation.

Method Summary
calculate(keep_previous_results, timeout_in_minutes)
disable_global_minimization()

Disables global minimization.

Default: Enabled

Returns:

This PropertyDiagramCalculation object

disable_step_separate_phases()

Disables step separate phases. This is the default setting.

Returns:

This PropertyDiagramCalculation object

enable_global_minimization()

Enables global minimization.

Default: Enabled

Returns:

This PropertyDiagramCalculation object

enable_step_separate_phases()

Enables step separate phases.

Default: By default separate phase stepping is disabled

Note

This is an advanced option, it is used mostly to calculate how the Gibbs energy for a number of phases varies for different compositions. This is particularly useful to calculate Gibbs energies for complex phases with miscibility gaps and for an ordered phase that is never disordered (e.g. SIGMA-phase, G-phase, MU-phase, etc.).

Returns:

This PropertyDiagramCalculation object

get_components()

Returns the names of the components in the system (including all components auto-selected by the database(s)).

Returns:

The component names

get_configuration_as_string()

Returns detailed information about the current state of the calculation object.

Warning

The structure of the calculator objects is an implementation detail and might change between releases without notice. Therefore do not rely on the internal object structure.

get_gibbs_energy_addition_for(phase)

Used to get the additional energy term (always being a constant) of a given phase. The value given is added to the Gibbs energy of the (stoichiometric or solution) phase. It can represent a nucleation barrier, surface tension, elastic energy, etc.

It is not composition-, temperature- or pressure-dependent.

Parameters:

phase – Specify the name of the (stoichiometric or solution) phase with the addition

Returns:

Gibbs energy addition to G per mole formula unit.

get_system_data()

Returns the content of the database for the currently loaded system. This can be used to modify the parameters and functions and to change the current system by using with_system_modifications().

Note

Parameters can only be read from unencrypted (i.e. user) databases loaded as *.tdb-file.

Returns:

The system data

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.

run_poly_command(command)

Runs a Thermo-Calc command from the Console Mode POLY module immediately in the engine.

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 Thermo-Calc Console Mode command

Returns:

This PropertyDiagramCalculation object

set_gibbs_energy_addition_for(phase, gibbs_energy)

Used to specify the additional energy term (always being a constant) of a given phase. The value (gibbs_energy) given is added to the Gibbs energy of the (stoichiometric or solution) phase. It can represent a nucleation barrier, surface tension, elastic energy, etc.

It is not composition-, temperature- or pressure-dependent.

Parameters:
  • phase – Specify the name of the (stoichiometric or solution) phase with the addition

  • gibbs_energy – Addition to G per mole formula unit

Returns:

This PropertyDiagramCalculation object

set_phase_to_dormant(phase)

Sets the phase to the status DORMANT, necessary for calculating the driving force to form the specified phase.

Parameters:

phase – The phase name or ALL_PHASES for all phases

Returns:

This PropertyDiagramCalculation object

set_phase_to_entered(phase, amount)

Sets the phase to the status ENTERED, that is the default state.

Parameters:
  • phase – The phase name or ALL_PHASES for all phases

  • amount – The phase fraction (between 0.0 and 1.0)

Returns:

This PropertyDiagramCalculation object

set_phase_to_fixed(phase, amount)

Sets the phase to the status FIXED, i.e. it is guaranteed to have the specified phase fraction after the calculation.

Parameters:
  • phase – The phase name

  • amount – The fixed phase fraction (between 0.0 and 1.0)

Returns:

This PropertyDiagramCalculation object

set_phase_to_suspended(phase)

Sets the phase to the status SUSPENDED, i.e. it is ignored in the calculation.

Parameters:

phase – The phase name or ALL_PHASES for all phases

Returns:

This PropertyDiagramCalculation object

with_options(options)

Sets the simulation options.

Parameters:

options – The simulation options

Returns:

This PropertyDiagramCalculation object

with_reference_state(component, phase, temperature, pressure)

The reference state for a component is important when calculating activities, chemical potentials and enthalpies and is determined by the database being used. For each component the data must be referred to a selected phase, temperature and pressure, i.e. the reference state.

All data in all phases where this component dissolves must use the same reference state. However, different databases can use different reference states for the same element/component. It is important to be careful when combining data obtained from different databases.

By default, activities, chemical potentials and so forth are computed relative to the reference state used by the database. If the reference state in the database is not suitable for your purposes, use this command to set the reference state for a component using SER, i.e. the Stable Element Reference (which is usually set as default for a major component in alloys dominated by the component). In such cases, the temperature and pressure for the reference state is not needed.

For a phase to be usable as a reference for a component, the component needs to have the same composition as an end member of the phase. The reference state is an end member of a phase. The selection of the end member associated with the reference state is only performed once this command is executed.

If a component has the same composition as several end members of the chosen reference phase, then the end member that is selected at the specified temperature and pressure will have the lowest Gibbs energy.

Parameters:
  • component – The name of the element must be given.

  • phase – Name of a phase used as the new reference state. Or SER for the Stable Element Reference.

  • temperature – The Temperature (in K) for the reference state. Or CURRENT_TEMPERATURE which means that the current temperature is used at the time of evaluation of the reference energy for the calculation.

  • pressure – The Pressure (in Pa) for the reference state.

Returns:

This PropertyDiagramCalculation object

with_system_modifications(system_modifications)

Updates the system of this calculator with the supplied system modification (containing new phase parameters and system functions).

Note

This is only possible if the system has been read from unencrypted (i.e. user) databases loaded as a *.tdb-file.

Parameters:

system_modifications – The system modification to be performed

Returns:

This PropertyDiagramCalculation object

class tc_toolbox.step_or_map_diagrams.AxisType

Factory class providing objects for configuring a logarithmic or linear axis by using AxisType.linear() or AxisType.logarithmic().

Method Summary
static linear()

Creates an object for configuring a linear calculation axis.

Default: A minimum number of 40 steps.

Note

The returned object can be configured regarding the maximum step size or the minimum number of steps on the axis.

Returns:

A new Linear object

static logarithmic()

Creates an object for configuring a logarithmic calculation axis.

Default: A scale factor of 1.1

Note

The returned object can be configured regarding the scale factor.

Returns:

A new Logarithmic object

class tc_toolbox.step_or_map_diagrams.CalculationAxis

A calculation axis used for property and phase diagram calculations.

Default: A Linear axis with a minimum number of 40 steps

Note

A calculation axis is defining the varied condition and the range of variation. It is the same concept as in Thermo-Calc Graphical Mode or Console Mode.

Constructor Summary
CalculationAxis(quantity)

Default: A Linear axis with a minimum number of 40 steps

Parameters:

quantity – The ThermodynamicQuantity to set as axis variable; a Console Mode syntax string can be used as an alternative (for example “X(Cr)”)

Property Summary
Method Summary
set_max(max)

Sets the maximum quantity value of the calculation axis.

There is no default value set, it always needs to be defined.

Parameters:

max – The maximum quantity value of the axis [unit according to the axis quantity]

Returns:

This CalculationAxis object

set_min(min)

Sets the minimum quantity value of the calculation axis.

There is no default value set, it always needs to be defined.

Parameters:

min – The minimum quantity value of the axis [unit according to the axis quantity]

Returns:

This CalculationAxis object

set_start_at(at)

Sets the starting point of the calculation on the axis.

Default: The default starting point is the center between the minimum and maximum quantity value

Parameters:

at – The starting point on the axis [unit according to the axis quantity]

Returns:

This CalculationAxis object

with_axis_type(axis_type)

Sets the type of the axis.

Default: A Linear axis with a minimum number of 40 steps

Parameters:

axis_type – The axis type (linear or logarithmic)

Returns:

This CalculationAxis object

class tc_toolbox.step_or_map_diagrams.Direction

An enumeration.

class tc_toolbox.step_or_map_diagrams.InitialEquilibrium
Constructor Summary
InitialEquilibrium(first_axis, second_axis)
Property Summary
Method Summary
add_equilibria_at_all_phase_changes()

This generates one start point for each set of phase change in the chosen direction of the specified axis This ensures finding all possible phase boundary lines (not just the first one) along such an axis direction.

Default behavior is to only generate one start point at the first phase change.

Returns:

This InitialEquilibrium object

add_equilibria_at_first_phase_change()

This generates one start point at the first phase change.

This is the default behavior.

Returns:

This InitialEquilibrium object

set_direction(direction_enum)

Specifies along which axes the initial equilibria should be added.

The default direction is INCREASE_FIRST_AXIS.

Parameters:

direction_enum

Returns:

This InitialEquilibrium object

class tc_toolbox.step_or_map_diagrams.Linear

Represents a linear axis.

Constructor Summary
Linear()

Creates an object representing a linear axis. Constructs an instance of Linear.

Property Summary
Method Summary
get_type()

Convenience method for getting axis type.

Returns:

The type

static linear()

Creates an object for configuring a linear calculation axis.

Default: A minimum number of 40 steps.

Note

The returned object can be configured regarding the maximum step size or the minimum number of steps on the axis.

Returns:

A new Linear object

static logarithmic()

Creates an object for configuring a logarithmic calculation axis.

Default: A scale factor of 1.1

Note

The returned object can be configured regarding the scale factor.

Returns:

A new Logarithmic object

set_max_step_size(max_step_size)

Sets the axis to use the maximum step size configuration.

Default: This is not the default which is minimum number of steps

Note

Either maximum step size or minimum number of steps can be used but not both at the same time.

Parameters:

max_step_size – The maximum step size [unit according to the axis quantity]

Returns:

This Linear object

set_min_nr_of_steps(min_nr_of_steps)

Sets the axis to use the minimum number of steps configuration.

Default: This is the default option (with a minimum number of steps of 40)

Note

Either maximum step size or minimum number of steps can be used but not both at the same time.

Parameters:

min_nr_of_steps – The minimum number of steps

Returns:

This Linear object

class tc_toolbox.step_or_map_diagrams.Logarithmic

Represents a logarithmic axis.

Note

A logarithmic axis is useful for low fractions like in a gas phase where 1E-7 to 1E-2 might be an interesting range. For the pressure a logarithmic axis is often also useful.

Constructor Summary
Logarithmic(scale_factor)

Creates an object representing a logarithmic axis.

Default: 1.1

Parameters:

scale_factor – The scale factor setting the maximum factor between two calculated values, must be larger than 1.0.

Property Summary
Method Summary
get_type()

Convenience method for getting axis type.

Returns:

The type

static linear()

Creates an object for configuring a linear calculation axis.

Default: A minimum number of 40 steps.

Note

The returned object can be configured regarding the maximum step size or the minimum number of steps on the axis.

Returns:

A new Linear object

static logarithmic()

Creates an object for configuring a logarithmic calculation axis.

Default: A scale factor of 1.1

Note

The returned object can be configured regarding the scale factor.

Returns:

A new Logarithmic object

set_scale_factor(scale_factor)

Sets the scale factor.

Default: 1.1

Parameters:

scale_factor – The scale factor setting the maximum factor between two calculated values, must be larger than 1.0

Returns:

This Logarithmic object

class tc_toolbox.step_or_map_diagrams.PhaseDiagramCalculation

Configuration for a phase diagram calculation.

Note

Specify the conditions, the calculation is performed with calculate().

Constructor Summary
PhaseDiagramCalculation(back)

Call base constructor: tc_toolbox.step_or_map_diagrams.AbstractPhaseDiagramCalculation.

Method Summary
add_initial_equilibrium(initial_equilibrium)

Add initial equilibrium start points from which a phase diagram is calculated.

Scans along the axis variables and generates start points when the scan procedure crosses a phase boundary.

It may take a little longer to execute than using the minimum number of start points, as some lines may be calculated more than once. But the core remembers all node points and subsequently stops calculations along a line when it finds a known node point.

It is also possible to create a sequence of start points from one initial equilibria.

Parameters:

initial_equilibrium – The initial equilibrium

Returns:

This PhaseDiagramCalculation object

calculate(keep_previous_results, timeout_in_minutes)

Performs the phase diagram calculation.

Warning

If you use keep_previous_results=True, you must not use another calculator or even get results in between the calculations using calculate(). Then the previous results will actually be lost.

Parameters:
  • keep_previous_results – If True, results from any previous call to this method are appended. This can be used to combine calculations with multiple start points if the mapping fails at a certain condition.

  • timeout_in_minutes – Used to prevent the calculation from running longer than what is wanted, or from hanging. If the calculation runs longer than timeout_in_minutes, a UnrecoverableCalculationException will be thrown, the current TCPython-block will be unusable and a new TCPython block must be created for further calculations.

Returns:

A new PhaseDiagramResult object which later can be used to get specific values from the calculated result.

disable_global_minimization()

Disables global minimization.

Default: Enabled

Returns:

This PhaseDiagramCalculation object

dont_keep_default_equilibria()

Do not keep the initial equilibria added by default.

This is only relevant in combination with add_initial_equilibrium().

This is the default behavior.

Returns:

This PhaseDiagramCalculation object

enable_global_minimization()

Enables global minimization.

Default: Enabled

Returns:

This PhaseDiagramCalculation object

get_components()

Returns the names of the components in the system (including all components auto-selected by the database(s)).

Returns:

The component names

get_configuration_as_string()

Returns detailed information about the current state of the calculation object.

Warning

The structure of the calculator objects is an implementation detail and might change between releases without notice. Therefore do not rely on the internal object structure.

get_gibbs_energy_addition_for(phase)

Used to get the additional energy term (always being a constant) of a given phase. The value given is added to the Gibbs energy of the (stoichiometric or solution) phase. It can represent a nucleation barrier, surface tension, elastic energy, etc.

It is not composition-, temperature- or pressure-dependent.

Parameters:

phase – Specify the name of the (stoichiometric or solution) phase with the addition

Returns:

Gibbs energy addition to G per mole formula unit.

get_system_data()

Returns the content of the database for the currently loaded system. This can be used to modify the parameters and functions and to change the current system by using with_system_modifications().

Note

Parameters can only be read from unencrypted (i.e. user) databases loaded as *.tdb-file.

Returns:

The system data

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.

keep_default_equilibria()

Keep the initial equilibria added by default. This is only relevant in combination with add_initial_equilibrium().

Default behavior is to not keep default equilibria.

Returns:

This PhaseDiagramCalculation object

remove_all_conditions()

Removes all set conditions.

Returns:

This PhaseDiagramCalculation object

remove_all_initial_equilibria()

Removes all previously added initial equilibria.

Returns:

This PhaseDiagramCalculation object

remove_condition(quantity)

Removes the specified condition.

Parameters:

quantity – The thermodynamic quantity to set as condition; a Console Mode syntax string can be used as an alternative (for example X(Cr))

Returns:

This ThermodynamicCalculation object

run_poly_command(command)

Runs a Thermo-Calc command from the Console Mode POLY module immediately in the engine.

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 Thermo-Calc Console Mode command

Returns:

This PhaseDiagramCalculation object

set_condition(quantity, value)

Sets the specified condition.

Parameters:
  • quantity – The thermodynamic quantity to set as condition; a Console Mode syntax string can be used as an alternative (for example X(Cr))

  • value – The value of the condition

Returns:

This PhaseDiagramCalculation object

set_gibbs_energy_addition_for(phase, gibbs_energy)

Used to specify the additional energy term (always being a constant) of a given phase. The value (gibbs_energy) given is added to the Gibbs energy of the (stoichiometric or solution) phase. It can represent a nucleation barrier, surface tension, elastic energy, etc.

It is not composition-, temperature- or pressure-dependent.

Parameters:
  • phase – Specify the name of the (stoichiometric or solution) phase with the addition

  • gibbs_energy – Addition to G per mole formula unit

Returns:

This PhaseDiagramCalculation object

set_phase_to_dormant(phase)

Sets the phase to the status DORMANT, necessary for calculating the driving force to form the specified phase.

Parameters:

phase – The phase name or ALL_PHASES for all phases

Returns:

This PhaseDiagramCalculation object

set_phase_to_entered(phase, amount)

Sets the phase to the status ENTERED, that is the default state.

Parameters:
  • phase – The phase name or ALL_PHASES for all phases

  • amount – The phase fraction (between 0.0 and 1.0)

Returns:

This PhaseDiagramCalculation object

set_phase_to_fixed(phase, amount)

Sets the phase to the status FIXED, i.e. it is guaranteed to have the specified phase fraction after the calculation.

Parameters:
  • phase – The phase name

  • amount – The fixed phase fraction (between 0.0 and 1.0)

Returns:

This PhaseDiagramCalculation object

set_phase_to_suspended(phase)

Sets the phase to the status SUSPENDED, i.e. it is ignored in the calculation.

Parameters:

phase – The phase name or ALL_PHASES for all phases

Returns:

This PhaseDiagramCalculation object

with_first_axis(axis)

Sets the first calculation axis.

Parameters:

axis – The axis

Returns:

This PhaseDiagramCalculation object

with_options(options)

Sets the simulation options.

Parameters:

options – The simulation options

Returns:

This PhaseDiagramCalculation object

with_reference_state(component, phase, temperature, pressure)

The reference state for a component is important when calculating activities, chemical potentials and enthalpies and is determined by the database being used. For each component the data must be referred to a selected phase, temperature and pressure, i.e. the reference state.

All data in all phases where this component dissolves must use the same reference state. However, different databases can use different reference states for the same element/component. It is important to be careful when combining data obtained from different databases.

By default, activities, chemical potentials and so forth are computed relative to the reference state used by the database. If the reference state in the database is not suitable for your purposes, use this command to set the reference state for a component using SER, i.e. the Stable Element Reference (which is usually set as default for a major component in alloys dominated by the component). In such cases, the temperature and pressure for the reference state is not needed.

For a phase to be usable as a reference for a component, the component needs to have the same composition as an end member of the phase. The reference state is an end member of a phase. The selection of the end member associated with the reference state is only performed once this command is executed.

If a component has the same composition as several end members of the chosen reference phase, then the end member that is selected at the specified temperature and pressure will have the lowest Gibbs energy.

Parameters:
  • component – The name of the element must be given.

  • phase – Name of a phase used as the new reference state. Or SER for the Stable Element Reference.

  • temperature – The Temperature (in K) for the reference state. Or CURRENT_TEMPERATURE which means that the current temperature is used at the time of evaluation of the reference energy for the calculation.

  • pressure – The Pressure (in Pa) for the reference state.

Returns:

This PhaseDiagramCalculation object

with_second_axis(axis)

Sets the second calculation axis.

Parameters:

axis – The axis

Returns:

This PhaseDiagramCalculation object

with_system_modifications(system_modifications)

Updates the system of this calculator with the supplied system modification (containing new phase parameters and system functions).

Note

This is only possible if the system has been read from unencrypted (i.e. user) databases loaded as a *.tdb-file.

Parameters:

system_modifications – The system modification to be performed

Returns:

This PhaseDiagramCalculation object

class tc_toolbox.step_or_map_diagrams.PhaseDiagramOptions

Simulation options for phase diagram calculations.

Constructor Summary
PhaseDiagramOptions()

Simulation options for the phase diagram calculations. Constructs an instance of PhaseDiagramOptions.

Property Summary
Method Summary
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 PhaseDiagramOptions object

disable_control_step_size_during_minimization()

Disables stepsize control during minimization (non-global).

Default: Enabled

Returns:

This PhaseDiagramOptions 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 PhaseDiagramOptions object

dont_use_auto_start_points()

Switches the usage of automatic starting points for the mapping off.

Default: Switched on

Returns:

This PhaseDiagramOptions object

dont_use_inside_mesh_points()

Switches the usage of inside meshing points for the mapping off.

Default: Switched off

Returns:

This PhaseDiagramOptions 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 PhaseDiagramOptions object

enable_control_step_size_during_minimization()

Enables stepsize control during normal minimization (non-global).

Default: Enabled

Returns:

This PhaseDiagramOptions 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 PhaseDiagramOptions 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 PhaseDiagramOptions object

set_global_minimization_test_interval(global_test_interval)

Sets the interval for the global test.

Default: 0

Parameters:

global_test_interval – The global test interval

Returns:

This PhaseDiagramOptions object

set_max_no_of_iterations(max_no_of_iterations)

Set the maximum number of iterations.

Default: max. 500 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 PhaseDiagramOptions object

set_no_of_mesh_along_axis(no_of_mesh_along_axis)

Sets the number of meshes along an axis for the mapping.

Default: 3

Parameters:

no_of_mesh_along_axis – The number of meshes

Returns:

This PhaseDiagramOptions 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 PhaseDiagramOptions 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-12 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 PhaseDiagramOptions object

use_auto_start_points()

Switches the usage of automatic starting points for the mapping on.

Default: Switched on

Returns:

This PhaseDiagramOptions object

use_inside_mesh_points()

Switches the usage of inside meshing points for the mapping off.

Default: Switched off

Returns:

This PhaseDiagramOptions object

class tc_toolbox.step_or_map_diagrams.PhaseDiagramResult

Result of a phase diagram calculation, it can be evaluated using quantities or Console Mode syntax.

Constructor Summary
PhaseDiagramResult(back)

Call base constructor: tc_toolbox.AbstractResult.

Method Summary
add_coordinate_for_phase_label(x, y)

Sets a coordinate in the result plot for which the stable phases will be evaluated and provided in the result data object. This can be used to plot the phases of a region into the phase diagram or just to programmatically evaluate the phases in certain regions.

Warning

This method takes coordinates of the plot axes and not of the calculation axis.

Parameters:
  • x – The coordinate of the first plot axis (“x-axis”) [unit of the plot axis]

  • y – The coordinate of the second plot axis (“y-axis”) [unit of the plot axis]

Returns:

This PhaseDiagramResult object

get_values_grouped_by_quantity_of(x_quantity, y_quantity)

Returns x-y-line data grouped by the multiple datasets of the specified quantities (for example in dependency of components). The available quantities can be found in the documentation of the factory class ThermodynamicQuantity. Usually the result data represents the phase diagram.

Note

The different datasets will contain NaN-values between different subsections and are not sorted (because they are unsortable due to their nature).

Note

Its possible to use functions as axis variables, either by using ThermodynamicQuantity.user_defined_function, or by using an expression that contains ‘=’.

Parameters:
  • x_quantity – The first quantity (“x-axis”), Console Mode syntax strings can be used as an alternative (for example ‘T’), or even a function (for example ‘f=T*1.01’)

  • y_quantity – The second quantity (“y-axis”), Console Mode syntax strings can be used as an alternative (for example ‘NV’), or even a function (for example ‘CP=HM.T’)

Returns:

The phase diagram data

get_values_grouped_by_stable_phases_of(x_quantity, y_quantity)

Returns x-y-line data grouped by the sets of “stable phases” (for example “LIQUID” or “LIQUID + FCC_A1”). The available quantities can be found in the documentation of the factory class ThermodynamicQuantity. Usually the result data represents the phase diagram.

Note

The different datasets will contain NaN-values between different subsections and are not sorted (because they are unsortable due to their nature).

Note

Its possible to use functions as axis variables, either by using ThermodynamicQuantity.user_defined_function, or by using an expression that contains ‘=’.

Parameters:
  • x_quantity – The first quantity (“x-axis”), Console Mode syntax strings can be used as an alternative (for example ‘T’), or even a function (for example ‘f=T*1.01’)

  • y_quantity – The second quantity (“y-axis”), Console Mode syntax strings can be used as an alternative (for example ‘NV’), or even a function (for example ‘CP=HM.T’)

Returns:

The phase diagram data

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.

remove_phase_labels()

Erases all added coordinates for phase labels.

Returns:

This PhaseDiagramResult object

save_to_disk(path)

Saves the result to disc. Note that a result is a folder, containing potentially many files. The result can later be loaded with load_result_from_disk()

Parameters:

path – the path to the folder you want the result to be saved in. It can be relative or absolute.

Returns:

this PhaseDiagramResult object

set_phase_name_style(phase_name_style_enum)

Sets the style of the phase name labels that will be used in the result data object (constitution description, ordering description, …).

Default: PhaseNameStyle.NONE

Parameters:

phase_name_style_enum – The phase name style

Returns:

This PhaseDiagramResult object

class tc_toolbox.step_or_map_diagrams.PhaseDiagramResultValues

Represents the data of a phase diagram.

Constructor Summary
PhaseDiagramResultValues(back)

Constructs an instance of PhaseDiagramResultValues.

Property Summary
Method Summary
get_invariants()

Returns the x- and y-datasets of all invariants in the phase diagram.

Note

The datasets will normally contain different sections separated by NaN-values.

Returns:

The invariants dataset object

get_lines()

Returns the x- and y-datasets of all phase boundaries in the phase diagram.

Note

The datasets will normally contain different sections separated by NaN-values.

Returns:

Containing the phase boundary datasets with the quantities or stable phases as keys (depending on the used method to get the values)

get_phase_labels()

Returns the phase labels added for certain coordinates using PhaseDiagramResult.add_coordinate_for_phase_label().

Returns:

The list with the phase label data (that contains plot coordinates and stable phases)

get_tie_lines()

Returns the x- and y-datasets of all tie-lines in the phase diagram.

Note

The datasets will normally contain different sections separated by NaN-values.

Returns:

The tie-line dataset object

class tc_toolbox.step_or_map_diagrams.PhaseLabel

Represents a phase label at a plot coordinate, i.e. the stable phases that are present at that plot coordinate.

Constructor Summary
PhaseLabel(back)

Constructs an instance of PhaseLabel.

Property Summary
Method Summary
get_text()

Accessor for the phase label :return: the phase label

get_x()

Accessor for the x-value :return: the x value

get_y()

Accessor for the y-value :return: the y value

class tc_toolbox.step_or_map_diagrams.PhaseNameStyle

The style of the phase names used in the labels.

class tc_toolbox.step_or_map_diagrams.PropertyDiagramCalculation

Abstract configuration required for a property diagram calculation.

Note

This is an abstract class that cannot be used directly.

Constructor Summary
PropertyDiagramCalculation(back)

Call base constructor: tc_toolbox.step_or_map_diagrams.AbstractPropertyDiagramCalculation.

Method Summary
calculate(keep_previous_results, timeout_in_minutes)

Performs the property diagram calculation.

Warning

If you use keep_previous_results=True, you must not use another calculator or even get results in between the calculations using calculate(). Then the previous results will actually be lost.

Parameters:
  • keep_previous_results – If True, results from any previous call to this method are appended. This can be used to combine calculations with multiple start points if the stepping fails at a certain condition.

  • timeout_in_minutes – Used to prevent the calculation from running longer than what is wanted, or from hanging. If the calculation runs longer than timeout_in_minutes, a UnrecoverableCalculationException will be thrown, the current TCPython-block will be unusable and a new TCPython block must be created for further calculations.

Returns:

A new PropertyDiagramResult object which later can be used to get specific values from the calculated result

disable_global_minimization()

Disables global minimization.

Default: Enabled

Returns:

This PropertyDiagramCalculation object

disable_step_separate_phases()

Disables step separate phases. This is the default setting.

Returns:

This PropertyDiagramCalculation object

enable_global_minimization()

Enables global minimization.

Default: Enabled

Returns:

This PropertyDiagramCalculation object

enable_step_separate_phases()

Enables step separate phases.

Default: By default separate phase stepping is disabled

Note

This is an advanced option, it is used mostly to calculate how the Gibbs energy for a number of phases varies for different compositions. This is particularly useful to calculate Gibbs energies for complex phases with miscibility gaps and for an ordered phase that is never disordered (e.g. SIGMA-phase, G-phase, MU-phase, etc.).

Returns:

This PropertyDiagramCalculation object

get_components()

Returns the names of the components in the system (including all components auto-selected by the database(s)).

Returns:

The component names

get_configuration_as_string()

Returns detailed information about the current state of the calculation object.

Warning

The structure of the calculator objects is an implementation detail and might change between releases without notice. Therefore do not rely on the internal object structure.

get_gibbs_energy_addition_for(phase)

Used to get the additional energy term (always being a constant) of a given phase. The value given is added to the Gibbs energy of the (stoichiometric or solution) phase. It can represent a nucleation barrier, surface tension, elastic energy, etc.

It is not composition-, temperature- or pressure-dependent.

Parameters:

phase – Specify the name of the (stoichiometric or solution) phase with the addition

Returns:

Gibbs energy addition to G per mole formula unit.

get_system_data()

Returns the content of the database for the currently loaded system. This can be used to modify the parameters and functions and to change the current system by using with_system_modifications().

Note

Parameters can only be read from unencrypted (i.e. user) databases loaded as *.tdb-file.

Returns:

The system data

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.

remove_all_conditions()

Removes all set conditions.

Returns:

This PropertyDiagramCalculation object

remove_condition(quantity)

Removes the specified condition.

Parameters:

quantity – The thermodynamic quantity to set as condition; a Console Mode syntax string can be used as an alternative (for example X(Cr))

Returns:

This PropertyDiagramCalculation object

run_poly_command(command)

Runs a Thermo-Calc command from the Console Mode POLY module immediately in the engine.

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 Thermo-Calc Console Mode command

Returns:

This PropertyDiagramCalculation object

set_condition(quantity, value)

Sets the specified condition.

Parameters:
  • quantity – The thermodynamic quantity to set as condition; a Console Mode syntax string can be used as an alternative (for example X(Cr))

  • value – The value of the condition

Returns:

This PropertyDiagramCalculation object

set_gibbs_energy_addition_for(phase, gibbs_energy)

Used to specify the additional energy term (always being a constant) of a given phase. The value (gibbs_energy) given is added to the Gibbs energy of the (stoichiometric or solution) phase. It can represent a nucleation barrier, surface tension, elastic energy, etc.

It is not composition-, temperature- or pressure-dependent.

Parameters:
  • phase – Specify the name of the (stoichiometric or solution) phase with the addition

  • gibbs_energy – Addition to G per mole formula unit

Returns:

This PropertyDiagramCalculation object

set_phase_to_dormant(phase)

Sets the phase to the status DORMANT, necessary for calculating the driving force to form the specified phase.

Parameters:

phase – The phase name or ALL_PHASES for all phases

Returns:

This PropertyDiagramCalculation object

set_phase_to_entered(phase, amount)

Sets the phase to the status ENTERED, that is the default state.

Parameters:
  • phase – The phase name or ALL_PHASES for all phases

  • amount – The phase fraction (between 0.0 and 1.0)

Returns:

This PropertyDiagramCalculation object

set_phase_to_fixed(phase, amount)

Sets the phase to the status FIXED, i.e. it is guaranteed to have the specified phase fraction after the calculation.

Parameters:
  • phase – The phase name

  • amount – The fixed phase fraction (between 0.0 and 1.0)

Returns:

This PropertyDiagramCalculation object

set_phase_to_suspended(phase)

Sets the phase to the status SUSPENDED, i.e. it is ignored in the calculation.

Parameters:

phase – The phase name or ALL_PHASES for all phases

Returns:

This PropertyDiagramCalculation object

with_axis(axis)

Sets the calculation axis.

Parameters:

axis – The axis

Returns:

This PropertyDiagramCalculation object

with_options(options)

Sets the simulation options.

Parameters:

options – The simulation options

Returns:

This PropertyDiagramCalculation object

with_reference_state(component, phase, temperature, pressure)

The reference state for a component is important when calculating activities, chemical potentials and enthalpies and is determined by the database being used. For each component the data must be referred to a selected phase, temperature and pressure, i.e. the reference state.

All data in all phases where this component dissolves must use the same reference state. However, different databases can use different reference states for the same element/component. It is important to be careful when combining data obtained from different databases.

By default, activities, chemical potentials and so forth are computed relative to the reference state used by the database. If the reference state in the database is not suitable for your purposes, use this command to set the reference state for a component using SER, i.e. the Stable Element Reference (which is usually set as default for a major component in alloys dominated by the component). In such cases, the temperature and pressure for the reference state is not needed.

For a phase to be usable as a reference for a component, the component needs to have the same composition as an end member of the phase. The reference state is an end member of a phase. The selection of the end member associated with the reference state is only performed once this command is executed.

If a component has the same composition as several end members of the chosen reference phase, then the end member that is selected at the specified temperature and pressure will have the lowest Gibbs energy.

Parameters:
  • component – The name of the element must be given.

  • phase – Name of a phase used as the new reference state. Or SER for the Stable Element Reference.

  • temperature – The Temperature (in K) for the reference state. Or CURRENT_TEMPERATURE which means that the current temperature is used at the time of evaluation of the reference energy for the calculation.

  • pressure – The Pressure (in Pa) for the reference state.

Returns:

This PropertyDiagramCalculation object

with_system_modifications(system_modifications)

Updates the system of this calculator with the supplied system modification (containing new phase parameters and system functions).

Note

This is only possible if the system has been read from unencrypted (i.e. user) databases loaded as a *.tdb-file.

Parameters:

system_modifications – The system modification to be performed

Returns:

This PropertyDiagramCalculation object

class tc_toolbox.step_or_map_diagrams.PropertyDiagramOptions

Simulation options for the property diagram calculations.

Constructor Summary
PropertyDiagramOptions()

Simulation options for property diagram calculations. Constructs an instance of PropertyDiagramOptions.

Property Summary
Method Summary
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 PropertyDiagramOptions object

disable_control_step_size_during_minimization()

Disables stepsize control during minimization (non-global).

Default: Enabled

Returns:

This PropertyDiagramOptions 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 PropertyDiagramOptions 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 PropertyDiagramOptions object

enable_control_step_size_during_minimization()

Enables stepsize control during normal minimization (non-global).

Default: Enabled

Returns:

This PropertyDiagramOptions 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 PropertyDiagramOptions 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 PropertyDiagramOptions object

set_global_minimization_test_interval(global_test_interval)

Sets the interval for the global test.

Default: 0

Parameters:

global_test_interval – The global test interval

Returns:

This PropertyDiagramOptions object

set_max_no_of_iterations(max_no_of_iterations)

Set the maximum number of iterations.

Default: max. 500 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 PropertyDiagramOptions 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 PropertyDiagramOptions 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-12 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 PropertyDiagramOptions object

class tc_toolbox.step_or_map_diagrams.PropertyDiagramResult

Result of a property diagram. This can be used to query for specific values.

Constructor Summary
PropertyDiagramResult(back)

Call base constructor: tc_toolbox.AbstractResult.

Method Summary
get_values_grouped_by_quantity_of(x_quantity, y_quantity, sort_and_merge)

Returns x-y-line data grouped by the multiple datasets of the specified quantities (typically the phases). The available quantities can be found in the documentation of the factory class ThermodynamicQuantity.

Note

The different datasets might contain NaN-values between different subsections and might not be sorted even if the flag `sort_and_merge` has been set (because they might be unsortable due to their nature).

Note

Its possible to use functions as axis variables, either by using ThermodynamicQuantity.user_defined_function, or by using an expression that contains ‘=’.

Parameters:
  • x_quantity – The first quantity (“x-axis”), Console Mode syntax strings can be used as an alternative (for example ‘T’), or even a function (for example ‘f=T*1.01’)

  • y_quantity – The second quantity (“y-axis”), Console Mode syntax strings can be used as an alternative (for example ‘NV’), or even a function (for example ‘CP=HM.T’)

  • sort_and_merge – If True, the data is sorted and merged into as few subsections as possible (divided by NaN)

Returns:

Containing the datasets with the quantities as their keys

get_values_grouped_by_stable_phases_of(x_quantity, y_quantity, sort_and_merge)

Returns x-y-line data grouped by the sets of “stable phases” (for example “LIQUID” or “LIQUID + FCC_A1”). The available quantities can be found in the documentation of the factory class ThermodynamicQuantity.

Note

The different datasets might contain NaN-values between different subsections and different lines of an ambiguous dataset. They might not be sorted even if the flag `sort_and_merge` has been set (because they might be unsortable due to their nature).

Note

Its possible to use functions as axis variables, either by using ThermodynamicQuantity.user_defined_function, or by using an expression that contains ‘=’.

Parameters:
  • x_quantity – The first quantity (“x-axis”), Console Mode syntax strings can be used as an alternative (for example ‘T’), or even a function (for example ‘f=T*1.01’)

  • y_quantity – The second quantity (“y-axis”), Console Mode syntax strings can be used as an alternative (for example ‘NV’), or even a function (for example ‘CP=HM.T’)

  • sort_and_merge – If True, the data will be sorted and merged into as few subsections as possible (divided by NaN)

Returns:

Containing the datasets with the quantities as their keys

get_values_of(x_quantity, y_quantity)

Returns sorted x-y-line data without any separation. Use get_values_grouped_by_quantity_of() or get_values_grouped_by_stable_phases_of() instead if you need such a separation. The available quantities can be found in the documentation of the factory class ThermodynamicQuantity.

Note

This method will always return sorted data without any NaN-values. If it is unsortable that might give data that is hard to interpret. In such a case you need to choose the quantity in another way or use one of the other methods. One example of this is to use quantities with All-markers, for example MassFractionOfAComponent(“All”).

Note

Its possible to use functions as axis variables, either by using ThermodynamicQuantity.user_defined_function, or by using an expression that contains ‘=’.

Parameters:
  • x_quantity – The first Thermodynamic quantity (“x-axis”), Console Mode syntax strings can be used as an alternative (for example ‘T’) or even a function (for example ‘f=T*1.01’)

  • y_quantity – The second Thermodynamic quantity (“y-axis”), Console Mode syntax strings can be used as an alternative (for example ‘NV’), or even a function (for example ‘CP=HM.T’)

Returns:

A tuple containing the x- and y-data in lists

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.

save_to_disk(path)

Saves the result to disc. Note that a result is a folder, containing potentially many files. The result can later be loaded with load_result_from_disk()

Parameters:

path – the path to the folder you want the result to be saved in. It can be relative or absolute.

Returns:

this PropertyDiagramResult object

set_phase_name_style(phase_name_style_enum)

Sets the style of the phase name labels that will be used in the result data object (constitution description, ordering description, …).

Default: PhaseNameStyle.NONE

Parameters:

phase_name_style_enum – The phase name style

Returns:

This PropertyDiagramResult object