Module “precipitation”¶
- class tc_python.precipitation.FixedGrainSize(grain_radius: float = 0.0001)¶
Bases:
GrainGrowthModel- set_grain_aspect_ratio(grain_aspect_ratio: float = 1.0)¶
Enter a numerical value. Default: 1.0.
- Parameters:
grain_aspect_ratio – The grain aspect ratio [-]
- class tc_python.precipitation.GrainGrowth(grain_size_distribution: GrainSizeDistribution)¶
Bases:
GrainGrowthModel- disable_zener_pinning()¶
Disable Zener pinning to ignore the particle pinning effect on the grain growth. Zener pinning is by default disabled when no grain size distribution is defined, i.e. a single constant grain size is used. The setting is by default enabled when a grain size distribution is defined.
- Returns:
This
GrainSizeDistributionobject
- enable_zener_pinning()¶
Enable Zener pinning to simulate the particle pinning effect on the grain growth. The setting is by default enabled when a grain size distribution is defined.
- Returns:
This
GrainSizeDistributionobject
- set_grain_boundary_energy(energy: float = 0.5)¶
Set the energy of the grain boundary.
- Parameters:
energy – The grain boundary energy [J/m2]
- Returns:
This
GrainSizeDistributionobject
- set_grain_boundary_mobility_activation_energy(activation_energy: float = 242000.0)¶
Set the grain boundary mobility activation energy where the mobility is defined by an Arrhenius type of equation.
- Parameters:
activation_energy – The mobility activation energy [J/mol]
- Returns:
This
GrainSizeDistributionobject
- set_grain_boundary_mobility_pre_factor(pre_factor: float = 0.004)¶
Set the grain boundary mobility prefactor where the mobility is defined by an Arrhenius type of equation.
- Parameters:
pre_factor – The grain boundary mobility pre factor [m^4/(J s)]
- Returns:
This
GrainSizeDistributionobject
- class tc_python.precipitation.GrainGrowthModel¶
Bases:
objectFactory class providing objects representing a grain growth model.
- classmethod fixed_grain_size(grain_radius: float = 0.0001)¶
Fixed grain radius size. Default: 1.0E-4 m
- Parameters:
grain_radius – The grain radius / size [m]
- classmethod grain_growth(grain_size_distribution: GrainSizeDistribution)¶
Sets the initial grain size distribution for the matrix. Default: If the initial grain size distribution is not explicitly provided, a constant average grains size will be used and no grain growth evaluated during the simulation.
Tip
Use this option if you want to study the further evolution of an existing microstructure.
- Parameters:
grain_size_distribution – grain size distribution
- class tc_python.precipitation.GrainSizeDistribution¶
Bases:
objectRepresents the grain size distribution at a certain time.
- add_radius_and_number_density(radius: float, number_density: float)¶
Adds a radius and number density pair to the grain size distribution.
- Parameters:
radius – The radius [m]
number_density – The number of grains per unit volume per unit length [m^-4]
- Returns:
This
GrainSizeDistributionobject
- class tc_python.precipitation.GrowthRateModel(value)¶
Bases:
EnumChoice of the used growth rate model for a precipitate.
The most efficient model is the Simplified model, which is the default and applicable to most alloy systems under the assumption that either the supersaturation is small, or the alloying elements have comparable diffusivity. If all alloying elements are substitutional but they have remarkable diffusivity difference, e.g. in Al-Zr system, or if the diffusivity is strongly composition-dependent, the General model is preferred. If the supersaturation is high, and meanwhile there are fast-diffusing interstitial elements such as C, the Advanced model is more appropriate to capture the NPLE mechanism.
- ADVANCED = 3¶
The advanced model has been proposed by Chen, Jeppsson, and Ågren (CJA) (2008) and calculates the velocity of a moving phase interface in multicomponent systems by identifying the operating tie-line from the solution of the flux-balance equations. This model can treat both high supersaturation and cross-diffusion rigorously. Spontaneous transitions between different modes (LE and NPLE) of phase transformation can be captured without any ad-hoc treatment.
Note
Since it is not always possible to solve the flux-balance equations and it takes time, usage of a less rigorous but simple and efficient model is preferred if possible.
- GENERAL = 5¶
The general model is based on the Morral-Purdy model, which follows the same quasi-steady state approximation as the Simplified model, but improves it by taking the cross-diffusion into account.
- NPLE = 11¶
The Non-Partitioning Local Equilibrium (NPLE) growth rate model is only available for alloy systems where Fe is the major element and at least one interstitial element partitions into the precipitate phase. This model is specifically designed to deal with the fast diffusion of interstitial elements (C, N, etc.) in Fe alloys. Based on the Simplified growth model, it still holds a local equilibrium condition at the migrating interface. It chooses a tie-line under NPLE condition so that the u-fractions of all substitutional elements and minor interstitial elements in the precipitate phase are the same as those in the far-field matrix phase (i.e. the overall instantaneous matrix composition).
- PARA_EQ = 10¶
The para-equilibrium model is only available for alloy systems where Fe is the major element and C is the only interstitial element, which also partitions into the precipitate phase. The interstitial elements, e.g. C, N, etc., usually have remarkably faster diffusion rate than the substitutional elements. Meanwhile, they are assumed to have negligible volume contribution, and as a result the composition variables are replaced by u-fractions when interstitial elements are included in the system. This model is specifically designed to address the fast diffusion of C in Fe alloys. Based on the Simplified growth rate model it holds a para-equilibrium condition at the migrating interface. Contrary to the regular ortho-equilibrium condition state that assumes that all alloying elements are in equilibrium at the interface, the para-equilibrium assumes only equilibrium for C. The substitutional elements are immobile and thus have the same compositions (u-fractions) across the interface.
- PE_AUTOMATIC = 12¶
The PE Automatic model enables the smooth transition from Paraequilibrium growth rate model to Simplified growth rate model. The rate of transition process is dependent on the relative differences in diffusion between C and substitutional elements, as well as the differences in driving force between paraequilibrium and ortho-equilibrium.
- SIMPLIFIED = 2¶
The simplified model is based on the advanced model but avoids the difficulty of finding the operating tie-line and uses instead the tie-line across the bulk composition. This is the default growth rate model.
- class tc_python.precipitation.MatrixPhase(matrix_phase_name: str)¶
Bases:
objectThe matrix phase in a precipitation calculation
- add_precipitate_phase(precipitate_phase: PrecipitatePhase)¶
Adds a precipitate phase.
- Parameters:
precipitate_phase – The precipitate phase
- set_dislocation_density(dislocation_density: float = 5000000000000.0)¶
Enter a numerical value. Default: 5.0E12 m^-2.
- Parameters:
dislocation_density – The dislocation density [m^-2]
- set_mobility_adjustment(element: str = 'all', prefactor: float = 1.0, activation_energy: float = 0.0)¶
A value that adds to the activation energy of mobility data from the database.
- Parameters:
element – The alement to apply the adjustment for. If “all” is given, adjustment will apply to all elements.
prefactor – A parameter that multiplies to the mobility data from a database. This value scales the mobility by a constant amount. This can be useful, for example, when the material has a higher than normal vacancy concentration at the start of the precipitation simulation (e.g. from a prior solutionizing and quenching treatment).
activation_energy – A value that adds to the activation energy of mobility data from a database. It scales the mobility by a temperature dependent amount. Similar usage as mobility adjustment prefactor. [J/mol]
- set_molar_volume(volume: float)¶
Sets the molar volume of the phase.
Default: If not set, the molar volume is taken from the thermodynamic database (or set to 7.0e-6 m^3/mol if the database contains no molar volume information).
- Parameters:
volume – The molar volume [m^3/mol]
- with_elastic_properties_cubic(c11: float, c12: float, c44: float)¶
Sets the elastic properties to “cubic” and specifies the elastic stiffness tensor components. Default: if not chosen, the default is DISREGARD
- Parameters:
c11 – The stiffness tensor component c11 [GPa]
c12 – The stiffness tensor component c12 [GPa]
c44 – The stiffness tensor component c44 [GPa]
- with_elastic_properties_disregard()¶
Set to disregard to ignore the elastic properties. Default: This is the default option
- with_elastic_properties_isotropic(shear_modulus: float, poisson_ratio: float)¶
Sets elastic properties to isotropic. Default: if not chosen, the default is DISREGARD
- Parameters:
shear_modulus – The shear modulus [GPa]
poisson_ratio – The Poisson’s ratio [-]
- with_grain_growth_model(grain_growth_model: GrainGrowthModel)¶
Sets the model for grain growth. Either fixed size or with a starting distribution
Default: Fixed grain radius size 1.0E-4 m
- Parameters:
grain_growth_model – the grain growth model
- class tc_python.precipitation.NumericalParameters¶
Bases:
objectNumerical parameters
- set_max_overall_volume_change(max_overall_volume_change: float = 0.001)¶
This defines the maximum absolute (not ratio) change of the volume fraction allowed during one time step. Default: 0.001
- Parameters:
max_overall_volume_change – The maximum absolute (not ratio) change of the volume fraction allowed during one time step [-]
- set_max_radius_points_per_magnitude(max_radius_points_per_magnitude: float = 200.0)¶
Sets the maximum number of grid points over one order of magnitude in radius. Default: 200.0
- Parameters:
max_radius_points_per_magnitude – The maximum number of grid points over one order of magnitude in radius [-]
- set_max_rel_change_critical_radius(max_rel_change_critical_radius: float = 0.1)¶
Used to place a constraint on how fast the critical radium can vary, and thus put a limit on time step. Default: 0.1
- Parameters:
max_rel_change_critical_radius – The maximum relative change of the critical radius [-]
- set_max_rel_change_nucleation_rate_log(max_rel_change_nucleation_rate_log: float = 0.5)¶
This parameter ensures accuracy for the evolution of effective nucleation rate. Default: 0.5
- Parameters:
max_rel_change_nucleation_rate_log – The maximum logarithmic relative change of the nucleation rate [-]
- set_max_rel_radius_change(max_rel_radius_change: float = 0.01)¶
The maximum value allowed for relative radius change in one time step. Default: 0.01
- Parameters:
max_rel_radius_change – The maximum relative radius change in one time step [-]
- set_max_rel_solute_composition_change(max_rel_solute_composition_change: float = 0.01)¶
Set a limit on the time step by controlling solute depletion or saturation, especially at isothermal stage. Default: 0.01
- Parameters:
max_rel_solute_composition_change – The limit for the relative solute composition change [-]
- set_max_time_step(max_time_step: float = 0.1)¶
The maximum time step allowed for time integration as fraction of the simulation time. Default: 0.1
- Parameters:
max_time_step – The maximum time step as fraction of the simulation time [-]
- set_max_time_step_during_heating(max_time_step_during_heating: float = 1.0)¶
The upper limit of the time step that has been enforced in the heating stages. Default: 1.0 s
- Parameters:
max_time_step_during_heating – The maximum time step during heating [s]
- set_max_volume_fraction_dissolve_time_step(max_volume_fraction_dissolve_time_step: float = 0.01)¶
Sets the maximum volume fraction of subcritical particles allowed to dissolve in one time step. Default: 0.01
- Parameters:
max_volume_fraction_dissolve_time_step – The maximum volume fraction of subcritical particles allowed to dissolve in one time step [-]
- set_min_radius_nucleus_as_particle(min_radius_nucleus_as_particle: float = 5e-10)¶
The cut-off lower limit of precipitate radius. Default: 5.0E-10 m
- Parameters:
min_radius_nucleus_as_particle – The minimum radius of a nucleus to be considered as a particle [m]
- set_min_radius_points_per_magnitude(min_radius_points_per_magnitude: float = 100.0)¶
Sets the minimum number of grid points over one order of magnitude in radius. Default: 100.0
- Parameters:
min_radius_points_per_magnitude – The minimum number of grid points over one order of magnitude in radius [-]
- set_pre_processing_option(preprocessing_option: PreProcessingOption)¶
Sets the option for enabling pre-processing equilibrium data as a function of temperature. This can be extended to include incipient melting where the incipient melting temperature is approximated for each phase. If the temperature exceeds the incipient melting temperature, the precipitates are removed from the system.
- Parameters:
preprocessing_option – Specifies if the preprocessing is either turned off, enabled, or enabled with incipient melting.
- set_radius_points_per_magnitude(radius_points_per_magnitude: float = 150.0)¶
Sets the number of grid points over one order of magnitude in radius. Default: 150.0
- Parameters:
radius_points_per_magnitude – The number of grid points over one order of magnitude in radius [-]
- set_rel_radius_change_class_collision(rel_radius_change_class_collision: float = 0.5)¶
Sets the relative radius change for avoiding class collision. Default: 0.5
- Parameters:
rel_radius_change_class_collision – The relative radius change for avoiding class collision [-]
- class tc_python.precipitation.ParticleSizeDistribution¶
Bases:
objectRepresents the state of a microstructure evolution at a certain time including its particle size distribution, composition and overall phase fraction.
- add_radius_and_number_density(radius: float, number_density: float)¶
Adds a radius and number density pair to the particle size distribution.
- Parameters:
radius – The radius [m]
number_density – The number of particles per unit volume per unit length [m^-4]
- Returns:
This
ParticleSizeDistributionobject
- set_initial_composition(element_name: str, composition_value: float)¶
Sets the initial precipitate composition.
- Parameters:
element_name – The name of the element
composition_value – The composition value [composition unit defined for the calculation]
- Returns:
This
ParticleSizeDistributionobject
- set_volume_fraction_of_phase_type(volume_fraction_of_phase_type_enum: VolumeFractionOfPhaseType)¶
Sets the type of the phase fraction or percentage. Default: By default volume fraction is used.
- Parameters:
volume_fraction_of_phase_type_enum – Specifies if volume percent or fraction is used
- Returns:
This
ParticleSizeDistributionobject
- set_volume_fraction_of_phase_value(value: float)¶
Sets the overall volume fraction of the phase (unit based on the setting of
set_volume_fraction_of_phase_type()).- Parameters:
value – The volume fraction 0.0 - 1.0 or percent value 0 - 100
- Returns:
This
ParticleSizeDistributionobject
- class tc_python.precipitation.PreProcessingOption(value)¶
Bases:
EnumOptions for preprocessing.
- OFF = 0¶
By default, the equilibrium properties are not characterized prior to a simulation.
- ON = 1¶
The equilibrium properties are characterized as a function of temperature prior to the simulation.
- ON_WITH_INCIPIENT_MELTING = 2¶
The equilibrium properties are characterized as a function of temperature, and the approximate incipient melting temperatures are determined for each precipitate phase.
- class tc_python.precipitation.PrecipitateElasticProperties¶
Bases:
objectRepresents the elastic transformation strain of a certain precipitate class.
Note
This class is only relevant if the option
TransformationStrainCalculationOption.USER_DEFINEDhas been chosen usingPrecipitatePhase.set_transformation_strain_calculation_option(). The elastic strain can only be considered for non-spherical precipitates.- set_e11(e11: float)¶
Sets the elastic strain tensor component e11. Default: 0.0
- Parameters:
e11 – The elastic strain tensor component e11
- Returns:
This
PrecipitateElasticPropertiesobject
- set_e12(e12: float)¶
Sets the strain tensor component e12. Default: 0.0
- Parameters:
e12 – The elastic strain tensor component e12
- Returns:
This
PrecipitateElasticPropertiesobject
- set_e13(e13: float)¶
Sets the elastic strain tensor component e13. Default: 0.0
- Parameters:
e13 – The elastic strain tensor component e13
- Returns:
This
PrecipitateElasticPropertiesobject
- set_e22(e22: float)¶
Sets the elastic strain tensor component e22. Default: 0.0
- Parameters:
e22 – The elastic strain tensor component e22
- Returns:
This
PrecipitateElasticPropertiesobject
- set_e23(e23: float)¶
Sets the elastic strain tensor component e23. Default: 0.0
- Parameters:
e23 – The elastic strain tensor component e23
- Returns:
This
PrecipitateElasticPropertiesobject
- set_e33(e33: float)¶
Sets the elastic strain tensor component e33. Default: 0.0
- Parameters:
e33 – The elastic strain tensor component e33
- Returns:
This
PrecipitateElasticPropertiesobject
- class tc_python.precipitation.PrecipitateMorphology(value)¶
Bases:
EnumAvailable precipitate morphologies.
- CUBOID = 3¶
Cuboidal precipitates, only available for bulk nucleation.
- NEEDLE = 1¶
Needle-like precipitates, only available for bulk nucleation.
- PLATE = 2¶
Plate-like precipitates, only available for bulk nucleation.
- SPHERE = 0¶
Spherical precipitates, this is the default morphology.
- class tc_python.precipitation.PrecipitatePhase(precipitate_phase_name: str)¶
Bases:
objectRepresents a certain precipitate class (i.e. a group of precipitates with the same phase and settings).
- disable_calculate_aspect_ratio_from_elastic_energy()¶
Disables the automatic calculation of the aspect ratio from the elastic energy of the phase.
- Returns:
This
PrecipitatePhaseobject
Note
If you use this method, you are required to set the aspect ratio explicitly using the method
set_aspect_ratio_value().Default: This is the default setting (with an aspect ratio of 1.0).
- disable_driving_force_approximation()¶
Disables driving force approximation for this precipitate class. Default: Driving force approximation is disabled.
- Returns:
This
PrecipitatePhaseobject
- enable_calculate_aspect_ratio_from_elastic_energy()¶
Enables the automatic calculation of the aspect ratio from the elastic energy of the phase. Default: The aspect ratio is set to a value of 1.0.
- Returns:
This
PrecipitatePhaseobject
- enable_driving_force_approximation()¶
Enables driving force approximation for this precipitate class. This approximation is often required when simulating precipitation of multiple particles that use the same phase description. E.g. simultaneous precipitation of a Metal-Carbide(MC) and Metal-Nitride(MN) if configured as different composition sets of the same phase FCC_A1. Default: Driving force approximation is disabled.
- Returns:
This
PrecipitatePhaseobject
Tip
Use this if simulations with several compositions sets of the same phase cause problems.
- set_alias(alias: str)¶
Sets an alias string that can later be used to get values from a calculated result. Typically used when having the same phase for several precipitates, but with different nucleation sites. For example two precipitates of the phase M7C3 with nucleation sites in ‘Bulk’ and at ‘Dislocations’. The alias can be used instead of the phase name when retrieving simulated results.
- Parameters:
alias – The alias string for this class of precipitates
- Returns:
This
PrecipitatePhaseobject
Note
Typically used when having using the same precipitate phase, but with different settings in the same calculation.
- set_aspect_ratio_value(aspect_ratio_value: float)¶
Sets the aspect ratio of the phase. Default: An aspect ratio of 1.0.
- Parameters:
aspect_ratio_value – The aspect ratio value
- Returns:
This
PrecipitatePhaseobject
Note
Only relevant if
disable_calculate_aspect_ratio_from_elastic_energy()is used (which is the default).
- set_gibbs_energy_addition(gibbs_energy_addition: float)¶
Sets a Gibbs energy addition to the Gibbs energy of the phase. Default: 0,0 J/mol
- Parameters:
gibbs_energy_addition – The Gibbs energy addition [J/mol]
- Returns:
This
PrecipitatePhaseobject
- set_interfacial_energy(interfacial_energy: float)¶
Sets the interfacial energy. Default: If the interfacial energy is not set, it is automatically calculated using a broken-bond model.
- Parameters:
interfacial_energy – The interfacial energy [J/m^2]
- Returns:
This
PrecipitatePhaseobject
Note
The calculation of the interfacial energy using a broken-bond model is based on the assumption of an interface between a bcc- and a fcc-crystal structure with (110) and (111) lattice planes regardless of the actual phases.
- set_interfacial_energy_estimation_prefactor(interfacial_energy_estimation_prefactor: float)¶
Sets the interfacial energy prefactor. Default: Prefactor of 1.0 (only relevant if the interfacial energy is automatically calculated).
- Parameters:
interfacial_energy_estimation_prefactor – The prefactor for the calculated interfacial energy
- Returns:
This
PrecipitatePhaseobject
Note
The interfacial energy prefactor is an amplification factor for the automatically calculated interfacial energy. Example: interfacial_energy_estimation_prefactor = 2.5 => 2.5 * calculated interfacial energy
- set_molar_volume(volume: float)¶
Sets the molar volume of the precipitate phase. Default: The molar volume obtained from the database. If no molar volume information is present in the database, a value of 7.0e-6 m^3/mol is used.
- Parameters:
volume – The molar volume [m^3/mol]
- Returns:
This
PrecipitatePhaseobject
- set_nucleation_at_dislocations(number_density=-1)¶
Activates nucleation at dislocations for this class of precipitates. Calling the method overrides any other nucleation setting for this class of precipitates. Default: If not set, by default bulk nucleation is chosen.
- Parameters:
number_density – Number density of nucleation sites. If not set, the value is calculated based on the matrix settings (grain size, dislocation density) [m^-3].
- Returns:
This
PrecipitatePhaseobject
- set_nucleation_at_grain_boundaries(wetting_angle: float = 90.0, number_density: float = -1)¶
Activates nucleation at grain boundaries for this class of precipitates. Calling the method overrides any other nucleation setting for this class of precipitates. Default: If not set, by default bulk nucleation is chosen.
- Parameters:
wetting_angle – If not set, a default value of 90 degrees is used
number_density – Number density of nucleation sites. If not set, the value is calculated based on the matrix settings (grain size) [m^-3].
- Returns:
This
PrecipitatePhaseobject
- set_nucleation_at_grain_corners(wetting_angle: float = 90, number_density: float = -1)¶
Activates nucleation at grain corners for this class of precipitates. Calling the method overrides any other nucleation setting for this class of precipitates. Default: If not set, by default bulk nucleation is chosen.
- Parameters:
wetting_angle – If not set, a default value of 90 degrees is used]
number_density – Number density of nucleation sites. If not set, the value is calculated based on the matrix settings (grain size) [m^-3].
- Returns:
This
PrecipitatePhaseobject
- set_nucleation_at_grain_edges(wetting_angle=90, number_density=-1)¶
Activates nucleation at the grain edges for this class of precipitates. Calling the method overrides any other nucleation setting for this class of precipitates. Default: If not set, by default bulk nucleation is chosen.
- Parameters:
wetting_angle – If not set, a default value of 90 degrees is used
number_density – Number density of nucleation sites. If not set, the value is calculated based on the matrix settings (grain size) [m^-3].
- Returns:
This
PrecipitatePhaseobject
- set_nucleation_in_bulk(number_density: float = -1.0)¶
Activates nucleation in the bulk for this class of precipitates. Calling the method overrides any other nucleation setting for this class of precipitates. Default: This is the default setting (with an automatically calculated number density).
- Parameters:
number_density – Number density of nucleation sites. If not set, the value is calculated based on the matrix settings (molar volume) [m^-3]
- Returns:
This
PrecipitatePhaseobject
- set_phase_boundary_mobility(phase_boundary_mobility: float)¶
Sets the phase boundary mobility. Default: 10.0 m^4/(Js).
- Parameters:
phase_boundary_mobility – The phase boundary mobility [m^4/(Js)]
- Returns:
This
PrecipitatePhaseobject
- set_precipitate_morphology(precipitate_morphology_enum: PrecipitateMorphology)¶
Sets the precipitate morphology. Default:
PrecipitateMorphology.SPHERE- Parameters:
precipitate_morphology_enum – The precipitate morphology
- Returns:
This
PrecipitatePhaseobject
- set_trans_interface_mobility_adjustment(element: str = 'all', prefactor: float = 1.0, activation_energy: float = 0.0)¶
Trans-interface mobility adjustment Only relevant when growth rate model is PE Automatic A value that adds to the activation energy of mobility data from the database.
- Parameters:
element – The element to apply the adjustment for. If “all” is given, adjustment will apply to all elements.
prefactor – A parameter that multiplies to the mobility data from a database. The value scales the mobility by a constant amount. This results in the trans-interface mobility that controls the kinetics of Para-Equilibrium to Ortho-Equilibrium transition.
activation_energy – A value that adds to the activation energy of mobility data from a database.It scales the mobility by a temperature dependent amount. Similar usage as trans-interface mobility adjustment prefactor. [J/mol]
- set_transformation_strain_calculation_option(transformation_strain_calculation_option_enum: TransformationStrainCalculationOption)¶
Sets the transformation strain calculation option. Default:
TransformationStrainCalculationOption.DISREGARD.- Parameters:
transformation_strain_calculation_option_enum – The chosen option
- Returns:
This
PrecipitatePhaseobject
- set_zener_pinning_parameters(cutoff_size: float = 7e-07, kinetic_prefactor: float = 0.5, exponent: float = 0.93)¶
These parameters are only relevant when zener pinning is enabled in the matrix phase
- Parameters:
cutoff_size – Precipitates with radius smaller than this value are neglected in pinning force calculation.
kinetic_prefactor – Dimensionless kinetic coefficient in Zener equation.
exponent – Exponent of precipitate volume fraction in Zener equation.
- Returns:
This
PrecipitatePhaseobject
- with_elastic_properties(elastic_properties: PrecipitateElasticProperties)¶
Sets the elastic properties. Default: The elastic transformation strain is disregarded by default.
- Parameters:
elastic_properties – The elastic properties object
- Returns:
This
PrecipitatePhaseobject
Note
This method has only an effect if the option
TransformationStrainCalculationOption.USER_DEFINEDis chosen using the methodset_transformation_strain_calculation_option().
- with_growth_rate_model(growth_rate_model_enum: GrowthRateModel)¶
Sets the growth rate model for the class of precipitates. Default:
GrowthRateModel.SIMPLIFIED- Parameters:
growth_rate_model_enum – The growth rate model
- Returns:
This
PrecipitatePhaseobject
- with_particle_size_distribution(particle_size_distribution: ParticleSizeDistribution)¶
Sets the initial particle size distribution for this class of precipitates. Default: If the initial particle size distribution is not explicitly provided, the simulation will start from a supersaturated matrix.
- Parameters:
particle_size_distribution – The initial particle size distribution object
- Returns:
This
PrecipitatePhaseobject
Tip
Use this option if you want to study the further evolution of an existing microstructure.
- class tc_python.precipitation.PrecipitationCCTCalculation(calculation)¶
Bases:
AbstractCalculationConfiguration for a Continuous-Cooling-Time (CCT) precipitation calculation.
- calculate(timeout_in_minutes: float = 0.0) PrecipitationCalculationTTTorCCTResult¶
Runs the CCT diagram 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
PrecipitationCalculationTTTorCCTResultwhich later can be used to get specific values from the calculated result
- get_system_data() SystemData¶
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
- set_composition(element_name: str, value: float)¶
Sets the composition of the elements. The unit for the composition can be changed using
set_composition_unit(). Default: Mole percent (CompositionUnit.MOLE_PERCENT)- Parameters:
element_name – The element
value – The composition (fraction or percent depending on the composition unit)
- Returns:
This
PrecipitationCCTCalculationobject
- set_composition_unit(unit_enum: CompositionUnit)¶
Sets the composition unit. Default: Mole percent (
CompositionUnit.MOLE_PERCENT).- Parameters:
unit_enum – The new composition unit
- Returns:
This
PrecipitationCCTCalculationobject
- set_cooling_rates(cooling_rates: List[float])¶
Sets all cooling rates for which the CCT diagram should be calculated.
- Parameters:
cooling_rates – A list of cooling rates [K/s]
- Returns:
This
PrecipitationCCTCalculationobject
- set_max_temperature(max_temperature: float)¶
Sets maximum temperature of the CCT diagram.
- Parameters:
max_temperature – the maximum temperature [K]
- Returns:
This
PrecipitationCCTCalculationobject
- set_min_temperature(min_temperature: float)¶
Sets the minimum temperature of the CCT diagram.
- Parameters:
min_temperature – the minimum temperature [K]
- Returns:
This
PrecipitationCCTCalculationobject
- stop_at_volume_fraction_of_phase(stop_criterion_value: float)¶
Sets the stop criterion as a volume fraction of the phase. This setting is applied to all phases.
- Parameters:
stop_criterion_value – the volume fraction of the phase (a value between 0 and 1)
- Returns:
This
PrecipitationCCTCalculationobject
- with_matrix_phase(matrix_phase: MatrixPhase)¶
Sets the matrix phase.
- Parameters:
matrix_phase – The matrix phase
- Returns:
This
PrecipitationCCTCalculationobject
- with_numerical_parameters(numerical_parameters: NumericalParameters)¶
Sets the numerical parameters. If not specified, reasonable defaults are be used.
- Parameters:
numerical_parameters – The parameters
- Returns:
This
PrecipitationCCTCalculationobject
- with_system_modifications(system_modifications: SystemModifications)¶
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
PrecipitationCCTCalculationobject
- class tc_python.precipitation.PrecipitationCalculationResult(result)¶
Bases:
AbstractResultResult of a precipitation calculation. This can be used to query for specific values.
- save_to_disk(path: str)¶
Saves the result to disc. Note that a result is a folder, containing potentially many files. The result can later be loaded with
load_result_from_disk()- Parameters:
path – the path to the folder you want the result to be saved in. It can be relative or absolute.
- Returns:
this
PrecipitationCalculationResultobject
- class tc_python.precipitation.PrecipitationCalculationSingleResult(result)¶
Bases:
PrecipitationCalculationResultResult of a isothermal or non-isothermal precipitation calculation. This can be used to query for specific values.
Search the Thermo-Calc help for definitions of the axis variables, e.g. search isothermal variables or non-isothermal variables.
- get_aspect_ratio_distribution_for_particle_length_of(precipitate_id: str, time: float) [List[float], List[float]]¶
Returns the aspect ratio distribution of a precipitate in dependency of its mean particle length at a certain time.
Only available if the morphology is set to
PrecipitateMorphology.NEEDLEorPrecipitateMorphology.PLATE.- Parameters:
time – The time [s]
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (mean particle length [m], aspect ratio)
- get_aspect_ratio_distribution_for_radius_of(precipitate_id: str, time: float) [List[float], List[float]]¶
Returns the aspect ratio distribution of a precipitate in dependency of its mean radius at a certain time.
Only available if the morphology is set to
PrecipitateMorphology.NEEDLEorPrecipitateMorphology.PLATE.- Parameters:
time – The time [s]
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (mean radius [m], aspect ratio)
- get_critical_radius_of(precipitate_id: str) [List[float], List[float]]¶
Returns the critical radius of a precipitate in dependency of the time.
- Parameters:
precipitate_id – The id of a precipitate can either be phase name or alias
- Returns:
A tuple of two lists of floats (time [s], critical radius [m])
- get_cubic_factor_distribution_for_particle_length_of(precipitate_id: str, time: float) [List[float], List[float]]¶
Returns the cubic factor distribution of a precipitate in dependency of its mean particle length at a certain time.
Only available if the morphology is set to
PrecipitateMorphology.CUBOID.- Parameters:
time – The time in seconds
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (particle length [m], cubic factor)
- get_cubic_factor_distribution_for_radius_of(precipitate_id: str, time: float) [List[float], List[float]]¶
Returns the cubic factor distribution of a precipitate in dependency of its mean radius at a certain time. Only available if the morphology is set to
PrecipitateMorphology.CUBOID.- Parameters:
time – The time [s]
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (radius [m], cubic factor)
- get_driving_force_of(precipitate_id: str) [List[float], List[float]]¶
Returns the (by R * T) normalized driving force of a precipitate in dependency of the time.
- Parameters:
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (time [s], normalized driving force)
- get_grain_critical_radius() [List[float], List[float]]¶
Returns the critical radius of grains in dependency of the time.
- Returns:
A tuple of two lists of floats (time [s], critical radius [m])
- get_grain_mean_radius() [List[float], List[float]]¶
Returns the mean grain size of the matrix phase in dependency of the time.
- Returns:
A tuple of two lists of floats (time [s], mean radius [m])
- get_grain_number_density() [List[float], List[float]]¶
Returns the grain number density (concentration) in dependency of the time.
- Returns:
A tuple of two lists of floats (time [s], grain number density [m^-3])
- get_grain_number_density_distribution_for_length(time: float) [List[float], List[float]]¶
Returns the number density distribution of grains in terms of length at the requested time(s).
- Parameters:
time – The time [s]
- Returns:
A tuple of two lists of floats (grain length[m], number of grains per unit volume in a size class [m^-3])
- get_grain_number_density_distribution_for_radius(time: float) [List[float], List[float]]¶
Returns the number density distribution of a grains in terms of grain radius at the requested time(s).
- Parameters:
time – The time [s]
- Returns:
A tuple of two lists of floats (radius [m], number of grains per unit volume in a size class [m^-3])
- get_grain_size_distribution(time: float) [List[float], List[float]]¶
Returns the size distribution of the matrix phase in dependency of its grain radius at the requested time(s).
- Parameters:
time – The time [s]
- Returns:
A tuple of two lists of floats (grain radius[m], number density of grains[m^-4])
- get_matrix_composition_in_mole_fraction_of(element_name: str) [List[float], List[float]]¶
Returns the matrix composition (as mole fractions) of a certain element in dependency of the time.
- Parameters:
element_name – The element
- Returns:
A tuple of two lists of floats (time [s], mole fraction)
- get_matrix_composition_in_weight_fraction_of(element_name: str) [List[float], List[float]]¶
Returns the matrix composition (as weight fraction) of a certain element in dependency of the time.
- Parameters:
element_name – The element
- Returns:
A tuple of two lists of floats (time [s], weight fraction)
- get_mean_aspect_ratio_of(precipitate_id: str) [List[float], List[float]]¶
Returns the mean aspect ratio of a precipitate in dependency of the time.
Only available if the morphology is set to
PrecipitateMorphology.NEEDLEorPrecipitateMorphology.PLATE.- Parameters:
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (time [s], mean aspect ratio)
- get_mean_cubic_factor_of(precipitate_id: str) [List[float], List[float]]¶
Returns the mean cubic factor of a precipitate in dependency of the time. Only available if the morphology is set to
PrecipitateMorphology.CUBOID.- Parameters:
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (time [s], mean cubic factor)
- get_mean_particle_length_of(precipitate_id: str) [List[float], List[float]]¶
Returns the mean particle length of a precipitate in dependency of the time.
Only available if the morphology is set to
PrecipitateMorphology.NEEDLEorPrecipitateMorphology.PLATE.- Parameters:
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (time [s], mean particle length [m])
- get_mean_radius_2d_of(precipitate_id: str) [List[float], List[float]]¶
Returns the mean radius of cross-sections taken through the dispersion in dependency of the time.
- Parameters:
precipitate_id – The id of a precipitate can either be phase name or alias
- Returns:
A tuple of two lists of floats (time [s], mean radius [m])
- get_mean_radius_of(precipitate_id: str) [List[float], List[float]]¶
Returns the mean radius of a precipitate in dependency of the time.
- Parameters:
precipitate_id – The id of a precipitate can either be phase name or alias
- Returns:
A tuple of two lists of floats (time [s], mean radius [m])
- get_normalized_grain_size_distribution(time: float) [List[float], List[float]]¶
Returns the normalized number density distribution with the grain radius normalized by the mean radius, for the requested time(s).
- Parameters:
time – The time [s]
- Returns:
A tuple of two lists of floats (Normalized size, Probability)
- get_normalized_number_density_distribution_2d_of(precipitate_id: str, time: float) [List[float], List[float]]¶
Returns the normalized number density distribution of a precipitate in terms of the radius of cross-sections created by taking a plane through the dispersion, normalized by the mean radius of the cross-section, for the requested time(s).
- Parameters:
time – The time [s]
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (Normalized size, Probability)
- get_normalized_number_density_distribution_of(precipitate_id: str, time: float) [List[float], List[float]]¶
Returns the normalized number density distribution with the particle radius normalized by the mean radius, for the requested time(s).
- Parameters:
time – The time [s]
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (Normalized size, Probability)
- get_nucleation_rate_of(precipitate_id: str) [List[float], List[float]]¶
Returns the nucleation rate of a precipitate in dependency of the time.
- Parameters:
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (time [s], nucleation rate [m^-3 s^-1)
- get_number_density_distribution_2d_for_particle_length_of(precipitate_id: str, time: float) [List[float], List[float]]¶
Returns the number density distribution of a precipitate considering the radius of cross-sections created by taking a plane through the dispersion, approximating the particles as spherical, for the requested time(s).
- Parameters:
time – The time [s]
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (particle length[m], number of particles per unit area within a size class [m^-2])
- get_number_density_distribution_2d_for_radius_of(precipitate_id: str, time: float) [List[float], List[float]]¶
Returns the number density distribution of a precipitate considering the radius of cross-sections created by taking a plane through the dispersion for the requested time(s).
- Parameters:
time – The time [s]
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (radius [m], number of particles per unit area within a size class [m^-2])
- get_number_density_distribution_for_particle_length_of(precipitate_id: str, time: float) [List[float], List[float]]¶
Returns the number density distribution of a precipitate in terms of length for the requested time(s).
- Parameters:
time – The time [s]
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (particle length[m], number of particles in the size class per unit volume [m^-3])
- get_number_density_distribution_for_radius_of(precipitate_id: str, time: float) [List[float], List[float]]¶
Returns the number density distribution of a precipitate in terms of radius for the requested time(s).
- Parameters:
time – The time [s]
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (radius [m], number of particles in the size class per unit volume [m^-3])
- get_number_density_of(precipitate_id: str) [List[float], List[float]]¶
Returns the particle number density (concentration) of a precipitate in dependency of the time.
- Parameters:
precipitate_id – The id of a precipitate can either be phase name or alias
- Returns:
A tuple of two lists of floats (time [s], particle number density [m^-3])
- get_precipitate_composition_in_mole_fraction_of(precipitate_id: str, element_name: str) [List[float], List[float]]¶
Returns the precipitate composition (as mole fractions) of a certain element in dependency of the time.
- Parameters:
precipitate_id – The id of a precipitate can either be phase name or alias
element_name – The element
- Returns:
A tuple of two lists of floats (time [s], mole fraction)
- get_precipitate_composition_in_weight_fraction_of(precipitate_id: str, element_name: str) [List[float], List[float]]¶
Returns the precipitate composition (as weight fraction) of a certain element in dependency of the time.
- Parameters:
precipitate_id – The id of a precipitate can either be phase name or alias
element_name – The element
- Returns:
A tuple of two lists of floats (time [s], weight fraction)
- get_size_distribution_2d_for_particle_length_of(precipitate_id: str, time: float) [List[float], List[float]]¶
Returns the size distribution of a precipitate considering the radius of cross-sections created by taking a plane through the dispersion, approximating the particles as spherical, for the requested time(s).
- Parameters:
time – The time [s]
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (particle length[m], number of particles per unit area per unit length [m^-3])
- get_size_distribution_2d_for_radius_of(precipitate_id: str, time: float) [List[float], List[float]]¶
Returns the 2d size distribution of a precipitate considering the radius of cross-sections created by taking a plane through the dispersion for the requested time(s).
- Parameters:
time – The time [s]
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (radius [m], number of particles per unit area per unit length [m^-3])
- get_size_distribution_for_particle_length_of(precipitate_id: str, time: float) [List[float], List[float]]¶
Returns the size distribution of a precipitate in terms of length for the requested time(s).
- Parameters:
time – The time [s]
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (particle length[m], number of particles per unit volume per unit length [m^-4])
- get_size_distribution_for_radius_of(precipitate_id: str, time: float) [List[float], List[float]]¶
Returns the size distribution of a precipitate in terms of radius for the requested time(s).
- Parameters:
time – The time [s]
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (radius [m], number of particles per unit volume per unit length [m^-4])
- get_split_mean_radius_of(precipitate_id: str, isSectioned: bool)¶
Returns the mean radius of a precipitate in dependency of the time.
- Parameters:
precipitate_id – The id of a precipitate can either be phase name or alias
- Returns:
A tuple of two lists of floats (time [s], mean radius [m])
- get_split_number_density_of(precipitate_id: str, isSectioned: bool)¶
Returns the mean radius of a precipitate in dependency of the time.
- Parameters:
precipitate_id – The id of a precipitate can either be phase name or alias
- Returns:
A tuple of two lists of floats (time [s], mean radius [m])
- get_split_size_distribution_for_radius_of(precipitate_id: str, time: float, isSectioned: bool)¶
Returns the size distribution of a precipitate in terms of radius for the requested time(s).
- Parameters:
time – The time [s]
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (radius [m], number of particles per unit volume per unit length [m^-4])
- get_split_volume_or_area_fraction_of(precipitate_id: str, isSectioned: bool)¶
Returns the mean radius of a precipitate in dependency of the time.
- Parameters:
precipitate_id – The id of a precipitate can either be phase name or alias
- Returns:
A tuple of two lists of floats (time [s], mean radius [m])
- get_volume_fraction_of(precipitate_id: str) [List[float], List[float]]¶
Returns the volume fraction of a precipitate in dependency of the time.
- Parameters:
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (time [s], volume fraction)
- class tc_python.precipitation.PrecipitationCalculationTTTorCCTResult(result)¶
Bases:
PrecipitationCalculationResultResult of a TTT or CCT precipitation calculation.
- get_result_for_precipitate(precipitate_id: str) [List[float], List[float]]¶
Returns the calculated data of a TTT or CCT diagram for a certain precipitate.
- Parameters:
precipitate_id – The id of a precipitate can either be the phase name or an alias
- Returns:
A tuple of two lists of floats (time [s], temp [K])
- class tc_python.precipitation.PrecipitationIsoThermalCalculation(calculation)¶
Bases:
AbstractCalculationConfiguration for an isothermal precipitation calculation.
- calculate(timeout_in_minutes: float = 0.0) PrecipitationCalculationSingleResult¶
Runs the isothermal precipitation 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
PrecipitationCalculationSingleResultwhich later can be used to get specific values from the calculated result
- get_system_data() SystemData¶
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
- set_composition(element_name: str, value: float)¶
Sets the composition of the elements. The unit for the composition can be changed using
set_composition_unit(). Default: Mole percent (CompositionUnit.MOLE_PERCENT)- Parameters:
element_name – The element
value – The composition (fraction or percent depending on the composition unit)
- Returns:
This
PrecipitationIsoThermalCalculationobject
- set_composition_unit(unit_enum: CompositionUnit = CompositionUnit.MOLE_PERCENT)¶
Sets the composition unit. Default: Mole percent (
CompositionUnit.MOLE_PERCENT).- Parameters:
unit_enum – The new composition unit
- Returns:
This
PrecipitationIsoThermalCalculationobject
- set_simulation_time(simulation_time: float)¶
Sets the simulation time.
- Parameters:
simulation_time – The simulation time [s]
- Returns:
This
PrecipitationIsoThermalCalculationobject
- set_temperature(temperature: float)¶
Sets the temperature for the isothermal simulation.
- Parameters:
temperature – the temperature [K]
- Returns:
This
PrecipitationIsoThermalCalculationobject
- with_matrix_phase(matrix_phase: MatrixPhase)¶
Sets the matrix phase.
- Parameters:
matrix_phase – The matrix phase
- Returns:
This
PrecipitationIsoThermalCalculationobject
- with_numerical_parameters(numerical_parameters: NumericalParameters)¶
Sets the numerical parameters. If not specified, reasonable defaults are be used.
- Parameters:
numerical_parameters – The parameters
- Returns:
This
PrecipitationIsoThermalCalculationobject
- with_system_modifications(system_modifications: SystemModifications)¶
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
PrecipitationIsoThermalCalculationobject
- class tc_python.precipitation.PrecipitationNonIsoThermalCalculation(calculation)¶
Bases:
AbstractCalculationConfiguration for a non-isothermal precipitation calculation.
- calculate(timeout_in_minutes: float = 0.0) PrecipitationCalculationSingleResult¶
Runs the non-isothermal precipitation 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
PrecipitationCalculationSingleResultwhich later can be used to get specific values from the calculated result
- get_system_data() SystemData¶
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
- set_composition(element_name: str, value: float)¶
Sets the composition of the elements. The unit for the composition can be changed using
set_composition_unit(). Default: Mole percent (CompositionUnit.MOLE_PERCENT)- Parameters:
element_name – The element
value – The composition (fraction or percent depending on the composition unit)
- Returns:
This
PrecipitationIsoThermalCalculationobject
- set_composition_unit(unit_enum: CompositionUnit)¶
Sets the composition unit. Default: Mole percent (
CompositionUnit.MOLE_PERCENT).- Parameters:
unit_enum – The new composition unit
- Returns:
This
PrecipitationIsoThermalCalculationobject
- set_simulation_time(simulation_time: float)¶
Sets the simulation time.
- Parameters:
simulation_time – The simulation time [s]
- Returns:
This
PrecipitationNonThermalCalculationobject
- with_matrix_phase(matrix_phase: MatrixPhase)¶
Sets the matrix phase.
- Parameters:
matrix_phase – The matrix phase
- Returns:
This
PrecipitationIsoThermalCalculationobject
- with_numerical_parameters(numerical_parameters: NumericalParameters)¶
Sets the numerical parameters. If not specified, reasonable defaults are be used.
- Parameters:
numerical_parameters – The parameters
- Returns:
This
PrecipitationIsoThermalCalculationobject
- with_system_modifications(system_modifications: SystemModifications)¶
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
PrecipitationNonThermalCalculationobject
- with_temperature_profile(temperature_profile: TemperatureProfile)¶
Sets the temperature profile to use with this calculation.
- Parameters:
temperature_profile – the temperature profile object (specifying time / temperature points)
- Returns:
This
PrecipitationNonThermalCalculationobject
- class tc_python.precipitation.PrecipitationTTTCalculation(calculation)¶
Bases:
AbstractCalculationConfiguration for a TTT (Time-Temperature-Transformation) precipitation calculation.
- calculate(timeout_in_minutes: float = 0.0) PrecipitationCalculationTTTorCCTResult¶
Runs the TTT diagram 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
PrecipitationCalculationTTTorCCTResultwhich later can be used to get specific values from the calculated result.
- get_system_data() SystemData¶
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
- set_composition(element_name: str, value: float)¶
Sets the composition of the elements. The unit for the composition can be changed using
set_composition_unit(). Default: Mole percent (CompositionUnit.MOLE_PERCENT)- Parameters:
element_name – The element
value – The composition (fraction or percent depending on the composition unit)
- Returns:
This
PrecipitationTTTCalculationobject
- set_composition_unit(unit_enum: CompositionUnit)¶
Sets the composition unit. Default: Mole percent (
CompositionUnit.MOLE_PERCENT).- Parameters:
unit_enum – The new composition unit
- Returns:
This
PrecipitationTTTCalculationobject
- set_max_annealing_time(max_annealing_time: float)¶
Sets the maximum annealing time, i.e. the maximum time of the simulation if the stopping criterion is not reached.
- Parameters:
max_annealing_time – the maximum annealing time [s]
- Returns:
This
PrecipitationTTTCalculationobject
- set_max_temperature(max_temperature: float)¶
Sets the maximum temperature for the TTT diagram.
- Parameters:
max_temperature – the maximum temperature [K]
- Returns:
This
PrecipitationTTTCalculationobject
- set_min_temperature(min_temperature: float)¶
Sets the minimum temperature for the TTT diagram.
- Parameters:
min_temperature – the minimum temperature [K]
- Returns:
This
PrecipitationTTTCalculationobject
- set_temperature_step(temperature_step: float)¶
Sets the temperature step for the TTT diagram. If not set, the default value is 10 K.
- Parameters:
temperature_step – the temperature step [K]
- Returns:
This
PrecipitationTTTCalculationobject
- stop_at_percent_of_equilibrium_fraction(percentage: float)¶
Sets the stop criterion to a percentage of the overall equilibrium phase fraction, alternatively a required volume fraction can be specified (using
stop_at_volume_fraction_of_phase()).- Parameters:
percentage – the percentage to stop at (value between 0 and 100)
- Returns:
This
PrecipitationTTTCalculationobject
- stop_at_volume_fraction_of_phase(volume_fraction: float)¶
Sets the stop criterion as a volume fraction of the phase, alternatively a required percentage of the equilibrium phase fraction can be specified (using
stop_at_percent_of_equilibria_fraction()). Stopping at a specified volume fraction is the default setting.This setting is applied to all phases.
- Parameters:
volume_fraction – the volume fraction to stop at (a value between 0 and 1)
- Returns:
This
PrecipitationTTTCalculationobject
- with_matrix_phase(matrix_phase: MatrixPhase)¶
Sets the matrix phase.
- Parameters:
matrix_phase – The matrix phase
- Returns:
This
PrecipitationTTTCalculationobject
- with_numerical_parameters(numerical_parameters: NumericalParameters)¶
Sets the numerical parameters. If not specified, reasonable defaults are be used.
- Parameters:
numerical_parameters – The parameters
- Returns:
This
PrecipitationTTTCalculationobject
- with_system_modifications(system_modifications: SystemModifications)¶
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
PrecipitationTTTCalculationobject
- class tc_python.precipitation.TransformationStrainCalculationOption(value)¶
Bases:
EnumOptions for calculating the transformation strain.
- CALCULATE_FROM_MOLAR_VOLUME = 2¶
Calculates the transformation strain from the molar volume, obtains a purely dilatational strain.
- DISREGARD = 1¶
Ignores the transformation strain, this is the default setting.
- USER_DEFINED = 3¶
Transformation strain to be specified by the user.