Package “diffusion”

class +tc_toolbox.+diffusion.AbstractBoundaryCondition

The abstract base class for all boundary conditions.

class +tc_toolbox.+diffusion.AbstractCalculatedGrid

The abstract base class for calculated grids.

class +tc_toolbox.+diffusion.AbstractElementProfile

The abstract base class for all initial composition profile types.

class +tc_toolbox.+diffusion.AbstractGrid

The abstract base class for all grids.

class +tc_toolbox.+diffusion.AbstractSolver

Abstract base class for the solvers (Classic, Homogenization and Automatic).

class +tc_toolbox.+diffusion.ActivityFluxFunction

Contains factory methods for the the different boundary conditions available.

ActivityFluxFunction()

Represents a boundary having a activity flux function.

This types of boundary conditions is used to take into account the finite rate of a surface reaction.

The flux for the independent components must be given in the format:

J = f(T,P,TIME) * ( ACTIVITY^N - g(T,P,TIME) )

where f and g may be functions of time (TIME), temperature (T), and pressure (P), and N is an integer.

f and g must be expressed in DICTRA Console Mode syntax.

Note

The activities are those with user-defined reference states. The function mass transfer coefficient is the mass transfer coefficient, activity of the corresponding species in the gas is the activity of the corresponding species in the gas and N is a stoichiometric coefficient.

Note

For more details see L. Sproge and J. Ågren, “Experimental and theoretical studies of gas consumption in the gas carburizing process” J. Heat Treat. 6, 9–19 (1988).

Constructs an instance of ActivityFluxFunction.

static activity_flux_function()

Factory method that creates a new activity-flux-function boundary condition.

This type of boundary condition is used to take into account the finite rate of a surface reaction.

The flux for the independent components must be given in the format:

J = f(T,P,TIME) * ( ACTIVITY^N - g(T,P,TIME) )

where f and g may be functions of time (TIME), temperature (T), and pressure (P), and N is an integer.

f and g must be expressed in DICTRA Console Mode syntax.

Note

The activities are those with user-defined reference states. The function mass transfer coefficient is the mass transfer coefficient, activity of the corresponding species in the gas is the activity of the corresponding species in the gas and N is a stoichiometric coefficient.

Note

For more details see L. Sproge and J. Ågren, “Experimental and theoretical studies of gas consumption in the gas carburizing process” J. Heat Treat. 6, 9–19 (1988).

Returns:

A new ActivityFluxFunction object

static closed_system()

Factory method that creates a new closed-system boundary condition.

Returns:

A new ClosedSystem object

static fix_flux_value()

Factory method that creates a new fix-flux-value boundary condition.

This type of boundary condition makes it possible to enter functions that yield the flux times the molar volume for the independent components. May be a function of time, temperature and pressure: J(T,P,TIME).

Returns:

A new FixFluxValue object

static fixed_compositions(unit_enum)

Factory method that creates a new fixed-composition boundary condition.

Parameters:

unit_enum – The composition unit

Returns:

A new FixedCompositions object

get_type()

The type of the boundary condition.

Returns:

The type

static mixed_zero_flux_and_activity()

Factory method that creates a new mixed zero-flux and activity boundary condition

Returns:

A new MixedZeroFluxAndActivity object

set_flux_function(element_name, f, g, n, to_time)

The flux for the independent components must be given in the format:

J = f(T,P,TIME) * ( ACTIVITY^N - g(T,P,TIME) )

where f and g may be functions of time (TIME), temperature (T), and pressure (P), and N is an integer.

f and g must be expressed in DICTRA Console Mode syntax.

Parameters:
  • element_name – The name of the element

  • f – the function f in the formula above

  • g – the function g in the formula above

  • n – the constant N in the formula above

  • to_time – The max-time for which the flux function is used.

class +tc_toolbox.+diffusion.AutomaticSolver

Solver using the homogenization model if any region has more than one phase, otherwise using the classic model.

Note

This is the default solver and recommended for most applications.

AutomaticSolver()

Solver using the homogenization model if any region has more than one phase, otherwise using the classic model.

Note

This is the default solver and recommended for most applications.

Constructs an instance of AutomaticSolver.

static automatic()

Factory method that creates a new automatic solver. This is the default solver and recommended for most applications.

Note

This solver uses the homogenization model if any region has more than one phase, otherwise it uses the classic model.

Returns:

A new AutomaticSolver object

static classic()

Factory method that creates a new classic solver.

Note

This solver never switches to the homogenization model even if the solver fails to converge. Use the +tc_toolbox.diffusion.AutomaticSolver if necessary instead.

Returns:

A new ClassicSolver object

get_type()

The type of the solver.

Returns:

The type

static homogenization()

Factory method that creates a new homogenization solver.

Note

This solver always uses the homogenization model, even if all regions have only one phase. The solver is significantly slower than the Classic model. Use the +tc_toolbox.diffusion.AutomaticSolver instead if you do not need that behavior.

Returns:

A new HomogenizationSolver object

set_flux_balance_equation_accuracy(accuracy)

Only valid if the :class:`ClassicSolver` is actually used (i.e. not more than one phase in each region).

Sets the required accuracy during the solution of the flux balance equations. Default: 1.0e-16

Parameters:

accuracy – The required accuracy

Returns:

A new AutomaticSolver object

set_tieline_search_variable_to_activity()

Only valid if the :class:`ClassicSolver` is actually used (i.e. not more than one phase in each region).

Configures the solver to use the activity of a component to find the correct tie-line at the phase interface. Either activity or chemical potential are applied to reduce the degrees of freedom at the local equilibrium. Default: This is the default setting

Returns:

A new AutomaticSolver object

set_tieline_search_variable_to_potential()

Only valid if the :class:`ClassicSolver` is actually used (i.e. not more than one phase in each region).

Configures the solver to use the chemical potential of a component to find the correct tie-line at the phase interface. Either activity or chemical potential are applied to reduce the degrees of freedom at the local equilibrium. Default: To use the activity

Returns:

A new AutomaticSolver object

class +tc_toolbox.+diffusion.BoundaryCondition

Contains factory methods for the the different boundary conditions available.

static activity_flux_function()

Factory method that creates a new activity-flux-function boundary condition.

This type of boundary condition is used to take into account the finite rate of a surface reaction.

The flux for the independent components must be given in the format:

J = f(T,P,TIME) * ( ACTIVITY^N - g(T,P,TIME) )

where f and g may be functions of time (TIME), temperature (T), and pressure (P), and N is an integer.

f and g must be expressed in DICTRA Console Mode syntax.

Note

The activities are those with user-defined reference states. The function mass transfer coefficient is the mass transfer coefficient, activity of the corresponding species in the gas is the activity of the corresponding species in the gas and N is a stoichiometric coefficient.

Note

For more details see L. Sproge and J. Ågren, “Experimental and theoretical studies of gas consumption in the gas carburizing process” J. Heat Treat. 6, 9–19 (1988).

Returns:

A new ActivityFluxFunction object

static closed_system()

Factory method that creates a new closed-system boundary condition.

Returns:

A new ClosedSystem object

static fix_flux_value()

Factory method that creates a new fix-flux-value boundary condition.

This type of boundary condition makes it possible to enter functions that yield the flux times the molar volume for the independent components. May be a function of time, temperature and pressure: J(T,P,TIME).

Returns:

A new FixFluxValue object

static fixed_compositions(unit_enum)

Factory method that creates a new fixed-composition boundary condition.

Parameters:

unit_enum – The composition unit

Returns:

A new FixedCompositions object

static mixed_zero_flux_and_activity()

Factory method that creates a new mixed zero-flux and activity boundary condition

Returns:

A new MixedZeroFluxAndActivity object

class +tc_toolbox.+diffusion.CalculatedGrid

Factory class for grids generated by a mathematical series (linear, geometric, …). Use +tc_toolbox.diffusion.PointByPointGrid instead if you want to use an existing grid from experimental data or a previous calculation.

Note

A region must contain a number of grid points. The composition is only known at these grid points and the software assumes that the composition varies linearly between them. The amount and composition of all the phases present at a single grid point in a certain region are those given by thermodynamic equilibrium keeping the over-all composition at the grid point fixed.

static double_geometric(no_of_points, lower_geometrical_factor, upper_geometrical_factor)

Factory method that creates a new double geometric grid.

Note

Double geometric grids have a high number of grid points in the middle or at both ends of a region. One geometrical factor for the lower (left) and upper (right) half of the region need to specified. In both cases a geometrical factor of larger than one yields a higher density of grid points at the lower end of the half and vice versa for a factor smaller than one.

Parameters:
  • no_of_points – The number of points

  • lower_geometrical_factor – The geometrical factor for the left half

  • upper_geometrical_factor – The geometrical factor for the right half

Returns:

A new DoubleGeometricGrid object

static geometric(no_of_points, geometrical_factor)

Factory method that creates a new geometric grid.

Note

A grid that yields a varying density of grid points in the region. A geometrical factor larger than one yields a higher density of grid points at the lower end of the region and a factor smaller than one yields a higher density of grid points at the upper end of the region.

Parameters:
  • no_of_points – The number of points

  • geometrical_factor – The geometrical factor

Returns:

A new GeometricGrid object

static linear(no_of_points)

Factory method that creates a new equally spaced grid.

Parameters:

no_of_points – The number of points

Returns:

A new LinearGrid object

class +tc_toolbox.+diffusion.ClassicSolver

Solver using the Classic model.

Note

This solver never switches to the homogenization model even if it fails to converge. Use the +tc_toolbox.diffusion.AutomaticSolver if necessary instead.

ClassicSolver()

Solver using the Classic model.

Note

This solver never switches to the homogenization model even though the solver fails to converge. Use the +tc_toolbox.diffusion.AutomaticSolver if necessary instead.

Constructs an instance of ClassicSolver.

static automatic()

Factory method that creates a new automatic solver. This is the default solver and recommended for most applications.

Note

This solver uses the homogenization model if any region has more than one phase, otherwise it uses the classic model.

Returns:

A new AutomaticSolver object

static classic()

Factory method that creates a new classic solver.

Note

This solver never switches to the homogenization model even if the solver fails to converge. Use the +tc_toolbox.diffusion.AutomaticSolver if necessary instead.

Returns:

A new ClassicSolver object

get_type()

Convenience method for getting the type of the solver.

Returns:

The type of the solver

static homogenization()

Factory method that creates a new homogenization solver.

Note

This solver always uses the homogenization model, even if all regions have only one phase. The solver is significantly slower than the Classic model. Use the +tc_toolbox.diffusion.AutomaticSolver instead if you do not need that behavior.

Returns:

A new HomogenizationSolver object

set_flux_balance_equation_accuracy(accuracy)

Sets the required accuracy during the solution of the flux balance equations. Default: 1.0e-16

Parameters:

accuracy – The required accuracy

Returns:

A new ClassicSolver object

set_tieline_search_variable_to_activity()

Configures the solver to use the activity of a component to find the correct tie-line at the phase interface. Either activity or chemical potential are applied to reduce the degrees of freedom at the local equilibrium. Default: This is the default setting

set_tieline_search_variable_to_potential()

Configures the solver to use the chemical potential of a component to find the correct tie-line at the phase interface. Either activity or chemical potential are applied to reduce the degrees of freedom at the local equilibrium. Default: To use the activity

Returns:

A new ClassicSolver object

class +tc_toolbox.+diffusion.ClosedSystem

Represents a boundary for a closed system.

ClosedSystem()

Represents a boundary for a closed system. Constructs an instance of ClosedSystem.

static activity_flux_function()

Factory method that creates a new activity-flux-function boundary condition.

This type of boundary condition is used to take into account the finite rate of a surface reaction.

The flux for the independent components must be given in the format:

J = f(T,P,TIME) * ( ACTIVITY^N - g(T,P,TIME) )

where f and g may be functions of time (TIME), temperature (T), and pressure (P), and N is an integer.

f and g must be expressed in DICTRA Console Mode syntax.

Note

The activities are those with user-defined reference states. The function mass transfer coefficient is the mass transfer coefficient, activity of the corresponding species in the gas is the activity of the corresponding species in the gas and N is a stoichiometric coefficient.

Note

For more details see L. Sproge and J. Ågren, “Experimental and theoretical studies of gas consumption in the gas carburizing process” J. Heat Treat. 6, 9–19 (1988).

Returns:

A new ActivityFluxFunction object

static closed_system()

Factory method that creates a new closed-system boundary condition.

Returns:

A new ClosedSystem object

static fix_flux_value()

Factory method that creates a new fix-flux-value boundary condition.

This type of boundary condition makes it possible to enter functions that yield the flux times the molar volume for the independent components. May be a function of time, temperature and pressure: J(T,P,TIME).

Returns:

A new FixFluxValue object

static fixed_compositions(unit_enum)

Factory method that creates a new fixed-composition boundary condition.

Parameters:

unit_enum – The composition unit

Returns:

A new FixedCompositions object

get_type()

Convenience method for getting the type of the boundary condition.

Returns:

The type of the boundary condition

static mixed_zero_flux_and_activity()

Factory method that creates a new mixed zero-flux and activity boundary condition

Returns:

A new MixedZeroFluxAndActivity object

class +tc_toolbox.+diffusion.CompositionProfile(unit_enum)

Contains initial concentration profiles for the elements.

CompositionProfile(unit_enum)

Contains initial concentration profiles for the elements.

Parameters:

unit_enum – The unit of the compositions

add(element_name, profile)

Adds a concentration profile for the specified element.

Parameters:
  • element_name – The name of the element

  • profile – The initial concentration profile

Returns:

A CompositionProfile object

class +tc_toolbox.+diffusion.ConstantProfile(value)

Represents a constant initial concentration profile.

ConstantProfile(value)

Represents a constant initial concentration profile.

Parameters:

value – The constant composition in the region. [unit as defined in CompositionProfile].

static constant(value)

Factory method that creates a new constant initial concentration profile.

Parameters:

value – The constant composition in the region. [unit as defined in CompositionProfile].

Returns:

A new ConstantProfile object

static funct(dictra_console_mode_function)

Factory method that creates a new initial concentration profile defined by a function in DICTRA Console Mode syntax.

Note

This is an advanced feature, preferably a complex concentration profile should be generated using third party libraries and added to the simulation using +tc_toolbox.diffusion.PointByPointGrid.

Parameters:

dictra_console_mode_function – The function, expressed in DICTRA Console Mode syntax.

Returns:

A new FunctionProfile object

get_type()

The type of the element profile.

Returns:

The type

static linear(start_value, end_value)

Factory method that creates a new linear initial concentration profile.

Parameters:
  • start_value – Composition at the left side of the region [unit as defined in CompositionProfile].

  • end_value – Composition at the right side of the region [unit as defined in CompositionProfile].

Returns:

A new LinearProfile object

static step(lower_boundary, upper_boundary, step_at)

Factory method that creates a new initial concentration profile with a step at the specified distance, otherwise the composition is constant at the specified values.

Parameters:
  • lower_boundary – Composition before the step [unit as defined in CompositionProfile].

  • upper_boundary – Composition after the step [unit as defined in CompositionProfile].

  • step_at – The distance where the step should be [m].

Returns:

A new StepProfile object

class +tc_toolbox.+diffusion.ContinuedDiffusionCalculation(back)

Configuration for a diffusion calculation that is a continuation of a previous isothermal or non-isothermal diffusion calculation. It contains a subset of the settings possible in the original calculation.

Use set_simulation_time() to set a simulation time that is higher than the original calculation.

ContinuedDiffusionCalculation(back)

Call base constructor: tc_toolbox.AbstractCalculation.

calculate(timeout_in_minutes)

Runs the diffusion calculation.

Parameters:

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 DiffusionCalculationResult which later can be used to get specific values from the calculated result

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_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.

set_simulation_time(simulation_time)

Sets the simulation time.

Parameters:

simulation_time – The simulation time [s]

Returns:

This DiffusionIsoThermalCalculation object

with_left_boundary_condition(boundary_condition, to)

Defines the boundary condition on the left edge of the system.

Default: A closed-system boundary condition.

It is possible specify the upper time-point for which this setting is valid using the parameter “to”.

Default: The end of the simulation.

Examples

  • with_left_boundary_condition(BoundaryCondition.closed_system(), to=100)

  • with_left_boundary_condition(BoundaryCondition.mixed_zero_flux_and_activity().set_activity_for_element(“C”, surface_activity), to=500)

  • with_left_boundary_condition(BoundaryCondition.closed_system())

This example sets an closed-system-boundary-condition from start up to 100s and a activity-boundary-condition from 100s to 500s and finally a closed-system-boundary-condition from 500s to the end of simulation.

Note

You can specify time-dependent boundary conditions by calling with_left_boundary_condition() many times, with different values of the “to” parameter.

Parameters:
  • boundary_condition – The boundary condition

  • to – The upper time-limit for boundary_condition.

Returns:

This DiffusionIsoThermalCalculation object

with_options(options, to)

Sets the general simulation conditions.

It is possible specify the upper time-point for which this setting is valid using the parameter “to”.

Default: The end of the simulation.

Parameters:
  • options – The general simulation conditions

  • to – The upper time-limit for options.

Returns:

This DiffusionIsoThermalCalculation object

with_right_boundary_condition(boundary_condition, to)

Defines the boundary condition on the right edge of the system.

Default: A closed-system boundary condition

It is possible specify the upper time-point for which this setting is valid using the parameter “to”.

Default: The end of the simulation.

Examples

  • with_right_boundary_condition(BoundaryCondition.closed_system(), to=100)

  • with_right_boundary_condition(BoundaryCondition.mixed_zero_flux_and_activity().set_activity_for_element(“C”, surface_activity), to=500)

  • with_right_boundary_condition(BoundaryCondition.closed_system())

This example sets an closed-system-boundary-condition from start up to 100s and a activity-boundary-condition from 100s to 500s and finally a closed-system-boundary-condition from 500s to the end of simulation.

Note

You can specify time-dependent boundary conditions by calling with_right_boundary_condition() many times, with different values of the “to” parameter.

Parameters:
  • boundary_condition – The boundary condition

  • to – The upper time-limit for boundary_condition.

Returns:

This DiffusionIsoThermalCalculation object

with_solver(solver, to)

Sets the solver to use (Classic, Homogenization or Automatic). Default is Automatic.

It is possible specify the upper time-point for which this setting is valid using the parameter “to”.

Default: The end of the simulation.

Parameters:
  • solver – The solver to use

  • to – The upper time-limit for solver.

Returns:

This DiffusionIsoThermalCalculation 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

with_timestep_control(timestep_control, to)

Sets the timestep control options.

It is possible specify the upper time-point for which this setting is valid using the parameter “to”.

Default: The end of the simulation.

Parameters:
  • timestep_control – The new timestep control options

  • to – The upper time-limit for timestep_control.

Returns:

This DiffusionIsoThermalCalculation object

class +tc_toolbox.+diffusion.DiffusionCalculationResult(back)

Result of a diffusion calculation. This can be used to query for specific values. For details of the axis variables, search the Thermo-Calc help.

DiffusionCalculationResult(back)

Call base constructor: tc_toolbox.AbstractResult.

get_mass_fraction_at_lower_interface(region, component)

Returns the mass fraction of the specified component at the lower boundary of the specified region, in dependency of time.

Parameters:
  • region – The name of the region

  • component – The name of the component

Returns:

A tuple of two lists of floats (time [s], mass fraction of the specified component)

get_mass_fraction_at_upper_interface(region, component)

Returns the mass fraction of the specified component at the upper boundary of the specified region, in dependency of time.

Parameters:
  • region – The name of the region

  • component – The name of the component

Returns:

A tuple of two lists of floats (time [s], mass fraction of the specified component)

get_mass_fraction_of_component_at_time(component, time)

Returns the mass fraction of the specified component at the specified time.

Note

Use the enum +tc_toolbox.diffusion.SimulationTime to choose the first or the last timepoint of the simulation. A timepoint close to the last one should never be specified manually because the actual end of the simulation can slightly deviate.

Parameters:
  • component – The name of the component

  • time – The time [s]

Returns:

A tuple of two lists of floats (distance [m], mass fraction of component at the specified time)

get_mass_fraction_of_phase_at_time(phase, time)

Returns the mass fraction of the specified phase.

Note

Use the enum +tc_toolbox.diffusion.SimulationTime to choose the first or the last timepoint of the simulation. A timepoint close to the last one should never be specified manually because the actual end of the simulation can slightly deviate.

Parameters:
  • phase – The name of the phase

  • time – The time [s]

Returns:

A tuple of two lists of floats (distance [m], mass fraction of hte phase at the specified time)

get_mole_fraction_at_lower_interface(region, component)

Returns the mole fraction of the specified component at the lower boundary of the specified region, in dependency of time.

Parameters:
  • region – The name of the region

  • component – The name of the component

Returns:

A tuple of two lists of floats (time [s], mole fraction of the specified component)

get_mole_fraction_at_upper_interface(region, component)

Returns the mole fraction of the specified component at the upper boundary of the specified region, in dependency of time.

Parameters:
  • region – The name of the region

  • component – The name of the component

Returns:

A tuple of two lists of floats (time [s], mole fraction of the specified component)

get_mole_fraction_of_component_at_time(component, time)

Returns the mole fraction of the specified component at the specified time.

Note

Use the enum +tc_toolbox.diffusion.SimulationTime to choose the first or the last timepoint of the simulation. A timepoint close to the last one should never be specified manually because the actual end of the simulation can slightly deviate.

Parameters:
  • component – The name of the component

  • time – The time [s]

Returns:

A tuple of two lists of floats (distance [m], mole fraction of component at the specified time)

get_mole_fraction_of_phase_at_time(phase, time)

Returns the mole fraction of the specified phase.

Note

Use the enum +tc_toolbox.diffusion.SimulationTime to choose the first or the last timepoint of the simulation. A timepoint close to the last one should never be specified manually because the actual end of the simulation can slightly deviate.

Parameters:
  • phase – The name of the phase

  • time – The time [s]

Returns:

A tuple of two lists of floats (distance [m], mole fraction of the phase at the specified time)

get_position_of_lower_boundary_of_region(region)

Returns the position of the lower boundary of the specified region in dependency of time.

Parameters:

region – The name of the region

Returns:

A tuple of two lists of floats (time [s], position of lower boundary of region [m])

get_position_of_upper_boundary_of_region(region)

Returns the position of the upper boundary of the specified region in dependency of time.

Parameters:

region – The name of the region

Returns:

A tuple of two lists of floats (time [s], position of upper boundary of region [m])

get_regions()

Returns the regions of the diffusion simulation.

Note

Automatically generated regions (R_###) are included in the list.

Returns:

The region names

get_time_steps()

Returns the timesteps of the diffusion simulation.

Returns:

The timesteps [s]

get_total_mass_fraction_of_component(component)

Returns the total mass fraction of the specified component in dependency of time.

Parameters:

component – The name of the component

Returns:

A tuple of two lists of floats (time [s], total mass fraction of the component)

get_total_mass_fraction_of_component_in_phase(component, phase)

Returns the total mass fraction of the specified component in the specified phase in dependency of time.

Parameters:
  • component – The name of the component

  • phase – The name of the phase

Returns:

A tuple of two lists of floats (time [s], total mass fraction of the component in the phase)

get_total_mass_fraction_of_phase(phase)

Returns the total mass fraction of the specified phase in dependency of the time.

Parameters:

phase – The name of the phase

Returns:

A tuple of two lists of floats (time [s], total mass fraction of the phase)

get_total_mole_fraction_of_component(component)

Returns the total mole fraction of the specified component in dependency of time.

Parameters:

component – The name of the component

Returns:

A tuple of two lists of floats (time [s], total mole fraction of the component)

get_total_mole_fraction_of_component_in_phase(component, phase)

Returns the total mole fraction of the specified component in the specified phase in dependency of time.

Parameters:
  • component – The name of the component

  • phase – The name of the phase

Returns:

A tuple of two lists of floats (time [s], total mole fraction of the component in the phase)

get_total_mole_fraction_of_phase(phase)

Returns the total mole fraction of the specified phase in dependency of time.

Parameters:

phase – The name of the phase

Returns:

A tuple of two lists of floats (time [s], total mole fraction of the phase)

get_total_volume_fraction_of_phase(phase)

Returns the total volume fraction of the specified phase in dependency of the time.

Parameters:

phase – The name of the phase

Returns:

A tuple of two lists of floats (time [s], total volume fraction of the phase)

get_values_of(x_axis, y_axis, plot_condition, independent_variable)

Returns the specified result from the simulation, allows all possible settings.

Note

As an alternative, DICTRA Console Mode syntax can be used as well for each quantity and condition.

Warning

This is an advanced mode that is equivalent to the possibilities in the DICTRA Console Mode. Not every combination of settings will return a result.

Parameters:
  • x_axis – The first result quantity

  • y_axis – The second result quantity

  • plot_condition – The plot conditions

  • independent_variable – The independent variable

Returns:

A tuple of two lists of floats (the x_axis quantity result, the y_axis quantity result) [units according to the quantities]

get_velocity_of_lower_boundary_of_region(region)

Returns the velocity of the lower boundary of the specified region in dependency of time.

Parameters:

region – The name of the region

Returns:

A tuple of two lists of floats (time [s], velocity of lower boundary of region [m/s])

get_velocity_of_upper_boundary_of_region(region)

Returns the velocity of the upper boundary of the specified region in dependency of time.

Parameters:

region – The name of the region

Returns:

A tuple of two lists of floats (time [s], velocity of upper boundary of region [m/s])

get_width_of_region(region)

Returns the width of region, in dependency of time.

Parameters:

region – The name of the region

Returns:

A tuple of two lists of floats (time [s], width of the specified region [m])

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 disk. The result can later be loaded using +tc_toolbox.server.SetUp.load_result_from_disk().

Note

The result data is represented by a whole folder containing multiple files.

Parameters:

path – The path to the result folder, can be relative or absolute.

Returns:

This DiffusionCalculationResult object

with_continued_calculation()

Returns a ContinuedDiffusionCalculation that is used for continuing a diffusion calculation with altered settings.

Returns:

A ContinuedDiffusionCalculation

class +tc_toolbox.+diffusion.DiffusionIsoThermalCalculation(back)

Configuration for an isothermal diffusion calculation.

DiffusionIsoThermalCalculation(back)

Call base constructor: tc_toolbox.AbstractCalculation.

add_console_command(console_command)

Registers a DICTRA Console Mode command for execution. These commands are executed after all other configuration directly before the calculation starts to run. All commands are stored and used until explicitly deleted using +tc_toolbox.diffusion.DiffusionIsoThermoCalculation.remove_all_console_commands.

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 DICTRA-commands directly in the engine, it may hang the program in case of spelling mistakes (e.g. forgotten parenthesis, …).

Parameters:

console_command – The DICTRA Console Mode command

Returns:

This DiffusionIsoThermalCalculation object

add_region(region)

Adds a region to the calculation. Regions are always added in the simulation domain from left to right.

If you want to replace an already added region, call remove_all_regions(), and add the regions that you want to keep.

Warning

Regions must have unique names.

Parameters:

region – The region to be added

Returns:

This DiffusionIsoThermalCalculation object

calculate(timeout_in_minutes)

Runs the diffusion calculation.

Parameters:

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 DiffusionCalculationResult which later can be used to get specific values from the calculated result

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_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_console_commands()

Removes all previously added Console Mode commands.

Returns:

This DiffusionIsoThermalCalculation object

remove_all_regions()

Removes all previously added regions.

:return This DiffusionIsoThermalCalculation object

set_simulation_time(simulation_time)

Sets the simulation time.

Parameters:

simulation_time – The simulation time [s]

Returns:

This DiffusionIsoThermalCalculation object

set_temperature(temperature)

Sets the temperature for the isothermal simulation.

Parameters:

temperature – The temperature [K]

Returns:

This DiffusionIsoThermalCalculation object

with_cylindrical_geometry(first_interface_position)

Sets geometry to cylindrical, corresponds to an infinitely long cylinder of a certain radius.

Default: A planar geometry

Note

With a cylindrical or spherical geometry, the system’s zero coordinate (left boundary) is at the centre of the cylinder or sphere by default. By specifying the first_interface_position, a different left-most coordinate can be defined. This allows to model a tube or a hollow sphere geometry. The highest coordinate (right boundary) is defined by the cylinder or sphere radius (i.e. by the width of all regions).

Parameters:

first_interface_position – The position of the left-most coordinate along the axis, only necessary for modeling a tube geometry [m]

Returns:

This DiffusionIsoThermalCalculation object

with_left_boundary_condition(boundary_condition, to)

Defines the boundary condition on the left edge of the system.

Default: A closed-system boundary condition.

It is possible specify the upper time-point for which this setting is valid using the parameter “to”.

Default: The end of the simulation.

Examples

  • with_left_boundary_condition(BoundaryCondition.closed_system(), to=100)

  • with_left_boundary_condition(BoundaryCondition.mixed_zero_flux_and_activity().set_activity_for_element(“C”, surface_activity), to=500)

  • with_left_boundary_condition(BoundaryCondition.closed_system())

This example sets an closed-system-boundary-condition from start up to 100s and a activity-boundary-condition from 100s to 500s and finally a closed-system-boundary-condition from 500s to the end of simulation.

Note

You can specify time-dependent boundary conditions by calling with_left_boundary_condition() many times, with different values of the “to” parameter.

Parameters:
  • boundary_condition – The boundary condition

  • to – The upper time-limit for boundary_condition.

Returns:

This DiffusionIsoThermalCalculation object

with_options(options, to)

Sets the general simulation conditions.

It is possible specify the upper time-point for which this setting is valid using the parameter “to”.

Default: The end of the simulation.

Parameters:
  • options – The general simulation conditions

  • to – The upper time-limit for options.

Returns:

This DiffusionIsoThermalCalculation object

with_planar_geometry()

Sets geometry to planar.

This is default.

Returns:

This DiffusionIsoThermalCalculation object

with_reference_state(element, 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:
  • element – The name of the element

  • 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 DiffusionIsoThermalCalculation object

with_right_boundary_condition(boundary_condition, to)

Defines the boundary condition on the right edge of the system.

Default: A closed-system boundary condition

It is possible specify the upper time-point for which this setting is valid using the parameter “to”.

Default: The end of the simulation.

Examples

  • with_right_boundary_condition(BoundaryCondition.closed_system(), to=100)

  • with_right_boundary_condition(BoundaryCondition.mixed_zero_flux_and_activity().set_activity_for_element(“C”, surface_activity), to=500)

  • with_right_boundary_condition(BoundaryCondition.closed_system())

This example sets an closed-system-boundary-condition from start up to 100s and a activity-boundary-condition from 100s to 500s and finally a closed-system-boundary-condition from 500s to the end of simulation.

Note

You can specify time-dependent boundary conditions by calling with_right_boundary_condition() many times, with different values of the “to” parameter.

Parameters:
  • boundary_condition – The boundary condition

  • to – The upper time-limit for boundary_condition.

Returns:

This DiffusionIsoThermalCalculation object

with_solver(solver, to)

Sets the solver to use (Classic, Homogenization or Automatic). Default is Automatic.

It is possible specify the upper time-point for which this setting is valid using the parameter “to”.

Default: The end of the simulation.

Parameters:
  • solver – The solver to use

  • to – The upper time-limit for solver.

Returns:

This DiffusionIsoThermalCalculation object

with_spherical_geometry(first_interface_position)

Sets geometry to spherical, corresponds to a sphere with a certain radius.

Default: A spherical geometry

Note

With a cylindrical or spherical geometry, the system’s zero coordinate (left boundary) is at the centre of the cylinder or sphere by default. By specifying the first_interface_position, a different left-most coordinate can be defined. This allows to model a tube or a hollow sphere geometry. The highest coordinate (right boundary) is defined by the cylinder or sphere radius (i.e. by the width of all regions).

Parameters:

first_interface_position – The position of the left-most coordinate along the axis, only necessary for modeling a hollow sphere geometry [m]

Returns:

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

with_timestep_control(timestep_control, to)

Sets the timestep control options.

It is possible specify the upper time-point for which this setting is valid using the parameter “to”.

Default: The end of the simulation.

Parameters:
  • timestep_control – The new timestep control options

  • to – The upper time-limit for timestep_control.

Returns:

This DiffusionIsoThermalCalculation object

class +tc_toolbox.+diffusion.DiffusionNonIsoThermalCalculation(back)

Configuration for a non-isothermal diffusion calculation.

DiffusionNonIsoThermalCalculation(back)

Call base constructor: tc_toolbox.AbstractCalculation.

add_console_command(console_command)

Registers a DICTRA Console Mode command for execution. These commands are executed after all other configuration directly before the calculation starts to run. All commands are stored and used until explicitly deleted using +tc_toolbox.diffusion.DiffusionNonIsoThermalCalculation.remove_all_console_commands.

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 DICTRA-commands directly in the engine, it may hang the program in case of spelling mistakes (e.g. forgotten parenthesis, …).

Parameters:

console_command – The DICTRA Console Mode command

Returns:

This DiffusionNonIsoThermalCalculation object

add_region(region)

Adds a region to the calculation. Regions are always added in the simulation domain from left to right.

If you want to replace an already added region, call remove_all_regions(), and add the regions that you want to keep.

Warning

Regions must have unique names.

Parameters:

region – The region to be added

Returns:

This DiffusionNonIsoThermalCalculation object

calculate(timeout_in_minutes)

Runs the diffusion calculation.

Parameters:

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 DiffusionCalculationResult which later can be used to get specific values from the calculated result

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_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_console_commands()

Removes all previously added Console Mode commands.

Returns:

This DiffusionNonIsoThermalCalculation object

remove_all_regions()

Removes all previously added regions.

Returns:

This DiffusionNonIsoThermalCalculation object

set_simulation_time(simulation_time)

Sets the simulation time.

Parameters:

simulation_time – The simulation time [s]

Returns:

This DiffusionNonIsoThermalCalculation object

with_cylindrical_geometry(first_interface_position)

Sets geometry to cylindrical, corresponds to an infinitely long cylinder of a certain radius.

Default: A planar geometry

Note

With a cylindrical or spherical geometry, the system’s zero coordinate (left boundary) is at the centre of the cylinder or sphere by default. By specifying the first_interface_position, a different left-most coordinate can be defined. This allows to model a tube or a hollow sphere geometry. The highest coordinate (right boundary) is defined by the cylinder or sphere radius (i.e. by the width of all regions).

Parameters:

first_interface_position – The position of the left-most coordinate along the axis, only necessary for modeling a tube geometry [m]

Returns:

This DiffusionNonIsoThermalCalculation object

with_left_boundary_condition(boundary_condition, to)

Defines the boundary condition on the left edge of the system.

Default: A closed-system boundary condition.

It is possible specify the upper time-point for which this setting is valid using the parameter “to”.

Default: The end of the simulation.

Examples

  • with_left_boundary_condition(BoundaryCondition.closed_system(), to=100)

  • with_left_boundary_condition(BoundaryCondition.mixed_zero_flux_and_activity().set_activity_for_element(“C”, surface_activity), to=500)

  • with_left_boundary_condition(BoundaryCondition.closed_system())

This example sets an closed-system-boundary-condition from start up to 100s and a activity-boundary-condition from 100s to 500s and finally a closed-system-boundary-condition from 500s to the end of simulation.

Note

You can specify time-dependent boundary conditions by calling with_left_boundary_condition() many times, with different values of the “to” parameter.

Parameters:
  • boundary_condition – The boundary condition

  • to – The upper time-limit for boundary_condition.

Returns:

This DiffusionNonIsoThermalCalculation object

with_options(options, to)

Sets the general simulation conditions.

It is possible specify the upper time-point for which this setting is valid using the parameter “to”.

Default: The end of the simulation.

Parameters:
  • options – The general simulation conditions

  • to – The upper time-limit for options.

Returns:

This DiffusionNonIsoThermalCalculation object

with_planar_geometry()

Sets geometry to planar.

This is default.

Returns:

This DiffusionNonIsoThermalCalculation object

with_reference_state(element, 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:
  • element – The name of the element

  • 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 DiffusionNonIsoThermalCalculation object

with_right_boundary_condition(boundary_condition, to)

Defines the boundary condition on the right edge of the system.

Default: A closed-system boundary condition

It is possible specify the upper time-point for which this setting is valid using the parameter “to”.

Default: The end of the simulation.

Examples

  • with_right_boundary_condition(BoundaryCondition.closed_system(), to=100)

  • with_right_boundary_condition(BoundaryCondition.mixed_zero_flux_and_activity().set_activity_for_element(“C”, surface_activity), to=500)

  • with_right_boundary_condition(BoundaryCondition.closed_system())

This example sets an closed-system-boundary-condition from start up to 100s and a activity-boundary-condition from 100s to 500s and finally a closed-system-boundary-condition from 500s to the end of simulation.

Note

You can specify time-dependent boundary conditions by calling with_right_boundary_condition() many times, with different values of the “to” parameter.

Parameters:
  • boundary_condition – The boundary condition

  • to – The upper time-limit for boundary_condition.

Returns:

This DiffusionNonIsoThermalCalculation object

with_solver(solver, to)

Sets the solver to use (Classic, Homogenization or Automatic). Default is Automatic.

It is possible specify the upper time-point for which this setting is valid using the parameter “to”.

Default: The end of the simulation.

Parameters:
  • solver – The solver to use

  • to – The upper time-limit for solver.

Returns:

This DiffusionNonIsoThermalCalculation object

with_spherical_geometry(first_interface_position)

Sets geometry to spherical, corresponds to a sphere with a certain radius.

Default: A spherical geometry

Note

With a cylindrical or spherical geometry, the system’s zero coordinate (left boundary) is at the centre of the cylinder or sphere by default. By specifying the first_interface_position, a different left-most coordinate can be defined. This allows to model a tube or a hollow sphere geometry. The highest coordinate (right boundary) is defined by the cylinder or sphere radius (i.e. by the width of all regions).

Parameters:

first_interface_position – The position of the left-most coordinate along the axis, only necessary for modeling a hollow sphere geometry [m]

Returns:

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

with_temperature_profile(temperature_profile)

Sets the temperature profile to use with this calculation.

Parameters:

temperature_profile – The temperature profile object (specifying time / temperature points)

Returns:

This DiffusionNonIsoThermalCalculation object

with_timestep_control(timestep_control, to)

Sets the timestep control options.

It is possible specify the upper time-point for which this setting is valid using the parameter “to”.

Default: The end of the simulation.

Parameters:
  • timestep_control – The new timestep control options

  • to – The upper time-limit for timestep_control.

Returns:

This DiffusionNonIsoThermalCalculation object

class +tc_toolbox.+diffusion.DoubleGeometricGrid(no_of_points, lower_geometrical_factor, upper_geometrical_factor)

Represents a double geometric grid.

DoubleGeometricGrid(no_of_points, lower_geometrical_factor, upper_geometrical_factor)

Creates a double geometric grid.

Note

Double geometric grids have a high number of grid points in the middle or at both ends of a region. One geometrical factor for the lower (left) and upper (right) half of the region need to specified. In both cases, a geometrical factor of larger than one yields a higher density of grid points at the lower end of the half and vice versa for a factor smaller than one.

Parameters:
  • no_of_points – The number of points

  • lower_geometrical_factor – The geometrical factor for the left half

  • upper_geometrical_factor – The geometrical factor for the right half

static double_geometric(no_of_points, lower_geometrical_factor, upper_geometrical_factor)

Factory method that creates a new double geometric grid.

Note

Double geometric grids have a high number of grid points in the middle or at both ends of a region. One geometrical factor for the lower (left) and upper (right) half of the region need to specified. In both cases a geometrical factor of larger than one yields a higher density of grid points at the lower end of the half and vice versa for a factor smaller than one.

Parameters:
  • no_of_points – The number of points

  • lower_geometrical_factor – The geometrical factor for the left half

  • upper_geometrical_factor – The geometrical factor for the right half

Returns:

A new DoubleGeometricGrid object

static geometric(no_of_points, geometrical_factor)

Factory method that creates a new geometric grid.

Note

A grid that yields a varying density of grid points in the region. A geometrical factor larger than one yields a higher density of grid points at the lower end of the region and a factor smaller than one yields a higher density of grid points at the upper end of the region.

Parameters:
  • no_of_points – The number of points

  • geometrical_factor – The geometrical factor

Returns:

A new GeometricGrid object

get_lower_geometrical_factor()

Returns the lower geometrical factor (for the left half).

Returns:

The lower geometrical factor

get_no_of_points()

Returns number of grid points.

Returns:

The number of grid points

get_type()

Type of the grid.

Returns:

The type of the grid

get_upper_geometrical_factor()

Returns the upper geometrical factor (for the right half).

Returns:

The upper geometrical factor

static linear(no_of_points)

Factory method that creates a new equally spaced grid.

Parameters:

no_of_points – The number of points

Returns:

A new LinearGrid object

set_lower_geometrical_factor(geometrical_factor)

Sets the lower (left half) geometrical factor.

Note

A geometrical factor of larger than one yields a higher density of grid points at the lower end of the half and vice versa for a factor smaller than one.

Parameters:

geometrical_factor – The geometrical factor for the left half

Returns:

This DoubleGeometricGrid object

set_no_of_points(no_of_points)

Sets the number of grid points.

Parameters:

no_of_points – The number of points

Returns:

This DoubleGeometricGrid object

set_upper_geometrical_factor(geometrical_factor)

Sets the upper (right half) geometrical factor.

Note

A geometrical factor of larger than one yields a higher density of grid points at the lower end of the half and vice versa for a factor smaller than one.

Parameters:

geometrical_factor – The geometrical factor for the right half

Returns:

This DoubleGeometricGrid object

class +tc_toolbox.+diffusion.ElementProfile

Factory class providing objects for configuring a step, function or linear initial concentration profile.

static constant(value)

Factory method that creates a new constant initial concentration profile.

Parameters:

value – The constant composition in the region. [unit as defined in CompositionProfile].

Returns:

A new ConstantProfile object

static funct(dictra_console_mode_function)

Factory method that creates a new initial concentration profile defined by a function in DICTRA Console Mode syntax.

Note

This is an advanced feature, preferably a complex concentration profile should be generated using third party libraries and added to the simulation using +tc_toolbox.diffusion.PointByPointGrid.

Parameters:

dictra_console_mode_function – The function, expressed in DICTRA Console Mode syntax.

Returns:

A new FunctionProfile object

static linear(start_value, end_value)

Factory method that creates a new linear initial concentration profile.

Parameters:
  • start_value – Composition at the left side of the region [unit as defined in CompositionProfile].

  • end_value – Composition at the right side of the region [unit as defined in CompositionProfile].

Returns:

A new LinearProfile object

static step(lower_boundary, upper_boundary, step_at)

Factory method that creates a new initial concentration profile with a step at the specified distance, otherwise the composition is constant at the specified values.

Parameters:
  • lower_boundary – Composition before the step [unit as defined in CompositionProfile].

  • upper_boundary – Composition after the step [unit as defined in CompositionProfile].

  • step_at – The distance where the step should be [m].

Returns:

A new StepProfile object

class +tc_toolbox.+diffusion.FixFluxValue

Contains factory methods for the the different boundary conditions available.

FixFluxValue()

Represents a boundary having a fixed flux value.

This type of boundary condition makes it possible to enter functions that yield the flux times the molar volume for the independent components. May be a function of time, temperature and pressure: J(T,P,TIME). Constructs an instance of FixFluxValue.

static activity_flux_function()

Factory method that creates a new activity-flux-function boundary condition.

This type of boundary condition is used to take into account the finite rate of a surface reaction.

The flux for the independent components must be given in the format:

J = f(T,P,TIME) * ( ACTIVITY^N - g(T,P,TIME) )

where f and g may be functions of time (TIME), temperature (T), and pressure (P), and N is an integer.

f and g must be expressed in DICTRA Console Mode syntax.

Note

The activities are those with user-defined reference states. The function mass transfer coefficient is the mass transfer coefficient, activity of the corresponding species in the gas is the activity of the corresponding species in the gas and N is a stoichiometric coefficient.

Note

For more details see L. Sproge and J. Ågren, “Experimental and theoretical studies of gas consumption in the gas carburizing process” J. Heat Treat. 6, 9–19 (1988).

Returns:

A new ActivityFluxFunction object

static closed_system()

Factory method that creates a new closed-system boundary condition.

Returns:

A new ClosedSystem object

static fix_flux_value()

Factory method that creates a new fix-flux-value boundary condition.

This type of boundary condition makes it possible to enter functions that yield the flux times the molar volume for the independent components. May be a function of time, temperature and pressure: J(T,P,TIME).

Returns:

A new FixFluxValue object

static fixed_compositions(unit_enum)

Factory method that creates a new fixed-composition boundary condition.

Parameters:

unit_enum – The composition unit

Returns:

A new FixedCompositions object

get_type()

The type of the boundary condition.

Returns:

The type

static mixed_zero_flux_and_activity()

Factory method that creates a new mixed zero-flux and activity boundary condition

Returns:

A new MixedZeroFluxAndActivity object

set_flux(element_name, J, to_time)

Enter functions that yield the flux times the molar volume for the specified element. May be a function of time, temperature and pressure: J(T,P,TIME).

Parameters:
  • element_name – The name of the element

  • J – the function J(T,P,TIME)

  • to_time – The max-time for which the flux function is used.

class +tc_toolbox.+diffusion.FixedCompositions(unit_enum)

Represents a boundary having fixed composition values.

FixedCompositions(unit_enum)

Represents a boundary having fixed composition values.

Parameters:

unit_enum – The composition unit for all compositions at the boundary

static activity_flux_function()

Factory method that creates a new activity-flux-function boundary condition.

This type of boundary condition is used to take into account the finite rate of a surface reaction.

The flux for the independent components must be given in the format:

J = f(T,P,TIME) * ( ACTIVITY^N - g(T,P,TIME) )

where f and g may be functions of time (TIME), temperature (T), and pressure (P), and N is an integer.

f and g must be expressed in DICTRA Console Mode syntax.

Note

The activities are those with user-defined reference states. The function mass transfer coefficient is the mass transfer coefficient, activity of the corresponding species in the gas is the activity of the corresponding species in the gas and N is a stoichiometric coefficient.

Note

For more details see L. Sproge and J. Ågren, “Experimental and theoretical studies of gas consumption in the gas carburizing process” J. Heat Treat. 6, 9–19 (1988).

Returns:

A new ActivityFluxFunction object

static closed_system()

Factory method that creates a new closed-system boundary condition.

Returns:

A new ClosedSystem object

static fix_flux_value()

Factory method that creates a new fix-flux-value boundary condition.

This type of boundary condition makes it possible to enter functions that yield the flux times the molar volume for the independent components. May be a function of time, temperature and pressure: J(T,P,TIME).

Returns:

A new FixFluxValue object

static fixed_compositions(unit_enum)

Factory method that creates a new fixed-composition boundary condition.

Parameters:

unit_enum – The composition unit

Returns:

A new FixedCompositions object

get_type()

The type of the boundary condition.

Returns:

The type

static mixed_zero_flux_and_activity()

Factory method that creates a new mixed zero-flux and activity boundary condition

Returns:

A new MixedZeroFluxAndActivity object

set_composition(element_name, value)

Sets the composition for the specified element.

Note

The boundary composition needs to be specified for each element.

Parameters:
  • element_name – The name of the element

  • value – The composition value [unit according to the constructor parameter]

class +tc_toolbox.+diffusion.FunctionProfile(dictra_console_mode_function)

Creates an initial concentration profile defined by a function in DICTRA Console Mode syntax.

Note

This is an advanced feature, preferably a complex concentration profile should be generated using third party libraries and added to the simulation using +tc_toolbox.diffusion.PointByPointGrid.

FunctionProfile(dictra_console_mode_function)

Creates a initial concentration profile defined by a function in DICTRA Console Mode syntax.

Note

This is an advanced feature, preferably a complex concentration profile should be generated using third party libraries and added to the simulation using +tc_toolbox.diffusion.PointByPointGrid.

Parameters:

dictra_console_mode_function – The function, expressed in DICTRA Console Mode syntax.

Returns:

A new StepProfile object

static constant(value)

Factory method that creates a new constant initial concentration profile.

Parameters:

value – The constant composition in the region. [unit as defined in CompositionProfile].

Returns:

A new ConstantProfile object

static funct(dictra_console_mode_function)

Factory method that creates a new initial concentration profile defined by a function in DICTRA Console Mode syntax.

Note

This is an advanced feature, preferably a complex concentration profile should be generated using third party libraries and added to the simulation using +tc_toolbox.diffusion.PointByPointGrid.

Parameters:

dictra_console_mode_function – The function, expressed in DICTRA Console Mode syntax.

Returns:

A new FunctionProfile object

get_type()

The type of the element profile.

Returns:

The type

static linear(start_value, end_value)

Factory method that creates a new linear initial concentration profile.

Parameters:
  • start_value – Composition at the left side of the region [unit as defined in CompositionProfile].

  • end_value – Composition at the right side of the region [unit as defined in CompositionProfile].

Returns:

A new LinearProfile object

static step(lower_boundary, upper_boundary, step_at)

Factory method that creates a new initial concentration profile with a step at the specified distance, otherwise the composition is constant at the specified values.

Parameters:
  • lower_boundary – Composition before the step [unit as defined in CompositionProfile].

  • upper_boundary – Composition after the step [unit as defined in CompositionProfile].

  • step_at – The distance where the step should be [m].

Returns:

A new StepProfile object

class +tc_toolbox.+diffusion.GeneralLowerHashinShtrikman

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

GeneralLowerHashinShtrikman()

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. Constructs an instance of GeneralLowerHashinShtrikman.

static general_lower_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikman.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralLowerHashinShtrikman object

static general_lower_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikmanExcludedPhase.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralLowerHashinShtrikmanExcludedPhase object

static general_upper_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikman.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralUpperHashinShtrikman object

static general_upper_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikmanExcludedPhase.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralUpperHashinShtrikmanExcludedPhase object

static hashin_shtrikman_bound_majority()

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajority.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new HashinShtrikmanBoundMajority object

static hashin_shtrikman_bound_majority_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajorityExcludedPhase.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction. Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundMajorityExcludedPhase object

static hashin_shtrikman_bound_prescribed(matrix_phase)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribed.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new HashinShtrikmanBoundPrescribed object

static hashin_shtrikman_bound_prescribed_excluded_phase(matrix_phase, excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribedExcludedPhase.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:
  • matrix_phase – The matrix phase

  • excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundPrescribedExcludedPhase object

static inverse_rule_of_mixtures()

Factory method that creates a new homogenization function of the type InverseRuleOfMixtures.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion.

Returns:

A new InverseRuleOfMixtures object

static inverse_rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type InverseRuleOfMixturesExcludedPhase.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new InverseRuleOfMixturesExcludedPhase object

static labyrinth_factor_f(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF object

static labyrinth_factor_f2(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF2.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase squared.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF2 object

static rule_of_mixtures()

Factory method that creates a new homogenization function of the type RuleOfMixtures.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion.

Returns:

A new RuleOfMixtures object

static rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type RuleOfMixturesExcludedPhase.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new RuleOfMixturesExcludedPhase object

class +tc_toolbox.+diffusion.GeneralLowerHashinShtrikmanExcludedPhase(excluded_phases)

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

GeneralLowerHashinShtrikmanExcludedPhase(excluded_phases)

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

static general_lower_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikman.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralLowerHashinShtrikman object

static general_lower_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikmanExcludedPhase.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralLowerHashinShtrikmanExcludedPhase object

static general_upper_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikman.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralUpperHashinShtrikman object

static general_upper_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikmanExcludedPhase.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralUpperHashinShtrikmanExcludedPhase object

static hashin_shtrikman_bound_majority()

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajority.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new HashinShtrikmanBoundMajority object

static hashin_shtrikman_bound_majority_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajorityExcludedPhase.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction. Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundMajorityExcludedPhase object

static hashin_shtrikman_bound_prescribed(matrix_phase)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribed.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new HashinShtrikmanBoundPrescribed object

static hashin_shtrikman_bound_prescribed_excluded_phase(matrix_phase, excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribedExcludedPhase.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:
  • matrix_phase – The matrix phase

  • excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundPrescribedExcludedPhase object

static inverse_rule_of_mixtures()

Factory method that creates a new homogenization function of the type InverseRuleOfMixtures.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion.

Returns:

A new InverseRuleOfMixtures object

static inverse_rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type InverseRuleOfMixturesExcludedPhase.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new InverseRuleOfMixturesExcludedPhase object

static labyrinth_factor_f(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF object

static labyrinth_factor_f2(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF2.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase squared.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF2 object

static rule_of_mixtures()

Factory method that creates a new homogenization function of the type RuleOfMixtures.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion.

Returns:

A new RuleOfMixtures object

static rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type RuleOfMixturesExcludedPhase.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new RuleOfMixturesExcludedPhase object

class +tc_toolbox.+diffusion.GeneralUpperHashinShtrikman

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

GeneralUpperHashinShtrikman()

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. Constructs an instance of GeneralUpperHashinShtrikman.

static general_lower_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikman.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralLowerHashinShtrikman object

static general_lower_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikmanExcludedPhase.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralLowerHashinShtrikmanExcludedPhase object

static general_upper_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikman.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralUpperHashinShtrikman object

static general_upper_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikmanExcludedPhase.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralUpperHashinShtrikmanExcludedPhase object

static hashin_shtrikman_bound_majority()

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajority.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new HashinShtrikmanBoundMajority object

static hashin_shtrikman_bound_majority_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajorityExcludedPhase.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction. Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundMajorityExcludedPhase object

static hashin_shtrikman_bound_prescribed(matrix_phase)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribed.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new HashinShtrikmanBoundPrescribed object

static hashin_shtrikman_bound_prescribed_excluded_phase(matrix_phase, excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribedExcludedPhase.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:
  • matrix_phase – The matrix phase

  • excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundPrescribedExcludedPhase object

static inverse_rule_of_mixtures()

Factory method that creates a new homogenization function of the type InverseRuleOfMixtures.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion.

Returns:

A new InverseRuleOfMixtures object

static inverse_rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type InverseRuleOfMixturesExcludedPhase.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new InverseRuleOfMixturesExcludedPhase object

static labyrinth_factor_f(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF object

static labyrinth_factor_f2(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF2.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase squared.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF2 object

static rule_of_mixtures()

Factory method that creates a new homogenization function of the type RuleOfMixtures.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion.

Returns:

A new RuleOfMixtures object

static rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type RuleOfMixturesExcludedPhase.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new RuleOfMixturesExcludedPhase object

class +tc_toolbox.+diffusion.GeneralUpperHashinShtrikmanExcludedPhase(excluded_phases)

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

GeneralUpperHashinShtrikmanExcludedPhase(excluded_phases)

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

static general_lower_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikman.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralLowerHashinShtrikman object

static general_lower_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikmanExcludedPhase.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralLowerHashinShtrikmanExcludedPhase object

static general_upper_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikman.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralUpperHashinShtrikman object

static general_upper_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikmanExcludedPhase.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralUpperHashinShtrikmanExcludedPhase object

static hashin_shtrikman_bound_majority()

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajority.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new HashinShtrikmanBoundMajority object

static hashin_shtrikman_bound_majority_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajorityExcludedPhase.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction. Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundMajorityExcludedPhase object

static hashin_shtrikman_bound_prescribed(matrix_phase)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribed.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new HashinShtrikmanBoundPrescribed object

static hashin_shtrikman_bound_prescribed_excluded_phase(matrix_phase, excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribedExcludedPhase.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:
  • matrix_phase – The matrix phase

  • excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundPrescribedExcludedPhase object

static inverse_rule_of_mixtures()

Factory method that creates a new homogenization function of the type InverseRuleOfMixtures.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion.

Returns:

A new InverseRuleOfMixtures object

static inverse_rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type InverseRuleOfMixturesExcludedPhase.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new InverseRuleOfMixturesExcludedPhase object

static labyrinth_factor_f(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF object

static labyrinth_factor_f2(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF2.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase squared.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF2 object

static rule_of_mixtures()

Factory method that creates a new homogenization function of the type RuleOfMixtures.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion.

Returns:

A new RuleOfMixtures object

static rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type RuleOfMixturesExcludedPhase.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new RuleOfMixturesExcludedPhase object

class +tc_toolbox.+diffusion.GeometricGrid(no_of_points, geometrical_factor)

Represents a geometric grid.

GeometricGrid(no_of_points, geometrical_factor)

A grid that yields a varying density of grid points in the region.

Note

A geometrical factor larger than one yields a higher density of grid points at the lower end of the region and a factor smaller than one yields a higher density of grid points at the upper end of the region.

Parameters:
  • no_of_points – The number of points

  • geometrical_factor – The geometrical factor

static double_geometric(no_of_points, lower_geometrical_factor, upper_geometrical_factor)

Factory method that creates a new double geometric grid.

Note

Double geometric grids have a high number of grid points in the middle or at both ends of a region. One geometrical factor for the lower (left) and upper (right) half of the region need to specified. In both cases a geometrical factor of larger than one yields a higher density of grid points at the lower end of the half and vice versa for a factor smaller than one.

Parameters:
  • no_of_points – The number of points

  • lower_geometrical_factor – The geometrical factor for the left half

  • upper_geometrical_factor – The geometrical factor for the right half

Returns:

A new DoubleGeometricGrid object

static geometric(no_of_points, geometrical_factor)

Factory method that creates a new geometric grid.

Note

A grid that yields a varying density of grid points in the region. A geometrical factor larger than one yields a higher density of grid points at the lower end of the region and a factor smaller than one yields a higher density of grid points at the upper end of the region.

Parameters:
  • no_of_points – The number of points

  • geometrical_factor – The geometrical factor

Returns:

A new GeometricGrid object

get_geometrical_factor()

Returns the geometrical factor.

Returns:

The geometrical factor

get_no_of_points()

Returns the number of grid points.

Returns:

The number of grid points

get_type()

Returns the type of grid.

Returns:

The type

static linear(no_of_points)

Factory method that creates a new equally spaced grid.

Parameters:

no_of_points – The number of points

Returns:

A new LinearGrid object

set_geometrical_factor(geometrical_factor)

Sets the geometrical factor.

Note

A geometrical factor larger than one yields a higher density of grid points at the lower end of the region and a factor smaller than one yields a higher density of grid points at the upper end of the region.

Parameters:

geometrical_factor – The geometrical factor

Returns:

This GeometricGrid object

set_no_of_points(no_of_points)

Sets the number of grid points.

Parameters:

no_of_points – The number of points

Returns:

This GeometricGrid object

class +tc_toolbox.+diffusion.GridPoint(distance)

Represents a grid point, this is used in combination with grids of the type +tc_toolbox.diffusion.PointByPointGrid.

GridPoint(distance)

Creates a grid point, this is used in combination with grids of the type +tc_toolbox.diffusion.PointByPointGrid.

Parameters:

distance – Position (origin at the left side of the grid)

add_composition(element, value)

Adds a composition for the specified element to the grid point.

Parameters:
  • element – The element

  • value – The composition value [unit as defined for the grid]

Returns:

This GridPoint object

class +tc_toolbox.+diffusion.HashinShtrikmanBoundMajority

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

HashinShtrikmanBoundMajority()

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. Constructs an instance of HashinShtrikmanBoundMajority.

static general_lower_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikman.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralLowerHashinShtrikman object

static general_lower_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikmanExcludedPhase.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralLowerHashinShtrikmanExcludedPhase object

static general_upper_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikman.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralUpperHashinShtrikman object

static general_upper_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikmanExcludedPhase.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralUpperHashinShtrikmanExcludedPhase object

static hashin_shtrikman_bound_majority()

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajority.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new HashinShtrikmanBoundMajority object

static hashin_shtrikman_bound_majority_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajorityExcludedPhase.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction. Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundMajorityExcludedPhase object

static hashin_shtrikman_bound_prescribed(matrix_phase)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribed.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new HashinShtrikmanBoundPrescribed object

static hashin_shtrikman_bound_prescribed_excluded_phase(matrix_phase, excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribedExcludedPhase.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:
  • matrix_phase – The matrix phase

  • excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundPrescribedExcludedPhase object

static inverse_rule_of_mixtures()

Factory method that creates a new homogenization function of the type InverseRuleOfMixtures.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion.

Returns:

A new InverseRuleOfMixtures object

static inverse_rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type InverseRuleOfMixturesExcludedPhase.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new InverseRuleOfMixturesExcludedPhase object

static labyrinth_factor_f(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF object

static labyrinth_factor_f2(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF2.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase squared.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF2 object

static rule_of_mixtures()

Factory method that creates a new homogenization function of the type RuleOfMixtures.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion.

Returns:

A new RuleOfMixtures object

static rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type RuleOfMixturesExcludedPhase.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new RuleOfMixturesExcludedPhase object

class +tc_toolbox.+diffusion.HashinShtrikmanBoundMajorityExcludedPhase(excluded_phases)

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

HashinShtrikmanBoundMajorityExcludedPhase(excluded_phases)

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

static general_lower_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikman.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralLowerHashinShtrikman object

static general_lower_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikmanExcludedPhase.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralLowerHashinShtrikmanExcludedPhase object

static general_upper_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikman.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralUpperHashinShtrikman object

static general_upper_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikmanExcludedPhase.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralUpperHashinShtrikmanExcludedPhase object

static hashin_shtrikman_bound_majority()

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajority.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new HashinShtrikmanBoundMajority object

static hashin_shtrikman_bound_majority_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajorityExcludedPhase.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction. Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundMajorityExcludedPhase object

static hashin_shtrikman_bound_prescribed(matrix_phase)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribed.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new HashinShtrikmanBoundPrescribed object

static hashin_shtrikman_bound_prescribed_excluded_phase(matrix_phase, excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribedExcludedPhase.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:
  • matrix_phase – The matrix phase

  • excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundPrescribedExcludedPhase object

static inverse_rule_of_mixtures()

Factory method that creates a new homogenization function of the type InverseRuleOfMixtures.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion.

Returns:

A new InverseRuleOfMixtures object

static inverse_rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type InverseRuleOfMixturesExcludedPhase.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new InverseRuleOfMixturesExcludedPhase object

static labyrinth_factor_f(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF object

static labyrinth_factor_f2(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF2.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase squared.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF2 object

static rule_of_mixtures()

Factory method that creates a new homogenization function of the type RuleOfMixtures.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion.

Returns:

A new RuleOfMixtures object

static rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type RuleOfMixturesExcludedPhase.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new RuleOfMixturesExcludedPhase object

class +tc_toolbox.+diffusion.HashinShtrikmanBoundPrescribed(matrix_phase)

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

HashinShtrikmanBoundPrescribed(matrix_phase)

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Parameters:

matrix_phase – The matrix phase

static general_lower_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikman.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralLowerHashinShtrikman object

static general_lower_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikmanExcludedPhase.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralLowerHashinShtrikmanExcludedPhase object

static general_upper_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikman.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralUpperHashinShtrikman object

static general_upper_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikmanExcludedPhase.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralUpperHashinShtrikmanExcludedPhase object

static hashin_shtrikman_bound_majority()

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajority.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new HashinShtrikmanBoundMajority object

static hashin_shtrikman_bound_majority_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajorityExcludedPhase.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction. Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundMajorityExcludedPhase object

static hashin_shtrikman_bound_prescribed(matrix_phase)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribed.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new HashinShtrikmanBoundPrescribed object

static hashin_shtrikman_bound_prescribed_excluded_phase(matrix_phase, excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribedExcludedPhase.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:
  • matrix_phase – The matrix phase

  • excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundPrescribedExcludedPhase object

static inverse_rule_of_mixtures()

Factory method that creates a new homogenization function of the type InverseRuleOfMixtures.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion.

Returns:

A new InverseRuleOfMixtures object

static inverse_rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type InverseRuleOfMixturesExcludedPhase.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new InverseRuleOfMixturesExcludedPhase object

static labyrinth_factor_f(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF object

static labyrinth_factor_f2(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF2.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase squared.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF2 object

static rule_of_mixtures()

Factory method that creates a new homogenization function of the type RuleOfMixtures.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion.

Returns:

A new RuleOfMixtures object

static rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type RuleOfMixturesExcludedPhase.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new RuleOfMixturesExcludedPhase object

class +tc_toolbox.+diffusion.HashinShtrikmanBoundPrescribedExcludedPhase(matrix_phase, excluded_phases)
HashinShtrikmanBoundPrescribedExcludedPhase(matrix_phase, excluded_phases)

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:
  • matrix_phase – The matrix phase

  • excluded_phases – The excluded phases

static general_lower_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikman.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralLowerHashinShtrikman object

static general_lower_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikmanExcludedPhase.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralLowerHashinShtrikmanExcludedPhase object

static general_upper_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikman.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralUpperHashinShtrikman object

static general_upper_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikmanExcludedPhase.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralUpperHashinShtrikmanExcludedPhase object

static hashin_shtrikman_bound_majority()

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajority.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new HashinShtrikmanBoundMajority object

static hashin_shtrikman_bound_majority_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajorityExcludedPhase.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction. Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundMajorityExcludedPhase object

static hashin_shtrikman_bound_prescribed(matrix_phase)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribed.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new HashinShtrikmanBoundPrescribed object

static hashin_shtrikman_bound_prescribed_excluded_phase(matrix_phase, excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribedExcludedPhase.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:
  • matrix_phase – The matrix phase

  • excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundPrescribedExcludedPhase object

static inverse_rule_of_mixtures()

Factory method that creates a new homogenization function of the type InverseRuleOfMixtures.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion.

Returns:

A new InverseRuleOfMixtures object

static inverse_rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type InverseRuleOfMixturesExcludedPhase.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new InverseRuleOfMixturesExcludedPhase object

static labyrinth_factor_f(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF object

static labyrinth_factor_f2(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF2.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase squared.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF2 object

static rule_of_mixtures()

Factory method that creates a new homogenization function of the type RuleOfMixtures.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion.

Returns:

A new RuleOfMixtures object

static rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type RuleOfMixturesExcludedPhase.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new RuleOfMixturesExcludedPhase object

class +tc_toolbox.+diffusion.HomogenizationFunction

Homogenization function used for the homogenization solver. Many homogenization functions are based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. Default: RULE_OF_MIXTURES (i.e. upper Wiener bounds)

class +tc_toolbox.+diffusion.HomogenizationFunctions
static general_lower_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikman.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralLowerHashinShtrikman object

static general_lower_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikmanExcludedPhase.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralLowerHashinShtrikmanExcludedPhase object

static general_upper_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikman.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralUpperHashinShtrikman object

static general_upper_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikmanExcludedPhase.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralUpperHashinShtrikmanExcludedPhase object

static hashin_shtrikman_bound_majority()

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajority.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new HashinShtrikmanBoundMajority object

static hashin_shtrikman_bound_majority_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajorityExcludedPhase.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction. Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundMajorityExcludedPhase object

static hashin_shtrikman_bound_prescribed(matrix_phase)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribed.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new HashinShtrikmanBoundPrescribed object

static hashin_shtrikman_bound_prescribed_excluded_phase(matrix_phase, excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribedExcludedPhase.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:
  • matrix_phase – The matrix phase

  • excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundPrescribedExcludedPhase object

static inverse_rule_of_mixtures()

Factory method that creates a new homogenization function of the type InverseRuleOfMixtures.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion.

Returns:

A new InverseRuleOfMixtures object

static inverse_rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type InverseRuleOfMixturesExcludedPhase.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new InverseRuleOfMixturesExcludedPhase object

static labyrinth_factor_f(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF object

static labyrinth_factor_f2(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF2.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase squared.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF2 object

static rule_of_mixtures()

Factory method that creates a new homogenization function of the type RuleOfMixtures.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion.

Returns:

A new RuleOfMixtures object

static rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type RuleOfMixturesExcludedPhase.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new RuleOfMixturesExcludedPhase object

class +tc_toolbox.+diffusion.HomogenizationSolver

Solver using the Homogenization model.

Note

This solver always uses the homogenization model, even if all regions have only one phase. The solver is significantly slower than the Classic model. Use the +tc_toolbox.diffusion.AutomaticSolver instead if you do not need that behavior.

HomogenizationSolver()

Creating a solver using the homogenization model.

Note

This solver always uses the homogenization model, even if all regions have only one phase. The solver is significantly slower than the Classic model. Use the +tc_toolbox.diffusion.AutomaticSolver instead if you do not need that behavior.

Constructs an instance of HomogenizationSolver.

static automatic()

Factory method that creates a new automatic solver. This is the default solver and recommended for most applications.

Note

This solver uses the homogenization model if any region has more than one phase, otherwise it uses the classic model.

Returns:

A new AutomaticSolver object

static classic()

Factory method that creates a new classic solver.

Note

This solver never switches to the homogenization model even if the solver fails to converge. Use the +tc_toolbox.diffusion.AutomaticSolver if necessary instead.

Returns:

A new ClassicSolver object

disable_global_minimization()

Disables global minimization to be used in equilibrium calculations. Default: Disabled

Note

In general, using global minimization significantly increases the simulation time, but there is also a significantly reduced risk for non-converged equilibrium calculations.

Returns:

A new HomogenizationSolver object

disable_interpolation_scheme()

Configures the simulation not use any interpolation scheme. Default: To use the logarithmic interpolation scheme with 10000 discretization steps

Note

The homogenization scheme can be switched on by using with_linear_interpolation_scheme or with_logarithmic_interpolation_scheme.

enable_global_minimization()

Enables global minimization to be used in equilibrium calculations. Default: Disabled

Note

In general, using global minimization significantly increases the simulation time, but there is also a significantly reduced risk for non-converged equilibrium calculations.

Returns:

A new HomogenizationSolver object

get_type()

The type of solver.

Returns:

The type

static homogenization()

Factory method that creates a new homogenization solver.

Note

This solver always uses the homogenization model, even if all regions have only one phase. The solver is significantly slower than the Classic model. Use the +tc_toolbox.diffusion.AutomaticSolver instead if you do not need that behavior.

Returns:

A new HomogenizationSolver object

set_fraction_of_free_memory_to_use(fraction)

Sets the maximum fraction of free physical memory to be used by the interpolation scheme. Default: 1 / 10 of the free physical memory

Parameters:

fraction – The maximum free physical memory fraction to be used

Returns:

A new HomogenizationSolver object

set_memory_to_use(memory_in_megabytes)

Sets the maximum physical memory in megabytes to be used by the interpolation scheme. Default: 1000 MBytes of the free physical memory

Parameters:

memory_in_megabytes – The maximum physical memory to be used

Returns:

A new HomogenizationSolver object

with_function(homogenization_function)

Sets the homogenization function used by the homogenization model.

Parameters:

homogenization_function – The homogenization function used by the homogenization model

Returns:

A new HomogenizationSolver object

with_linear_interpolation_scheme(steps)

Configures the simulation to use the linear interpolation scheme. Default: To use the logarithmic interpolation scheme with 10000 discretization steps

Parameters:

steps – The number of discretization steps in each dimension

Returns:

A new HomogenizationSolver object

with_logarithmic_interpolation_scheme(steps)

Configures the simulation to use the linear interpolation scheme. Default: To use the logarithmic interpolation scheme with 10000 discretization steps

Parameters:

steps – The number of discretization steps in each dimension

Returns:

A new HomogenizationSolver object

class +tc_toolbox.+diffusion.InverseRuleOfMixtures

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion.

InverseRuleOfMixtures()

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion. Constructs an instance of InverseRuleOfMixtures.

static general_lower_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikman.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralLowerHashinShtrikman object

static general_lower_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikmanExcludedPhase.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralLowerHashinShtrikmanExcludedPhase object

static general_upper_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikman.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralUpperHashinShtrikman object

static general_upper_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikmanExcludedPhase.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralUpperHashinShtrikmanExcludedPhase object

static hashin_shtrikman_bound_majority()

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajority.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new HashinShtrikmanBoundMajority object

static hashin_shtrikman_bound_majority_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajorityExcludedPhase.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction. Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundMajorityExcludedPhase object

static hashin_shtrikman_bound_prescribed(matrix_phase)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribed.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new HashinShtrikmanBoundPrescribed object

static hashin_shtrikman_bound_prescribed_excluded_phase(matrix_phase, excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribedExcludedPhase.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:
  • matrix_phase – The matrix phase

  • excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundPrescribedExcludedPhase object

static inverse_rule_of_mixtures()

Factory method that creates a new homogenization function of the type InverseRuleOfMixtures.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion.

Returns:

A new InverseRuleOfMixtures object

static inverse_rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type InverseRuleOfMixturesExcludedPhase.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new InverseRuleOfMixturesExcludedPhase object

static labyrinth_factor_f(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF object

static labyrinth_factor_f2(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF2.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase squared.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF2 object

static rule_of_mixtures()

Factory method that creates a new homogenization function of the type RuleOfMixtures.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion.

Returns:

A new RuleOfMixtures object

static rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type RuleOfMixturesExcludedPhase.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new RuleOfMixturesExcludedPhase object

class +tc_toolbox.+diffusion.InverseRuleOfMixturesExcludedPhase(excluded_phases)

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion.

Excluded phases are not considered in the diffusion calculations.

InverseRuleOfMixturesExcludedPhase(excluded_phases)

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion.

Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

static general_lower_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikman.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralLowerHashinShtrikman object

static general_lower_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikmanExcludedPhase.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralLowerHashinShtrikmanExcludedPhase object

static general_upper_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikman.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralUpperHashinShtrikman object

static general_upper_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikmanExcludedPhase.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralUpperHashinShtrikmanExcludedPhase object

static hashin_shtrikman_bound_majority()

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajority.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new HashinShtrikmanBoundMajority object

static hashin_shtrikman_bound_majority_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajorityExcludedPhase.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction. Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundMajorityExcludedPhase object

static hashin_shtrikman_bound_prescribed(matrix_phase)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribed.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new HashinShtrikmanBoundPrescribed object

static hashin_shtrikman_bound_prescribed_excluded_phase(matrix_phase, excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribedExcludedPhase.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:
  • matrix_phase – The matrix phase

  • excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundPrescribedExcludedPhase object

static inverse_rule_of_mixtures()

Factory method that creates a new homogenization function of the type InverseRuleOfMixtures.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion.

Returns:

A new InverseRuleOfMixtures object

static inverse_rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type InverseRuleOfMixturesExcludedPhase.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new InverseRuleOfMixturesExcludedPhase object

static labyrinth_factor_f(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF object

static labyrinth_factor_f2(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF2.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase squared.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF2 object

static rule_of_mixtures()

Factory method that creates a new homogenization function of the type RuleOfMixtures.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion.

Returns:

A new RuleOfMixtures object

static rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type RuleOfMixturesExcludedPhase.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new RuleOfMixturesExcludedPhase object

class +tc_toolbox.+diffusion.LabyrinthFactorF(matrix_phase)

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase.

LabyrinthFactorF(matrix_phase)

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase.

Parameters:

matrix_phase – The matrix phase

static general_lower_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikman.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralLowerHashinShtrikman object

static general_lower_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikmanExcludedPhase.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralLowerHashinShtrikmanExcludedPhase object

static general_upper_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikman.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralUpperHashinShtrikman object

static general_upper_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikmanExcludedPhase.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralUpperHashinShtrikmanExcludedPhase object

static hashin_shtrikman_bound_majority()

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajority.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new HashinShtrikmanBoundMajority object

static hashin_shtrikman_bound_majority_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajorityExcludedPhase.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction. Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundMajorityExcludedPhase object

static hashin_shtrikman_bound_prescribed(matrix_phase)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribed.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new HashinShtrikmanBoundPrescribed object

static hashin_shtrikman_bound_prescribed_excluded_phase(matrix_phase, excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribedExcludedPhase.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:
  • matrix_phase – The matrix phase

  • excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundPrescribedExcludedPhase object

static inverse_rule_of_mixtures()

Factory method that creates a new homogenization function of the type InverseRuleOfMixtures.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion.

Returns:

A new InverseRuleOfMixtures object

static inverse_rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type InverseRuleOfMixturesExcludedPhase.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new InverseRuleOfMixturesExcludedPhase object

static labyrinth_factor_f(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF object

static labyrinth_factor_f2(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF2.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase squared.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF2 object

static rule_of_mixtures()

Factory method that creates a new homogenization function of the type RuleOfMixtures.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion.

Returns:

A new RuleOfMixtures object

static rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type RuleOfMixturesExcludedPhase.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new RuleOfMixturesExcludedPhase object

class +tc_toolbox.+diffusion.LabyrinthFactorF2(matrix_phase)

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase squared.

LabyrinthFactorF2(matrix_phase)

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase squared.

Parameters:

matrix_phase – The matrix phase

static general_lower_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikman.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralLowerHashinShtrikman object

static general_lower_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikmanExcludedPhase.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralLowerHashinShtrikmanExcludedPhase object

static general_upper_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikman.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralUpperHashinShtrikman object

static general_upper_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikmanExcludedPhase.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralUpperHashinShtrikmanExcludedPhase object

static hashin_shtrikman_bound_majority()

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajority.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new HashinShtrikmanBoundMajority object

static hashin_shtrikman_bound_majority_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajorityExcludedPhase.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction. Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundMajorityExcludedPhase object

static hashin_shtrikman_bound_prescribed(matrix_phase)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribed.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new HashinShtrikmanBoundPrescribed object

static hashin_shtrikman_bound_prescribed_excluded_phase(matrix_phase, excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribedExcludedPhase.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:
  • matrix_phase – The matrix phase

  • excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundPrescribedExcludedPhase object

static inverse_rule_of_mixtures()

Factory method that creates a new homogenization function of the type InverseRuleOfMixtures.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion.

Returns:

A new InverseRuleOfMixtures object

static inverse_rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type InverseRuleOfMixturesExcludedPhase.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new InverseRuleOfMixturesExcludedPhase object

static labyrinth_factor_f(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF object

static labyrinth_factor_f2(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF2.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase squared.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF2 object

static rule_of_mixtures()

Factory method that creates a new homogenization function of the type RuleOfMixtures.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion.

Returns:

A new RuleOfMixtures object

static rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type RuleOfMixturesExcludedPhase.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new RuleOfMixturesExcludedPhase object

class +tc_toolbox.+diffusion.LinearGrid(no_of_points)

Represents an equally spaced grid.

LinearGrid(no_of_points)

Creates an equally spaced grid.

Parameters:

no_of_points – The number of points

static double_geometric(no_of_points, lower_geometrical_factor, upper_geometrical_factor)

Factory method that creates a new double geometric grid.

Note

Double geometric grids have a high number of grid points in the middle or at both ends of a region. One geometrical factor for the lower (left) and upper (right) half of the region need to specified. In both cases a geometrical factor of larger than one yields a higher density of grid points at the lower end of the half and vice versa for a factor smaller than one.

Parameters:
  • no_of_points – The number of points

  • lower_geometrical_factor – The geometrical factor for the left half

  • upper_geometrical_factor – The geometrical factor for the right half

Returns:

A new DoubleGeometricGrid object

static geometric(no_of_points, geometrical_factor)

Factory method that creates a new geometric grid.

Note

A grid that yields a varying density of grid points in the region. A geometrical factor larger than one yields a higher density of grid points at the lower end of the region and a factor smaller than one yields a higher density of grid points at the upper end of the region.

Parameters:
  • no_of_points – The number of points

  • geometrical_factor – The geometrical factor

Returns:

A new GeometricGrid object

get_no_of_points()

Returns the number of grid points.

Returns:

The number of grid points

get_type()

Type of the grid.

Returns:

The type

static linear(no_of_points)

Factory method that creates a new equally spaced grid.

Parameters:

no_of_points – The number of points

Returns:

A new LinearGrid object

set_no_of_points(no_of_points)

Sets the number of grid points.

Parameters:

no_of_points – The number of points

Returns:

This LinearGrid object

class +tc_toolbox.+diffusion.LinearProfile(start_value, end_value)

Represents a linear initial concentration profile.

LinearProfile(start_value, end_value)

Represents a linear initial concentration profile.

Parameters:
  • start_value – Composition at the left side of the region [unit as defined in CompositionProfile].

  • end_value – Composition at the right side of the region [unit as defined in CompositionProfile].

static constant(value)

Factory method that creates a new constant initial concentration profile.

Parameters:

value – The constant composition in the region. [unit as defined in CompositionProfile].

Returns:

A new ConstantProfile object

static funct(dictra_console_mode_function)

Factory method that creates a new initial concentration profile defined by a function in DICTRA Console Mode syntax.

Note

This is an advanced feature, preferably a complex concentration profile should be generated using third party libraries and added to the simulation using +tc_toolbox.diffusion.PointByPointGrid.

Parameters:

dictra_console_mode_function – The function, expressed in DICTRA Console Mode syntax.

Returns:

A new FunctionProfile object

get_type()

The type of the element profile.

Returns:

The type

static linear(start_value, end_value)

Factory method that creates a new linear initial concentration profile.

Parameters:
  • start_value – Composition at the left side of the region [unit as defined in CompositionProfile].

  • end_value – Composition at the right side of the region [unit as defined in CompositionProfile].

Returns:

A new LinearProfile object

static step(lower_boundary, upper_boundary, step_at)

Factory method that creates a new initial concentration profile with a step at the specified distance, otherwise the composition is constant at the specified values.

Parameters:
  • lower_boundary – Composition before the step [unit as defined in CompositionProfile].

  • upper_boundary – Composition after the step [unit as defined in CompositionProfile].

  • step_at – The distance where the step should be [m].

Returns:

A new StepProfile object

class +tc_toolbox.+diffusion.MixedZeroFluxAndActivity

Represents a boundary having zero-flux as well as fixed-activity conditions.

Default: On that boundary for every element without an explicitly defined condition, a zero-flux boundary condition is used.

MixedZeroFluxAndActivity()

Represents a boundary having zero-flux as well as fixed-activity conditions.

Default: On that boundary for every element without an explicitly defined condition, a zero-flux boundary condition is used. Constructs an instance of MixedZeroFluxAndActivity.

static activity_flux_function()

Factory method that creates a new activity-flux-function boundary condition.

This type of boundary condition is used to take into account the finite rate of a surface reaction.

The flux for the independent components must be given in the format:

J = f(T,P,TIME) * ( ACTIVITY^N - g(T,P,TIME) )

where f and g may be functions of time (TIME), temperature (T), and pressure (P), and N is an integer.

f and g must be expressed in DICTRA Console Mode syntax.

Note

The activities are those with user-defined reference states. The function mass transfer coefficient is the mass transfer coefficient, activity of the corresponding species in the gas is the activity of the corresponding species in the gas and N is a stoichiometric coefficient.

Note

For more details see L. Sproge and J. Ågren, “Experimental and theoretical studies of gas consumption in the gas carburizing process” J. Heat Treat. 6, 9–19 (1988).

Returns:

A new ActivityFluxFunction object

static closed_system()

Factory method that creates a new closed-system boundary condition.

Returns:

A new ClosedSystem object

static fix_flux_value()

Factory method that creates a new fix-flux-value boundary condition.

This type of boundary condition makes it possible to enter functions that yield the flux times the molar volume for the independent components. May be a function of time, temperature and pressure: J(T,P,TIME).

Returns:

A new FixFluxValue object

static fixed_compositions(unit_enum)

Factory method that creates a new fixed-composition boundary condition.

Parameters:

unit_enum – The composition unit

Returns:

A new FixedCompositions object

get_type()

The type of the boundary condition.

Returns:

The type

static mixed_zero_flux_and_activity()

Factory method that creates a new mixed zero-flux and activity boundary condition

Returns:

A new MixedZeroFluxAndActivity object

set_activity_for_element(element_name, activity, to_time)

Sets an activity expression for an element at the boundary. Enter a formula that the software evaluates during the calculation.

The formula can be:

  • a function of the variable TIME

  • a constant

The formula must be written with these rules:

  • a number must begin with a number (not a .)

  • a number must have a dot or an exponent (E)

The operators +, -, *, /, ** (exponentiation) can be used and with any level of parenthesis. As shown, the following operators must be followed by open and closed parentheses ()

  • SQRT(X) is the square root

  • EXP(X) is the exponential

  • LOG(X) is the natural logarithm

  • LOG10(X) is the base 10 logarithm

  • SIN(X), COS(X), TAN(X), ASIN(X), ACOS(X), ATAN(X)

  • SINH(X), COSH(X), TANH(X), ASINH(X), ACOSH(X), ATANH(X)

  • SIGN(X)

  • ERF(X) is the error function

Default: the expression entered is used for the entire simulation.

Parameters:
  • element_name – The name of the element

  • activity – The activity

  • to_time – The max-time for which the activity is used.

set_zero_flux_for_element(element_name)

Sets a zero-flux condition for an element at the boundary. Default for all elements at the boundary without an explicitly defined condition

Parameters:

element_name – The name of the element

class +tc_toolbox.+diffusion.Options

General simulation conditions for the diffusion calculations.

Options()

General simulation conditions for diffusion calculations. Constructs an instance of Options.

disable_forced_starting_values_in_equilibrium_calculations()

Disables forced starting values for the equilibrium calculations. The default is ‘enable_automatic_forced_starting_values_in_equilibrium_calculations’.

Returns:

This Options object

disable_save_results_to_file()

Disables the saving of results to file during the simulation. Default: Saving of the results at every timestep

Returns:

This Options object

enable_automatic_forced_starting_values_in_eq_calculations()

Lets calculation engine decide if forced start values for the equilibrium calculations should be used. This is the default setting.

Returns:

This Options object

enable_forced_starting_values_in_equilibrium_calculations()

Enables forced start values for the equilibrium calculations. The default is ‘enable_automatic_forced_starting_values_in_equilibrium_calculations’.

Returns:

This Options object

enable_save_results_to_file(every_nth_step)

Enables and configures saving of results to file during the simulation. They can be saved for every n-th or optionally for every timestep (-1). Default: Saving of the results at every timestep

Parameters:

every_nth_step-1 or a value ranging from 0 to 99

Returns:

This Options object

enable_time_integration_method_automatic()

Enables automatic selection of integration method. This is the default method.

Returns:

This Options object

enable_time_integration_method_euler_backwards()

Enables Euler backwards integration. The default method is enable_time_integration_method_automatic.

Note

This method is more stable but less accurate and may be necessary if large fluctuations occur in the profiles.

Returns:

This Options object

enable_time_integration_method_trapezoidal()

Enables trapezoidal integration.

Note

If large fluctuations occur in the profiles, it may be necessary to use the more stable but less accurate Euler backwards method.

Returns:

This Options object

set_default_driving_force_for_phases_allowed_to_form_at_interf(driving_force)

Sets the default required driving force for phases allowed to form at the interfaces. Default: 1.0e-5

Note

The required driving force (evaluated as DGM(ph)) is used for determining whether an inactive phase is stable, i.e. actually formed. DGM represents the driving force normalized by RT and is dimensionless.

Parameters:

driving_force – The driving force (DGM(ph)) [-]

Returns:

This Options object

class +tc_toolbox.+diffusion.PointByPointGrid(unit_enum)

Represents a point-by-point grid. This is setting the grid and the compositions at once, it is typically used to enter a measured composition profile or the result from a previous calculation.

Note

If a point-by-point grid is used, it is not necessary to specify the grid and composition profile separately.

PointByPointGrid(unit_enum)

Represents a point-by-point grid.

Parameters:

unit_enum – The unit of the compositions

add_point(grid_point)

Adds a grid point to the grid.

Parameters:

grid_point – The grid point

Returns:

This PointByPointGrid object

get_type()

Type of the grid.

Returns:

The type

class +tc_toolbox.+diffusion.Region(name)

Represents a region of the simulation domain that can contain more that one phase.

Note

The first added phase represents the matrix phase, while all later added phases are spheriod phases, i.e. precipitate phases.

Region(name)

A region of the simulation domain that can contain more than one phase.

Note

The first added phase represents the matrix phase, while all later added phases are spheriod phases, i.e. precipitate phases.

Parameters:

name – The name of the region

add_phase(phase_name, is_matrix_phase)

Adds a phase to the region, each region must contain at least one phase.

Note

Normally the matrix phase and the precipitate phases are automatically chosen based on the presence of all profile elements in the phase and if it has diffusion data. If multiple phases have equal properties, the phase that was added first is chosen. The matrix phase can be explicitly set by using is_matrix_phase=True.

Note

If multiple phases are added to a region, the homogenization model is applied. That means that average properties of the local phase mixture are used.

Parameters:
  • phase_name – The phase name

  • is_matrix_phase – If set to True this phase is explicitly set as matrix phase for the region, if no phase is set to True, the matrix phase is chosen automatically

Returns:

This Region object

add_phase_allowed_to_form_at_left_interface(phase_name, driving_force)

Adds a phase allowed to form at the left boundary of the region (an inactive phase). The phase will only appear at the interface as a new automatic region if the driving force to form it is sufficiently high.

Parameters:
  • phase_name – The phase name

  • driving_force – The driving force for the phase to form (DGM(ph))

Returns:

This Region object

add_phase_allowed_to_form_at_right_interface(phase_name, driving_force)

Adds a phase allowed to form at the right boundary of the region (an inactive phase). The phase will only appear at the interface as a new automatic region if the driving force to form it is sufficiently high.

Parameters:
  • phase_name – The phase name

  • driving_force – The driving force for the phase to form (DGM(ph))

Returns:

This Region object

remove_all_phases()

Removes all previously added phases from the region.

Returns:

This Region object

set_width(width)

Defined the width of the region.

Note

This method needs only to be used if a calculated grid has been defined (using with_grid()).

Parameters:

width – The width [m]

Returns:

This Region object

with_composition_profile(initial_compositions)

Defines the initial composition profiles for all elements in the region.

Note

This method needs only to be used if a calculated grid has been defined (using with_grid()).

Parameters:

initial_compositions – The initial composition profiles for all elements

Returns:

This Region object

with_grid(grid)

Defines a calculated grid in the region. If measured composition profiles or the result from a previous calculation should be used, instead with_point_by_point_grid_containing_compositions() needs to be applied.

Note

The composition profiles need to be defined separately using with_composition_profile(), additionally the region width needs to be specified using set_width().

Parameters:

grid – The grid

Returns:

This Region object

with_point_by_point_grid_containing_compositions(grid)

Defines a point-by-point grid in the region. This is setting the grid and the compositions at once, it is typically used to enter a measured composition profile or the result from a previous calculation. If the composition profile should be calculated (linear, geometric, …) with_grid() should be used instead.

Note

If a point-by-point grid is used, with_grid(), with_composition_profile() and set_width() are unnecessary and must not be used.

Parameters:

grid – The point-by-point grid

Returns:

This Region object

class +tc_toolbox.+diffusion.RuleOfMixtures

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion.

RuleOfMixtures()

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion. Constructs an instance of RuleOfMixtures.

static general_lower_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikman.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralLowerHashinShtrikman object

static general_lower_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikmanExcludedPhase.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralLowerHashinShtrikmanExcludedPhase object

static general_upper_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikman.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralUpperHashinShtrikman object

static general_upper_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikmanExcludedPhase.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralUpperHashinShtrikmanExcludedPhase object

static hashin_shtrikman_bound_majority()

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajority.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new HashinShtrikmanBoundMajority object

static hashin_shtrikman_bound_majority_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajorityExcludedPhase.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction. Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundMajorityExcludedPhase object

static hashin_shtrikman_bound_prescribed(matrix_phase)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribed.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new HashinShtrikmanBoundPrescribed object

static hashin_shtrikman_bound_prescribed_excluded_phase(matrix_phase, excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribedExcludedPhase.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:
  • matrix_phase – The matrix phase

  • excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundPrescribedExcludedPhase object

static inverse_rule_of_mixtures()

Factory method that creates a new homogenization function of the type InverseRuleOfMixtures.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion.

Returns:

A new InverseRuleOfMixtures object

static inverse_rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type InverseRuleOfMixturesExcludedPhase.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new InverseRuleOfMixturesExcludedPhase object

static labyrinth_factor_f(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF object

static labyrinth_factor_f2(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF2.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase squared.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF2 object

static rule_of_mixtures()

Factory method that creates a new homogenization function of the type RuleOfMixtures.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion.

Returns:

A new RuleOfMixtures object

static rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type RuleOfMixturesExcludedPhase.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new RuleOfMixturesExcludedPhase object

class +tc_toolbox.+diffusion.RuleOfMixturesExcludedPhase(excluded_phases)

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion.

Excluded phases are not considered in the diffusion calculations.

RuleOfMixturesExcludedPhase(excluded_phases)

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion.

Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

static general_lower_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikman.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralLowerHashinShtrikman object

static general_lower_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralLowerHashinShtrikmanExcludedPhase.

General lower Hashin-Shtrikman bounds: the outermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralLowerHashinShtrikmanExcludedPhase object

static general_upper_hashin_shtrikman()

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikman.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new GeneralUpperHashinShtrikman object

static general_upper_hashin_shtrikman_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type GeneralUpperHashinShtrikmanExcludedPhase.

General upper Hashin-Shtrikman bounds: the innermost shell consists of the phase with the most sluggish kinetics.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new GeneralUpperHashinShtrikmanExcludedPhase object

static hashin_shtrikman_bound_majority()

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajority.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Returns:

A new HashinShtrikmanBoundMajority object

static hashin_shtrikman_bound_majority_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundMajorityExcludedPhase.

Hashin-Shtrikman bounds with majority phase as matrix phase: the outermost shell consists of the phase with the highest local volume fraction. Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:

excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundMajorityExcludedPhase object

static hashin_shtrikman_bound_prescribed(matrix_phase)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribed.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new HashinShtrikmanBoundPrescribed object

static hashin_shtrikman_bound_prescribed_excluded_phase(matrix_phase, excluded_phases)

Factory method that creates a new homogenization function of the type HashinShtrikmanBoundPrescribedExcludedPhase.

Hashin-Shtrikman bounds with prescribed phase as matrix phase: the outermost shell consists of the prescribed phase.

Based on a variant of the Hashin-Shtrikman bounds, their geometrical interpretation are concentric spherical shells of each phase. The excluded phases are not considered when evaluating what phase has the most sluggish kinetics.

Parameters:
  • matrix_phase – The matrix phase

  • excluded_phases – The excluded phases

Returns:

A new HashinShtrikmanBoundPrescribedExcludedPhase object

static inverse_rule_of_mixtures()

Factory method that creates a new homogenization function of the type InverseRuleOfMixtures.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion.

Returns:

A new InverseRuleOfMixtures object

static inverse_rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type InverseRuleOfMixturesExcludedPhase.

Lower Wiener bounds: the geometrical interpretation are continuous layers of each phase orthogonal to the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new InverseRuleOfMixturesExcludedPhase object

static labyrinth_factor_f(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF object

static labyrinth_factor_f2(matrix_phase)

Factory method that creates a new homogenization function of the type LabyrinthFactorF2.

The labyrinth factor functions implies that all diffusion takes place in a single continuous matrix phase. The impeding effect on diffusion by phases dispersed in the matrix phase is taken into account by multiplying the flux with the volume fraction of the matrix phase squared.

Parameters:

matrix_phase – The matrix phase

Returns:

A new LabyrinthFactorF2 object

static rule_of_mixtures()

Factory method that creates a new homogenization function of the type RuleOfMixtures.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion.

Returns:

A new RuleOfMixtures object

static rule_of_mixtures_excluded_phase(excluded_phases)

Factory method that creates a new homogenization function of the type RuleOfMixturesExcludedPhase.

Upper Wiener bounds: the geometrical interpretation are continuous layers of each phase parallel with the direction of diffusion. Excluded phases are not considered in the diffusion calculations.

Parameters:

excluded_phases – The excluded phases

Returns:

A new RuleOfMixturesExcludedPhase object

class +tc_toolbox.+diffusion.SimulationTime

Specifying special time steps for the evaluation of diffusion results.

Note

These placeholders should be used because especially the actual last timestep will slightly differ from the specified end time of the simulation.

class +tc_toolbox.+diffusion.Solver

Factory class providing objects representing a solver.

static automatic()

Factory method that creates a new automatic solver. This is the default solver and recommended for most applications.

Note

This solver uses the homogenization model if any region has more than one phase, otherwise it uses the classic model.

Returns:

A new AutomaticSolver object

static classic()

Factory method that creates a new classic solver.

Note

This solver never switches to the homogenization model even if the solver fails to converge. Use the +tc_toolbox.diffusion.AutomaticSolver if necessary instead.

Returns:

A new ClassicSolver object

static homogenization()

Factory method that creates a new homogenization solver.

Note

This solver always uses the homogenization model, even if all regions have only one phase. The solver is significantly slower than the Classic model. Use the +tc_toolbox.diffusion.AutomaticSolver instead if you do not need that behavior.

Returns:

A new HomogenizationSolver object

class +tc_toolbox.+diffusion.StepProfile(lower_boundary, upper_boundary, step_at)

Represents an initial constant concentration profile with a step at the specified position.

StepProfile(lower_boundary, upper_boundary, step_at)

Creates an initial concentration profile with a step at the specified position, otherwise the composition is constant at the specified values.

Parameters:
  • lower_boundary – Composition before the step [unit as defined in CompositionProfile].

  • upper_boundary – Composition after the step [unit as defined in CompositionProfile].

  • step_at – The distance where the step should be [m].

static constant(value)

Factory method that creates a new constant initial concentration profile.

Parameters:

value – The constant composition in the region. [unit as defined in CompositionProfile].

Returns:

A new ConstantProfile object

static funct(dictra_console_mode_function)

Factory method that creates a new initial concentration profile defined by a function in DICTRA Console Mode syntax.

Note

This is an advanced feature, preferably a complex concentration profile should be generated using third party libraries and added to the simulation using +tc_toolbox.diffusion.PointByPointGrid.

Parameters:

dictra_console_mode_function – The function, expressed in DICTRA Console Mode syntax.

Returns:

A new FunctionProfile object

get_type()

The type of the element profile.

Returns:

The type

static linear(start_value, end_value)

Factory method that creates a new linear initial concentration profile.

Parameters:
  • start_value – Composition at the left side of the region [unit as defined in CompositionProfile].

  • end_value – Composition at the right side of the region [unit as defined in CompositionProfile].

Returns:

A new LinearProfile object

static step(lower_boundary, upper_boundary, step_at)

Factory method that creates a new initial concentration profile with a step at the specified distance, otherwise the composition is constant at the specified values.

Parameters:
  • lower_boundary – Composition before the step [unit as defined in CompositionProfile].

  • upper_boundary – Composition after the step [unit as defined in CompositionProfile].

  • step_at – The distance where the step should be [m].

Returns:

A new StepProfile object

class +tc_toolbox.+diffusion.TimestepControl

Settings that control the time steps in the simulation.

TimestepControl()

Settings that control the time steps in the simulation. Constructs an instance of TimestepControl.

disable_check_interface_position()

Disables checking of the interface position, i.e. the timesteps are not controlled by the phase interface displacement during the simulation. The default setting is :func:`enable_automatic_check_interface_position`.

Returns:

This TimestepControl object

enable_automatic_check_interface_position()

Lets calculation engine decide if checking of the interface position should be used. This is the default setting.

Returns:

This TimestepControl object

enable_check_interface_position()

Enables checking of the interface position, i.e. the timesteps are controlled by the phase interface displacement during the simulation. The default setting is :func:`enable_automatic_check_interface_position`.

Returns:

This TimestepControl object

set_initial_time_step(initial_time_step)

Sets the initial timestep. Default: 1.0e-7 s

Parameters:

initial_time_step – The initial timestep [s]

Returns:

This TimestepControl object

set_max_absolute_error(absolute_error)

Sets the maximum absolute error. Default: 1.0e-5

Parameters:

absolute_error – The maximum absolute error

Returns:

This TimestepControl object

set_max_relative_error(relative_error)

Sets the maximum relative error. Default: 0.05

Parameters:

relative_error – The maximum relative error

Returns:

This TimestepControl object

set_max_timestep_allowed_as_percent_of_simulation_time(max_timestep_allowed_as_percent_of_simulation_time)

The maximum timestep allowed during the simulation, specified in percent of the simulation time. Default: 10.0%

Parameters:

max_timestep_allowed_as_percent_of_simulation_time – The maximum timestep allowed [%]

Returns:

This TimestepControl object

set_max_timestep_increase_factor(max_timestep_increase_factor)

Sets the maximum timestep increase factor. Default: 2

Note

For example, if 2 is entered the maximum time step is twice as long as the previous time step taken.

Parameters:

max_timestep_increase_factor – The maximum timestep increase factor

Returns:

This TimestepControl object

set_smallest_time_step_allowed(smallest_time_step_allowed)

Sets the smallest time step allowed during the simulation. This is required when using the automatic procedure to determine the time step. Default: 1.0e-7 s

Parameters:

smallest_time_step_allowed – The smalles timestep allowed [s]

Returns:

This TimestepControl object

class +tc_toolbox.+diffusion.Unit

Represents a composition unit.