morphogen.laser.process

The laser treatment of a sheet: the hardness that a path leaves at given points.

LaserTreatment holds the sheet (material, thickness, layers through the thickness), the treatment (hardening, or a thermochemical one with its Alloying) and the laser configuration (single: the upper face; symmetric: the same beam on both faces, or the beam of each track’s bottom). LaserTreatment.apply() runs a LaserPath track after track at the points of the sheet (the Gauss points of a mesh, the pixels of a map), each point split into layers through the thickness:

  1. the distance of each point to the track gives its thermal cycle at each depth, from the quasi-steady cycles of a long straight track (TrackKernel, tabulated once per pair of beams): the moving beam heats the band around its axis as if the track were straight and long (curved tracks: their radius of curvature should exceed the heated width; their ends overhang the specimen);

  2. a thermochemical treatment mixes the coating (or nitrogen) into the points that the track melts (mix()), the coating of the faces melted being consumed;

  3. the metallurgical model integrates each cycle (morphogen.laser.metallurgy): the points never touched before take the response of the first track tabulated once per kernel; the others (the tracks that overlap, temper or re-harden earlier ones) integrate their cycle step by step.

The tracks are separated by pauses long enough for the sheet to cool (30 s in Wang’s experiments): each cycle starts from ambient. LaserTreatment.transient() runs the same path through the finite-volume solver of the whole blank instead (the heat that the previous tracks leave, the edges), for checks.

morphogen.laser.process.RESPONSE_POINTS = 512

Distances of the response of an untouched sheet to a track (its shortcut).

class morphogen.laser.process.TreatmentResult(points: ndarray, weights: ndarray, layers: int, hardness: ndarray, peak: ndarray, treated: ndarray, melted: ndarray, carbon: ndarray, nitrogen: ndarray, material: SheetMaterial, path: LaserPath | None = None, state: dict = <factory>)[source]

Bases: object

The treated sheet at its points: hardness, peak temperature (°C), treated share (of the transformed phases, or of the full gain), melted, carbon and nitrogen (wt%), all (points, layers); weights: the area (mm²) of each point; the path and its measures.

property mean_hardness: ndarray

Hardness averaged through the thickness (points).

area_fraction(threshold: float = 0.5) → float[source]

Fraction of the area whose treated share (through the thickness) exceeds threshold.

volume_fraction() → float[source]

Mean treated share over the sheet: the reinforced volume fraction.

flow() → tuple[source]

Flow laws of the points (kind, σ0, a, b), each (points, layers).

class morphogen.laser.process.LaserTreatment(material, *, thickness: float | None = None, configuration: str = 'symmetric', layers: int = 4, treatment: str = 'hardening', alloying=None, ambient: float = 20.0, distances: int = 48, times: int = 240)[source]

Bases: object

A treatment of a sheet (see the module): material (a SheetMaterial or a preset name), thickness (mm; the material’s by default), configuration, layers through the thickness, treatment (hardening, carburizing, nitriding, alloying) and its alloying parameters, ambient (°C).

property model
beams(beam: Beam, bottom: Beam | None) → tuple[Beam, Beam | None][source]

The beams of a track: its bottom beam, or the same beam on the lower face in the symmetric configuration, none in the single one.

kernel(beam: Beam, bottom: Beam | None = None) → TrackKernel[source]

The tabulated cycles of a track of these beams (cached).

apply(path: LaserPath, points, weights=None) → TreatmentResult[source]

Run the path at the points (n x 2, mm) of areas weights (mm²; equal by default): see the module.

transient(path: LaserPath, size, *, origin=(0.0, 0.0), cell: float = 0.1, cooling: float | None = None) → tuple[source]

The path run by the finite-volume solver on the blank size (mm) at origin, cells of cell mm, the layers of the treatment through the thickness: (TransientHeat, TransientResult) with the metallurgical state of the cells (hardening only).