mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-12-06 17:19:25 -05:00
The heat map's 0.5 in cells were too coarse to show heat trapped in small parts such as washer rings. Unless a cell size is set, cells now halve from 0.5 in down to 1/16 in while a full replay stays within 20 million cell updates (about a quarter second), since scrubbing back replays from the start. Full sheets with long cuts keep 0.5 in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
72 lines
3.2 KiB
C#
72 lines
3.2 KiB
C#
using OpenNest.Support;
|
|
|
|
namespace OpenNest.CNC.Thermal
|
|
{
|
|
/// <summary>Inputs to <see cref="PlateHeatSimulation"/>. Lengths are in the plate's units.</summary>
|
|
public sealed class ThermalParameters
|
|
{
|
|
/// <summary>
|
|
/// Parameters for a sheet of this stock material name and grade
|
|
/// (<see cref="ThermalMaterial.ForName"/>) and thickness, with the default power and loss.
|
|
/// </summary>
|
|
public static ThermalParameters For(string materialName, string grade, double thickness, Units units) =>
|
|
new()
|
|
{
|
|
Material = ThermalMaterial.ForName($"{materialName} {grade}"),
|
|
Thickness = thickness,
|
|
Units = units,
|
|
};
|
|
|
|
public ThermalMaterial Material { get; init; } = ThermalMaterial.MildSteel;
|
|
|
|
/// <summary>Sheet thickness in <see cref="Units"/>.</summary>
|
|
public double Thickness { get; init; }
|
|
|
|
public Units Units { get; init; }
|
|
|
|
/// <summary>
|
|
/// Watts that stay in the sheet while the torch is on: the share of the beam's power not
|
|
/// carried off in the melt, the gas or through the kerf. An estimate to calibrate.
|
|
/// </summary>
|
|
public double AbsorbedPower { get; init; } = 1000;
|
|
|
|
/// <summary>Heat loss to the air from both faces, in W/m²·K (still air is about 10-25).</summary>
|
|
public double SurfaceCoefficient { get; init; } = 20;
|
|
|
|
/// <summary>
|
|
/// Grid cell edge in <see cref="Units"/>. Zero picks one for the plate: 0.5 in (12 mm),
|
|
/// halved down to 1/16 in (1.5 mm) while the whole run stays quick to replay, so small
|
|
/// plates and short cuts get finer cells.
|
|
/// </summary>
|
|
public double CellSize { get; init; }
|
|
|
|
/// <summary>
|
|
/// The bed the sheet rests on (usually the plate's <c>SupportBed</c>), in
|
|
/// <see cref="Units"/>; null loses heat to the air alone. The sheet loses heat through its
|
|
/// bottom face into the bed wherever it lies over a slat or a grid point's pad.
|
|
/// </summary>
|
|
public SupportBed SupportBed { get; init; }
|
|
|
|
/// <summary>
|
|
/// Heat loss from the sheet into the bed where they touch, in W/m²·K through the bottom
|
|
/// face. Contact between a sheet and slats is poor (dry, rough, often slagged, a few
|
|
/// hundred W/m²·K), and the slats warm up themselves, which the model does not track, so
|
|
/// the default of 200 is an effective value below a cold contact's. An estimate to
|
|
/// calibrate.
|
|
/// </summary>
|
|
public double ContactCoefficient { get; init; } = 200;
|
|
|
|
/// <summary>
|
|
/// The square pad each point of a <c>SupportGrid</c> touches the sheet with, edge in
|
|
/// <see cref="Units"/>; zero picks 0.125 in (3 mm). A grid point has no area of its own,
|
|
/// so this is an estimate of the worn tip it rests on.
|
|
/// </summary>
|
|
public double GridContactSize { get; init; }
|
|
|
|
internal double MetersPerUnit => Units == Units.Millimeters ? 0.001 : 0.0254;
|
|
|
|
internal double EffectiveGridContactSize =>
|
|
GridContactSize > 0 ? GridContactSize : Units == Units.Millimeters ? 3 : 0.125;
|
|
}
|
|
}
|