morphogen.laser.heat

Heat conduction of the laser treatment of a sheet: a moving beam on a plate.

Units: lengths in millimetres, times in seconds, temperatures in degrees Celsius, powers in watts. The thermal properties are given in SI units, as in the handbooks (W m⁻¹ K⁻¹, kg m⁻³, J kg⁻¹ K⁻¹, W m⁻² K⁻¹), and converted.

The quasi-steady track (moving_source(), TrackKernel). A beam of absorbed power P moves at speed v along x on a plate of thickness h with constant properties (conductivity k, volumetric heat ρc, diffusivity a = k/ρc), on its upper face (single) or on both faces at once (symmetric: two aligned beams, the double-laser platform of Wang et al. 2022). An instantaneous source of energy dE on the upper face spreads as dE/ρc G(x, y; τ) Z(z; τ) exp(−βτ) after a time τ:

  • in the plane, the beam profile convolved with the heat kernel: a Gaussian beam of 1/e² radius w (standard deviation s0 = w/2) gives G = exp(−r²/(2 s²)) / (2π s²), s² = s0² + 2aτ (Cline & Anthony 1977, Eagar & Tsai 1983); a rectangular top hat of half sizes bx, by gives the product of (erf((x + b)/√(4aτ)) − erf((x − b)/√(4aτ))) / (4b);

  • through the thickness, the adiabatic faces reflect the source: images at z = 2mh, Z = Σ 2 exp(−(z − 2mh)²/(4aτ)) / √(4πaτ) = (1/h)(1 + 2 Σ exp(−n²π²aτ/h²) cos(nπz/h)) (the series where it converges faster); a beam on the lower face adds Z(h − z);

  • the faces lose heat by convection and linearized radiation, h_f (T − T0) each, approximated by the uniform loss rate β = 2 h_f/(ρc h) of a thin plate.

In the frame of the beam (ξ = x − vt) the quasi-steady field is T − T0 = P/ρc ∫₀^∞ G(ξ + vτ, y; τ) Z(z; τ) exp(−βτ) dτ, integrated on a logarithmic grid of τ. Its limits are Rosenthal’s (1946) solutions, checked in the tests: a point source on a thick plate, T − T0 = P/(2πkR) exp(−v(R + ξ)/(2a)) (rosenthal_point()), and a line source through a thin plate with surface losses, T − T0 = P/(2πkh) exp(−vξ/(2a)) K0(r √(v²/(4a²) + β/a)) (Rykalin; rosenthal_line()). A point at the distance d of the axis of a long straight track sees the thermal cycle T(t) = T(ξ = −vt, d, z): TrackKernel tabulates these cycles over d and the depths of the layers, from which the peak temperatures, the widths of the zones that reach a temperature (hardened, melted) and the kinetic integrals follow.

The transient sheet (TransientHeat). Arbitrary paths, their sequence, the heat left by the previous tracks and the edges of the blank: finite volumes on a grid of the blank (cells through the thickness for a single beam, one for a thin sheet), locally one-dimensional implicit steps (Yanenko’s splitting: unconditionally stable, tridiagonal solves along x, y and z; Numba), adiabatic edges, the beam deposited on the faces as its profile averaged over the positions it takes during a step, the faces cooled by h_f. Each step can update a metallurgical state (morphogen.laser.metallurgy).

morphogen.laser.heat.STEFAN_BOLTZMANN = 5.670374419e-08

Stefan–Boltzmann constant (W m⁻² K⁻⁴).

morphogen.laser.heat.PROFILES = ('gaussian', 'tophat')

Beam profiles.

morphogen.laser.heat.CONFIGURATIONS = ('single', 'symmetric')

one beam on the upper face, or two aligned beams on both faces.

Type:

Laser configurations

class morphogen.laser.heat.ThermalProperties(conductivity: float = 25.0, density: float = 7700.0, heat_capacity: float = 600.0, convection: float = 20.0, emissivity: float = 0.0, radiation_temperature: float = 800.0)[source]

Bases: object

Thermal properties of the sheet, in SI units: conductivity (W m⁻¹ K⁻¹), density (kg m⁻³), mean specific heat over the thermal cycle (J kg⁻¹ K⁻¹), convection coefficient of each face (W m⁻² K⁻¹) and emissivity (radiation linearized about radiation_temperature, °C).

property k: float

Conductivity in W mm⁻¹ K⁻¹.

property rho_c: float

Volumetric heat in J mm⁻³ K⁻¹.

property diffusivity: float

Thermal diffusivity in mm² s⁻¹.

film(ambient: float = 20.0) → float[source]

Heat transfer coefficient of a face in W mm⁻² K⁻¹: convection plus the radiation εσ(T_r² + T0²)(T_r + T0) linearized about radiation_temperature.

loss_rate(thickness: float, ambient: float = 20.0) → float[source]

Loss rate β = 2 h_f / (ρc h) (s⁻¹) of a plate cooled on both faces.

class morphogen.laser.heat.Beam(power: float, speed: float, radius: float, absorptivity: float = 0.35, profile: str = 'gaussian', length: float | None = None)[source]

Bases: object

A continuous laser beam: incident power per beam (W), speed (mm/s), radius (mm: the 1/e² radius of a Gaussian beam, the half side of a top hat), absorptivity, and for a rectangular top hat its half length along the motion (length, default the radius).

property absorbed: float

Absorbed power (W) of one beam.

property line_energy: float

Linear energy density P/v (J/mm), incident, of one beam.

property interaction_time: float

its diameter over its speed.

Type:

Time (s) the beam takes to pass over a point

with_(**changes) → Beam[source]
morphogen.laser.heat.rosenthal_point(xi, y, z, power: float, speed: float, props: ThermalProperties, ambient: float = 20.0)[source]

Rosenthal’s point source on the surface of a semi-infinite body (absorbed power power): T0 + P/(2πkR) exp(−v(R + ξ)/(2a)), R the distance to the source.

morphogen.laser.heat.rosenthal_line(xi, y, power: float, speed: float, thickness: float, props: ThermalProperties, ambient: float = 20.0, *, losses: bool = True)[source]

The line source through a thin plate (Rosenthal 1946; with the surface losses of Rykalin): T0 + P/(2πkh) exp(−vξ/(2a)) K0(r √(v²/(4a²) + β/a)).

morphogen.laser.heat.moving_source(xi, y, z, beam: Beam, thickness: float, props: ThermalProperties, *, bottom: Beam | None = None, configuration: str = 'single', ambient: float = 20.0, nodes: int = 1600, chunk: int = 4096)[source]

Quasi-steady temperature (°C) at the points (ξ, y, z) (mm) in the frame of a beam moving along +x on a plate of thickness thickness, its upper face at z = 0: one beam on the upper face (single), the same beam on both faces (symmetric), or bottom, another beam aligned with it on the lower face (a fibre laser above and a diode below, say).

morphogen.laser.heat.moving_source_grid(xi, y, z, beam: Beam, thickness: float, props: ThermalProperties, *, bottom: Beam | None = None, configuration: str = 'single', ambient: float = 20.0, nodes: int = 1600) → ndarray[source]

moving_source() on the grid xi x y x z (1D arrays), shape (len(xi), len(y), len(z)): the plane kernel is separable, so that the integral over the delays is a product of matrices for each depth (no exponential per point).

class morphogen.laser.heat.TrackKernel(beam: Beam, bottom: Beam | None, thickness: float, ambient: float, distances: ndarray, depths: ndarray, times: ndarray, temperature: ndarray)[source]

Bases: object

The thermal cycles that a long straight track imposes on the points of the sheet: temperature[i, j, k] at the distance distances[i] (mm) of its axis, the time times[j] (s; 0 when the beam passes the point’s abscissa) and the depth depths[k] (mm, the middles of the layers), with their peaks; bottom is the beam of the lower face, if any.

property layers: int
property reach: float

beyond it the track leaves the sheet as it is.

Type:

The largest distance tabulated

property configuration: str
peak_at(distance, layer: int | None = None) → ndarray[source]

Peak temperature at distances from the axis ((..., layers), or one layer).

width(temperature: float, layer: int | None = None) → float[source]

Width (mm) of the band whose peak temperature reaches temperature (in one layer, or in any).

through_width(temperature: float) → float[source]

Width (mm) of the band whose peak temperature reaches temperature in every layer: treated through the whole thickness.

cycles(distance) → ndarray[source]

Thermal cycles at distances from the axis: (points, times, layers), interpolated linearly between the tabulated distances (ambient beyond).

kinetic_integral(activation: float, distance=0.0) → ndarray[source]

∫ exp(−Q/(R T(t))) dt (s) of the cycles at distances, Q in J/mol (per layer): the effective time of a thermally activated process; e.g. the diffusion length of a species of diffusivity D0 exp(−Q/RT) is √(D0 × it).

cooling_time(distance=0.0, upper: float = 800.0, lower: float = 500.0) → ndarray[source]

Time (s) to cool from upper to lower (°C) after the peak, t8/5 by default (NaN where the peak stays below upper).

morphogen.laser.heat.track_kernel(beam: Beam, thickness: float, props: ThermalProperties, *, bottom: Beam | None = None, configuration: str = 'single', layers: int = 1, ambient: float = 20.0, cutoff: float | None = None, distances: int = 48, times: int = 240, nodes: int = 1200, max_reach: float | None = None) → TrackKernel[source]

Tabulate the thermal cycles of a long straight track (see TrackKernel): the distances up to where the peak falls to cutoff (°C; default: a tenth of the peak rise above ambient, at least 100 °C above it; at most max_reach mm), the times from ahead of the beam to a tail of cooling, layers layers through the thickness. The beams: as in moving_source().

class morphogen.laser.heat.TransientResult(temperature: ndarray, peak: ndarray, time: float, steps: int, state: dict | None = None)[source]

Bases: object

Fields of a transient run: the final and peak temperatures (nx, ny, nz), the time of the end of the run, and the metallurgical state when a model was given.

class morphogen.laser.heat.TransientHeat(size, thickness: float, props: ThermalProperties, *, cell: float, layers: int = 1, origin=(0.0, 0.0), ambient: float = 20.0)[source]

Bases: object

Finite volumes on a blank [x0, x0 + lx] x [y0, y0 + ly] of thickness thickness: cell in the plane (mm), layers cells through the thickness (1 for a thin sheet treated on both faces).

property shape: tuple[int, int, int]
run(segments, *, configuration: str = 'single', model=None, state=None, dt_max: float = 0.5, cooling: float | None = None, substeps: int = 4, callback=None) → TransientResult[source]

Run a sequence of laser moves. segments: iterable of (points, beam, bottom, pause): a polyline (n x 2, mm) followed at the speed of beam (upper face) with bottom on the lower face (None: none, or the same beam in the symmetric configuration), then pause seconds with the lasers off (the move to the next track). model: a metallurgical model updated at each step (its state returned). cooling: after the last segment, cool until the hottest cell falls below this temperature (°C).