mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-12-06 16:09:26 -05:00
118 lines
8.3 KiB
Markdown
118 lines
8.3 KiB
Markdown
# Plate heat map
|
||
|
||
`OpenNest.Core/CNC/Thermal/PlateHeatSimulation.cs` estimates how heat builds up in the sheet
|
||
while a [cut simulation](cut-time-estimates.md) plays. The Cut Simulator shows it under the cut
|
||
trail (Heat: Now or Peak so far). It is a display and analysis aid and never changes the plate;
|
||
a parked [heat-aware sequencer](#sequencing) uses a cheaper estimate of the same physics.
|
||
|
||
## Model
|
||
|
||
- A grid over the plate's bounds. Unless `CellSize` is set, cells start at 0.5 in (12 mm) and
|
||
halve, down to 1/16 in (1.5 mm), while the whole run (cells times time steps) stays within
|
||
60 million cell updates, about a tenth of a second. Halving costs up to sixteen times
|
||
the work, since diffusion shortens the time step with the cell's area, so small plates and short
|
||
cuts get fine cells and full sheets keep 0.5 in. Any size is made coarser on sheets that would
|
||
need more than 400,000 cells. Each cell holds its temperature rise above ambient. Finer cells
|
||
hold the torch's heat in less metal, so cells along the cut read hotter; compare cut orders at
|
||
one cell size.
|
||
- Heat in: while the torch is on (cuts and pierces), `AbsorbedPower` watts go into the cell under
|
||
the torch, in proportion to the time spent there. Scribes add nothing.
|
||
- Conduction: explicit finite differences between the four neighbors of the same piece, with the
|
||
time step kept below the stability limit and at most 1 s. Sheet edges are insulated. A rise
|
||
below 1e-30 °C is set to zero: the front of the spreading heat would otherwise pass through
|
||
subnormal floats, which make each step several times slower. It changes no cell above about
|
||
1e-18 °C.
|
||
- Loss: convection from both faces at `SurfaceCoefficient` (W/m²·K), plus, when
|
||
`ThermalParameters.SupportBed` is given, contact with the bed through the bottom face at
|
||
`ContactCoefficient` (W/m²·K) times each cell's share of area over the bed. The share is the
|
||
overlap of the cell with each slat's top (`SupportSlats.SlatsIn`) or with a square pad
|
||
`GridContactSize` wide (0.125 in / 3 mm by default) around each grid point
|
||
(`SupportGrid.PointsIn`), placed for the plate's quadrant as the beds mirror themselves; it
|
||
is not snapped to cells, so slats narrower or wider than a cell count their true area. The
|
||
nominal bed is used, without registration shifts. Each cell decays by an exponential factor
|
||
per step, which stays stable however strong the contact. A part cut free still rests on the
|
||
bed and keeps losing heat to it; a dropped slug has no heat left. Without a bed (or with a zero
|
||
`ContactCoefficient`) the model is exactly the air-only model.
|
||
- Contact default: 200 W/m²·K. A sheet resting dry on slats, often over slag, conducts poorly
|
||
(a few hundred W/m²·K when the slat is cold), and the slats warm up under a long cut. The slats
|
||
are not given a temperature of their own; the default is a lower effective value standing in
|
||
for that. An estimate to calibrate, like `AbsorbedPower`.
|
||
- Pieces: when a closed contour finishes (within half a cell, so a tab's gap counts as closed), a
|
||
cutout (an interior contour by the posts' perimeter rule the timeline already uses) removes its
|
||
slug's cells and their heat; a part's perimeter separates its cells from the skeleton, so no
|
||
heat crosses the kerf. Only skeleton cells change, so a part nested in a cutout stays its own
|
||
piece. Open contours (cut-offs, breaks) change nothing.
|
||
- Material from the nest's material name and grade (`ThermalMaterial.ForName`: stainless,
|
||
aluminum, otherwise mild steel); thickness from the nest.
|
||
|
||
Not modeled: radiation, the slats' own temperature (they are an infinite sink at ambient behind
|
||
an effective coefficient), less air loss from the bottom face where slats cover it, pierce power differing from cutting power, the
|
||
heat carried off by the melt beyond `AbsorbedPower`, kerf width and warping. The absorbed power
|
||
(1000 W by default) is an uncalibrated guess, so the temperatures are relative; use them to
|
||
compare cut orders of one plate, not as real values.
|
||
|
||
## Playback and seeking
|
||
|
||
Each step runs a vector of cells at a time, with the links between neighbors of one piece
|
||
precomputed as 1 or 0 whenever the pieces change; grids of 65,536 cells or more split each
|
||
step across processors. Neither changes a result bit.
|
||
|
||
A straight run from the start (one never stopped short of a full step) keeps checkpoints of the
|
||
temperatures, peaks and event cursors, about every 500,000 cell updates and within 32 MB, more
|
||
widely spaced on large grids. The simulator's first run to the end, made to set the color
|
||
scale, lays them down. Going back in time, or more than eight steps ahead, resumes from the
|
||
latest checkpoint that a straight run to the target passes, so a seek steps through at most one
|
||
checkpoint's interval (about a millisecond on a small plate) instead of the whole run, and gives
|
||
exactly the state a straight run from the start gives. The pieces are rebuilt from the event
|
||
cursor rather than stored. Playing forward frame by frame continues from the current state, as
|
||
before.
|
||
|
||
## Display
|
||
|
||
The simulator colors the field against the 99.5th percentile of the whole cut's peaks: a pierce
|
||
puts its energy into a single cell, and scaling to that cell would hide the areas where heat
|
||
builds up. Cells whose slug fell away are transparent. The simulator passes the plate's support
|
||
bed, and its heat label says whether the sheet is cooled by air only or by air and the slats
|
||
(or support grid).
|
||
|
||
## Sequencing
|
||
|
||
`SequenceMethod.HeatAware` is a heat-aware part sequencer,
|
||
parked until FLIR thermal-camera readings calibrate the model. It is available to
|
||
`PlateSequencing.Apply(plate, parameters, thermal)` only: Plan Cutting does not use it, and no UI
|
||
offers it. The method and `SequenceParameters.HeatWeight` (seconds per °C, 0.15 by default) are
|
||
saved with the cutting settings.
|
||
|
||
- Order (`OpenNest.Engine/Sequencing/HeatAwareOrder.cs`): a forward greedy from the plate's origin
|
||
corner. The next part is the one with the least travel seconds plus `HeatWeight` times the
|
||
estimated temperature at its center when the tool gets there. Cut-offs go last in its route, and
|
||
`OrderCutOffsFirst` places them as for every method. Without a thickness it is nearest neighbor.
|
||
- Estimate (`HeatSpreadEstimate`): each finished part leaves a Gaussian blob of its energy
|
||
(`AbsorbedPower` times its torch-on time), as wide as the part to begin with (a quarter of its
|
||
squared diagonal), widening by 4αΔt and fading with the surface loss; only the latest 200 parts
|
||
count. Torch-on time comes from each part's cut length and pierces at stand-in feeds by
|
||
thickness: 400 in/min up to 0.135 in, 150 up to 0.26 in, 80 above, a 0.5 s pierce up to 0.26 in
|
||
and 1.5 s above, and 3000 in/min travel.
|
||
|
||
Why it is parked: Plan Cutting does not follow `SequenceMethod`. It plans its own shortest tour
|
||
(nearest neighbor, 2-opt, Or-opt), which already travels a fraction of the row-based `Advanced`
|
||
sequencer's distance, so the heat order's travel savings over `Advanced` do not carry over. And its
|
||
strict search refuses head-down rapids over parts already cut free. A heat-spreading order skips
|
||
neighbors and comes back to them across cut parts, so the search stalls, learns rules, and ends on
|
||
its shortest tour or the safest-route fallback; a heat order used only where it does not stall
|
||
moved the zone metric by noise (±3-5%). Kept as given through Plan Cutting, the heat order does
|
||
spread the heat, at this cost against the planned shortest tour (2ER and N26-2GT, weights 0.1-0.4,
|
||
stand-in feeds):
|
||
|
||
| Plate | Travel | Cut time | Head raises (tour: 0) | Zone P95 | Zone P75 |
|
||
|-------|--------|----------|-----------------------|----------|----------|
|
||
| 2ER plate 1 (130 parts, 0.25 in) | +52 to +82% | +0.8 to +1.2% | 59-78 | −14 to −18% | −18 to −23% |
|
||
| N26-2GT plate 1 (112 parts, 0.09 in) | +50 to +65% | +2.3 to +3.1% | 54-62 | −24 to −25% | −26 to −28% |
|
||
| N26-2GT plate 2 (148 parts, 0.09 in) | +64 to +102% | +1.8 to +2.8% | 53-75 | −12 to −20% | −18 to −24% |
|
||
|
||
The zone metric is the hottest average over each 4 in square during the cut, as a percentile over
|
||
zones; pierces and hole clusters inside one part set the hottest cell whatever the order. The head
|
||
raises are the safest-route fallback's last-resort markers, which the strict search never adds, so
|
||
a heat order that spreads heat would need designed head raises (or rapids routed around cut parts).
|
||
Revisit once FLIR readings calibrate the absorbed power and the feeds.
|