morphogen.laser.metallurgy

Thermo-metallurgical response of a steel sheet to the thermal cycles of laser tracks: the phases and the hardness that each point keeps.

Two models share one interface: initial_state() (arrays of the points), step() (one time step of their temperatures, vectorized), finish() (the transformations completed on the final cooling to ambient) and hardness(). Temperatures in °C, times in s, compositions in wt%.

TransformationHardening (C–Mn and low-alloy steels). A cycle that exceeds Ac1 forms austenite at its peak T_p by the lever rule of a hypo-eutectoid steel, the carbon of the austenite following the A3 line from the eutectoid 0.77 at Ac1 to the steel’s at Ac3: f_γ = (C − C_α)/(C_γ(T_p) − C_α) (the pearlite at once, the ferrite gradually); laser heating at 10³–10⁴ K/s shifts both temperatures up by superheat. On cooling the austenite turns into martensite when it cools fast enough (the cooling time t8/5 against a critical one, the rest into bainite or ferrite–pearlite), at ambient by Koistinen and Marburger’s law 1 − exp(−0.011 (Ms − T)), Ms of the austenite’s carbon by Andrews’s (1965) linear formula (the rest retained). The hardnesses of martensite, bainite and ferrite–pearlite are Maynier et al.’s (1978) functions of the composition and of the cooling rate. Martensite below Ac1 tempers: the Hollomon–Jaffe parameter P = T (C + log10 t) (K, hours) accumulated by additivity (the time that gives the current P at the current temperature, extended by the step), its hardness falling linearly from P0 to P1 (Grange et al. 1977). An annealed ferrite–pearlite sheet thus gets tracks of martensite with tempered rings where later tracks pass (the annealed MS1500 of Wang 2022); a martensitic or dual-phase sheet (DP1180, MS1500: martensite initial fraction) softens in rings that stay below Ac1 and hardens again where it is austenitized (Lapouge et al. 2019).

PeakHardening (phenomenological). The hardness gained by a cycle is a function of its peak temperature (a table), lost by Hollomon–Jaffe tempering; a new cycle above the onset of the table re-transforms a share of the point that grows with its peak, the rest keeping its tempered gain (the larger of the fresh gain and of this mixture). For AISI 430, whose hardening by grain-boundary martensite and chromium carbides near the melting point (Wang et al. 2022) has no simple phase model.

Composition (Alloying). Laser carburizing from a graphite coating, nitriding under nitrogen and alloying from a pre-placed coating happen in the melt pool, stirred by Marangoni flows: the coating that a track melts (its areal mass on the faces melted, times an efficiency) mixes with the melted metal (mass balance), nitrogen dissolves up to Sieverts’s solubility log[%N] = −188/T − 1.25 − e_N^Cr [%Cr] (iron, e_N^Cr = −0.047, at a partial pressure p: times √p) times an efficiency. The solid-state diffusion of the same cycles reaches micrometres (√(∫D dt), kinetic_integral()) and is neglected.

morphogen.laser.metallurgy.ELEMENTS = ('C', 'N', 'Si', 'Mn', 'Ni', 'Cr', 'Mo', 'V')

Elements of the compositions (wt%).

morphogen.laser.metallurgy.C_FERRITE = 0.02

Carbon of ferrite and of the eutectoid (wt%).

morphogen.laser.metallurgy.C_EUTECTOID = 0.77

Carbon of ferrite and of the eutectoid (wt%).

morphogen.laser.metallurgy.andrews_ac(comp) → tuple[float, float][source]

Ac1 and Ac3 (°C) by Andrews’s (1965) formulas.

morphogen.laser.metallurgy.andrews_ms(carbon, comp, nitrogen=0.0)[source]

Ms (°C) by Andrews’s (1965) linear formula, nitrogen counted as carbon.

morphogen.laser.metallurgy.maynier_hardness(carbon, comp, rate, *, nitrogen=0.0) → tuple[source]

Hardnesses (HV) of martensite, bainite and ferrite–pearlite formed at the cooling rate rate (K/s at about 700 °C) by Maynier, Jungmann & Dollet (1978), the carbon of the transforming austenite given (nitrogen counted as carbon).

morphogen.laser.metallurgy.sieverts_nitrogen(temperature: float, chromium: float = 0.0, pressure: float = 1.0) → float[source]

Solubility of nitrogen (wt%) in liquid iron at temperature (°C) under a partial pressure pressure (atm): log[%N] = −188/T − 1.25 (Sieverts’s law), raised by chromium through log f_N = e_N^Cr [%Cr], e_N^Cr = −0.047.

class morphogen.laser.metallurgy.Tempering(constant: float = 20.0, start: float = 9000.0, end: float = 20000.0, floor: float = 0.4, minimum: float = 0.0, t_min: float = 150.0)[source]

Bases: object

Linear softening with the Hollomon–Jaffe parameter: hardness H0 up to P0, falling to floor (a fraction of H0, or an absolute minimum HV, the larger) at P1; constant C (hours); no tempering below t_min °C.

factor(p, h0)[source]

Hardness of a phase of as-quenched hardness h0 at the parameter p.

class morphogen.laser.metallurgy.TransformationHardening(composition: dict = <factory>, ac1: float | None = None, ac3: float | None = None, superheat: float = 50.0, solidus: float = 1480.0, martensite: float = 0.0, martensite_hardness: float | None = None, matrix_hardness: float | None = None, initial_rate: float = 0.03333333333333333, critical_time: float = 2.0, slow_time: float = 30.0, km: float = 0.011, tempering: Tempering = <factory>, ambient: float = 20.0, finish_below: float = 300.0)[source]

Bases: _Model

C–Mn or low-alloy steel (see the module): composition (wt%), Ac1/Ac3 (°C; Andrews’s by default) plus superheat for laser heating rates, solidus, the initial martensite fraction and the hardness of the initial microstructure’s martensite (martensite_hardness; Maynier’s at initial_rate by default) and of the rest (matrix_hardness; Maynier’s ferrite–pearlite after a slow cooling by default), the critical cooling time t8/5 up to which austenite turns into martensite (critical_time, s) and the time beyond which none does (slow_time), tempering.

property a1: float
property a3: float
austenite(peak, carbon) → tuple[ndarray, ndarray][source]

Fraction and carbon (wt%) of the austenite at the peak temperature peak of a steel of carbon carbon: lever rule, the austenite carbon from 0.77 at A1 to the steel’s at A3 (linear in temperature).

initial_state(n: int) → dict[source]
step(state, t_old, t_new, dt) → None[source]

One step of the temperatures of the points (°C), dt seconds.

hardness(state) → ndarray[source]

Vickers hardness of the points: martensite (tempered), bainite or ferrite–pearlite formed on cooling, retained austenite (as the matrix) and the initial matrix, by their fractions.

treated(state) → ndarray[source]

Fraction of the points transformed by the tracks (martensite and bainite formed, minus the initial martensite).

class morphogen.laser.metallurgy.PeakHardening(table: tuple = ((875.0, 0.0), (1080.0, 50.0), (1300.0, 120.0), (1425.0, 150.0), (1600.0, 150.0)), base_hardness: float = 160.0, full: float | None = None, solidus: float = 1425.0, composition: dict = <factory>, carbon_hardening: float = 550.0, tempering: Tempering = <factory>, ambient: float = 20.0, finish_below: float = 300.0)[source]

Bases: _Model

Hardness gained as a function of the peak temperature of a cycle (table: pairs (T_peak °C, ΔHV), increasing from 0 at its first temperature), on a matrix of hardness base_hardness; full: the peak above which a new cycle replaces the gain of the previous ones (re-transformed share (T_p − onset)/(full − onset)); tempering of the gain; carbon_hardening: HV gained per wt% of carbon and nitrogen dissolved in the melt (carburizing, nitriding).

gain(peak) → ndarray[source]

Hardness gained by a cycle of peak peak (°C) from the untreated state.

initial_state(n: int) → dict[source]
step(state, t_old, t_new, dt) → None[source]
hardness(state) → ndarray[source]
treated(state) → ndarray[source]

Share of the full gain of the table that the points keep.

class morphogen.laser.metallurgy.PeakSoftening(table: tuple = ((200.0, 0.0), (250.0, -8.0), (300.0, -25.0), (350.0, -42.0), (400.0, -50.0), (450.0, -45.0), (520.0, -38.0), (600.0, -38.0)), base_hardness: float = 105.0, full: float | None = None, solidus: float = 585.0, composition: dict = <factory>, carbon_hardening: float = 0.0, tempering: Tempering = <factory>, ambient: float = 20.0, finish_below: float = 300.0)[source]

Bases: PeakHardening

Hardness lost as a function of the peak temperature of a cycle — the dissolution of the hardening precipitates of an age-hardened aluminium alloy (Myhr & Grong 1991; Shercliff & Ashby): table pairs (T_peak °C, ΔHV ≤ 0), 0 at its first temperature, the hardness of the treated points after their natural ageing; a cycle keeps the larger of its loss and that of the previous cycles (the precipitates do not form again).

treated(state) → ndarray[source]

Share of the largest loss of the table that the points have.

morphogen.laser.metallurgy.model_from_config(data)[source]

A metallurgical model from a mapping with a kind (transformation, peak or softening) and the parameters of its class.

class morphogen.laser.metallurgy.Alloying(kind: str = 'carburizing', coating: float = 20.0, elements: dict = <factory>, efficiency: float = 0.5, pressure: float = 1.0, faces: str = 'both')[source]

Bases: object

A thermochemical treatment in the melt pool of each track: carburizing (a graphite coating of coating g/m² on the treated faces), alloying (a coating of composition elements, wt%), nitriding (nitrogen at the partial pressure pressure atm); efficiency: the share of the coating (or of Sieverts’s solubility) that the melt takes up, the rest burnt or evaporated.

mix(state, melted, weights, surface, *, density: float, melt_temperature: float, chromium: float = 0.0) → dict[source]

Mix the melt of one track: melted (mask of the points), weights (their volumes, mm³), surface: per face, the areas (mm²) of the points of that face whose coating the track melts (the coating is then gone: the caller clears it). Updates the carbon and nitrogen of the state; returns the amounts added.