mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-12-06 12:49:25 -05:00
The 121- and 110-part 0.12 in sheets the old heat weight was measured on are not at hand; N26-2GT's two thin sheets stand in, labeled as such. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
203 lines
15 KiB
Markdown
203 lines
15 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;
|
||
Plan Cutting's opt-in heat start limit orders parts with a cheaper estimate of the same physics ([Sequencing](#sequencing)).
|
||
|
||
## 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 diffusion-limited time steps)
|
||
stays within a work budget. The first halving has 4 billion cell updates, a few seconds at
|
||
most, which gives a 5×10 ft sheet 0.25 in cells for cuts of up to about six hours in mild
|
||
steel. Finer halvings have 60 million, so only small plates and short cuts get them: on a
|
||
full sheet 0.125 in cells leave hot lines too thin to see and stretch the color scale. Halving
|
||
costs up to sixteen times the work, since diffusion shortens the time step with the cell's
|
||
area. Automatic grids have at most 700,000 cells, and any size asked for is made coarser past
|
||
that. 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 sheet at
|
||
the torch, in proportion to the time spent there. The path is sampled four times per cell, and
|
||
each sample is shared between the four cells whose centers surround it, by closeness, among
|
||
those in the same piece as the cell under the torch. Scribes add nothing.
|
||
- Conduction: explicit finite differences between the four neighbors of the same piece. Time is
|
||
divided into slots as long as the stability limit allows (at most 1 s). A slot in which the torch
|
||
cuts is split into equal steps, so that none is longer than the torch takes to cross one cell at
|
||
that move's speed (half a cell where cells are under 4 mm), but not shorter than 5 ms for that.
|
||
A step adds its heat all at once, so a longer one shows stripes along a straight cut; rapids and
|
||
pierces keep the long steps (`HeatStepSchedule`). Splits come from a short list of counts, and
|
||
the boundaries depend on the timeline alone, so a replay takes the same steps. 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.
|
||
- Short steps only around the torch: the short steps of a slot are taken only by
|
||
the window of cells within four cells of where the torch put heat during those steps or during
|
||
the slot before them (which keeps the cells beside a fresh cut on short steps until their own
|
||
peak has passed). The cells touching the window hold their starting values meanwhile, and every
|
||
other cell takes one step as long as the short ones together (`StepInterval`). Heat moves about a
|
||
cell per slot, so the cells past the window change too slowly to need more. A piece that changes
|
||
inside a slot ends the long step there, and a new one starts; steps in which the torch adds no
|
||
heat are one long step for every cell. Compared with every cell taking the
|
||
short steps, on full sheets at 100 to 1600 in/min: peaks differ by under 1% of the color scale
|
||
at the 99th percentile and a few dozen cells of 115,200 by more than 5%, final temperatures by
|
||
under 0.1%, total heat by under 0.06%, and the stripe check is unchanged. For scale, halving
|
||
every step moves the peaks by 5-7% at the 99th percentile. So a fast feed no longer makes the
|
||
run longer. `ThermalParameters.WholePlateSteps` (internal) turns the window off for comparison.
|
||
- 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 scheduled step, or partway through
|
||
a slot's run of short steps) keeps checkpoints of the temperatures, peaks and event cursors, about
|
||
every 500,000 cell updates of short steps and within 128 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 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.
|
||
|
||
The simulator builds and runs the model off the UI thread (`HeatEstimate`) and shows
|
||
"Estimating heat…" meanwhile. A changed setting cancels the run in progress; a rebuilt timeline
|
||
with the same moves and settings keeps the model it has.
|
||
|
||
## Timings
|
||
|
||
Measured on a Ryzen 7 3700X, 5×10 ft nests, 0.25 in and 16 gauge mild steel at 100 to 1600 in/min,
|
||
whole run: 0.25 in cells took 0.9-2.9 s before the window and take 0.23-0.45 s with it; a cut of
|
||
several hours takes about 3 s. 0.125 in cells take 1.3-6.2 s (11-22 s before).
|
||
|
||
A graphics card version (ILGPU, every cell taking the short steps) was built and measured on an
|
||
RTX 4060, then removed: at 0.25 in cells it took 0.45-1.0 s, slower than the processor, since
|
||
starting its two programs per step costs more than the step; at 0.125 in it took 1.1-2.7 s, a
|
||
cell size full sheets do not use.
|
||
|
||
## Display
|
||
|
||
The tooltip on the heat label names the cell size and the hardware. The colors follow a logarithmic scale (`HeatColorScale`), since most of a sheet sits tens
|
||
to a few hundred degrees above ambient while cells at the torch reach thousands. It starts at a
|
||
10 °C rise (cooler cells are not colored) and tops out at the 99.5th percentile of the whole cut's
|
||
peaks, held between 100 and 1000 °C; hotter cells take the top color. A pierce puts its energy into
|
||
a single cell, so the percentile keeps one such cell from setting the top. A scale bar down the plate
|
||
view's right edge labels the colors. Cells whose slug fell away are transparent. Cool cells are translucent, so while the
|
||
layer shows, every cut or cutting part is filled with one neutral gray set apart from the sheet
|
||
color instead of its drawing color, which would shift the scale's hues; outlines, numbers, pending
|
||
parts and selection keep their usual look. 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
|
||
|
||
Plan Cutting's part order keeps work from starting where the sheet is hot when the cutting
|
||
parameters set `HeatStartLimit` (an estimated temperature rise in °C, 0 = off, saved per material
|
||
and thickness on the Tabs & Pierce tab as "Don't start above (°C rise)"). Before each part, or
|
||
each line of a large grid, the order estimates the temperature where it starts: the tour's next
|
||
piece when that is at or under the limit, else the nearest under it, else the coolest. A move
|
||
across parts already cut raises the head (`HEAD RAISE`, counted as heat raises). See
|
||
[heat start limit](cutting-planner.md#heat-start-limit). This simulation only scores finished
|
||
plans; the order uses a cheaper estimate, ported from the sequencer removed earlier:
|
||
|
||
- 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; for single parts only the latest 200 parts count, for grid
|
||
lines every part does. It is read at the next piece's arrival.
|
||
- Torch-on time comes from each part's cut length and pierces at the Cut Simulator's feeds and
|
||
pierce time (`CutParameters`, this PC's saved values in the desktop, `CutParameters.Default`
|
||
elsewhere), and travel time at its rapid rate.
|
||
|
||
Neither model is calibrated, so a limit compares orders rather than promising a temperature (the
|
||
estimate runs hotter than this simulation right beside a part just cut). Once the model is
|
||
calibrated against FLIR readings, the planner could insert a dwell (delay) before a start when no
|
||
order keeps it under the limit; that is future work.
|
||
|
||
Measured with `HeatOrderMeasurementTests` (opt-in, `OPENNEST_HEAT_PLATES`, `OPENNEST_HEAT_LIMITS`),
|
||
default timing (100 in/min cut, 300 in/min rapid, 0.5 s pierce), against the plan with the limit
|
||
off. Zone is the hottest average over each 4 in square during the cut, as a percentile over zones;
|
||
starts are this simulation's mean temperature over each part (on the grid, each line's first part)
|
||
when the cut reaches it, median / P90 in °C:
|
||
|
||
| Plate | Limit | Travel | Cut time | Heat raises | Zone P95 | Zone P75 | Starts |
|
||
|-------|-------|--------|----------|-------------|----------|----------|--------|
|
||
| Washers, 5,742 parts in a grid, 0.179 in | off | | | | | | 63 / 106 |
|
||
| | 15 °C | +1.5% | +0.1% | 2 | −6% | −12% | 6.3 / 9.0 |
|
||
| | 20–30 °C | +1.4% | +0.1% | 1 | −6% | −13% | 6.1 / 8.9 |
|
||
| | 45 °C | +1.4% | +0.1% | 1 | −7% | −12% | 6.8 / 8.8 |
|
||
| Thin parts, 132 parts, 0.06 in | off | | | | | | 13.2 / 37.5 |
|
||
| | 10 °C | +17% | +2.7% | 40 | −24% | −28% | 1.8 / 2.8 |
|
||
| | 15 °C | +15% | +2.3% | 37 | −25% | −26% | 1.8 / 3.3 |
|
||
| | 20 °C | +10% | +1.6% | 56 | −26% | −29% | 0.8 / 2.5 |
|
||
| | 30 °C | +10% | +1.6% | 60 | −25% | −28% | 0.8 / 5.7 |
|
||
| | 45 °C | +9% | +1.4% | 55 | −20% | −27% | 0.8 / 7.9 |
|
||
| Thin parts, 112 parts, 0.0897 in (stand-in; the 121- and 110-part 0.12 in sheets measured for the old weight were not at hand) | off | | | | | | 14.2 / 30.5 |
|
||
| | 10 °C | +28% | +3.7% | 36 | −18% | −18% | 2.0 / 7.6 |
|
||
| | 15 °C | +18% | +2.4% | 26 | −16% | −19% | 1.7 / 11.6 |
|
||
| | 20 °C | +12% | +1.6% | 24 | −13% | −17% | 4.5 / 15.7 |
|
||
| | 30 °C | +7% | +0.9% | 15 | −8% | −11% | 6.3 / 20.2 |
|
||
| | 45 °C | 0 | 0 | 0 | 0 | 0 | unchanged |
|
||
| Same nest, 148 parts | off | | | | | | 6.4 / 24.9 |
|
||
| | 10 °C | +34% | +2.7% | 40 | −18% | −15% | 2.1 / 5.8 |
|
||
| | 15 °C | +32% | +2.5% | 31 | −13% | −13% | 3.2 / 7.4 |
|
||
| | 20 °C | +21% | +1.6% | 27 | −8% | −8% | 3.4 / 11.4 |
|
||
| | 30 °C | +12% | +0.9% | 16 | −4% | −3% | 5.1 / 22.3 |
|
||
| | 45 °C | 0 | 0 | 0 | 0 | 0 | unchanged |
|
||
| 30 parts, 0.12 in | off | | | | | | 4.9 / 24.0 |
|
||
| | 10 °C | +1.6% | +0.4% | 14 | −16% | −8% | 1.1 / 4.0 |
|
||
| | 15 °C | +3.6% | +0.8% | 11 | −15% | −11% | 0.6 / 2.2 |
|
||
| | 20 °C | +4.5% | +1.1% | 8 | −12% | −6% | 1.0 / 16.1 |
|
||
| | 30–45 °C | 0 | 0 | 0 | 0 | 0 | unchanged |
|
||
| 33 parts, 0.12 in (off has one fallback raise) | 10 °C | +30% | +5.9% | 17 | −10% | −13% | 1.0 / 3.5 |
|
||
| | 15 °C | +28% | +5.5% | 14 | −8% | −13% | 0.8 / 4.0 |
|
||
| | 20 °C | +26% | +5.1% | 9 | −2% | −8% | 1.3 / 7.2 |
|
||
| | 30–45 °C | 0 | 0 | 0 | 0 | 0 | unchanged |
|
||
| 130 parts, 0.25 in | 10 °C | +15% | +1.5% | 28 | −18% | −12% | 1.8 / 4.5 |
|
||
| | 15 °C | +9% | +0.9% | 18 | −12% | −6% | 1.9 / 8.6 |
|
||
| | 20 °C | +3.3% | +0.3% | 8 | −8% | −3% | 2.5 / 8.9 |
|
||
| | 30–45 °C | 0 | 0 | 0 | 0 | 0 | unchanged |
|
||
|
||
Second sheets of the thin and 30-part nests matched their first. No plan gained a fallback head
|
||
raise. On the grid the limit lowers every line's start from about 63 °C to 6 °C for about 1.5%
|
||
more travel: every other line out and the rest back fell out of the rule. The hottest zones fall
|
||
less (−6%), since the heat right behind the torch cannot be fixed by order. Thin sheets gain
|
||
most; on them every neighbor of a part just cut is over a low limit, so the rule leaves the tour
|
||
for about every other part, and higher limits do not always take fewer raises, since the parts
|
||
they skip are left scattered. A limit the estimate never reaches leaves the plan exactly as with
|
||
the limit off. Leaving the part just cut out of the estimate (the heat right behind the torch)
|
||
was tried for single parts and dropped: it halved the raises on the thin sheet but left the
|
||
starts' P90 at 32–36 °C, where counting it brings them to about 3 °C.
|
||
|
||
The weighted block order this replaced (a travel-seconds-per-°C weight choosing among two cutting
|
||
fronts and 2x2-6x6 blocks) cut the 0.25 in sheet's zone P95 by 10% for 51% more travel, 5.1%
|
||
more cut time and 41 raises; the 10 °C limit cuts it by 18% for 15%, 1.5% and 28.
|