Table of Contents

Class MaterialThermalConstantCheck

Namespace
Hi.Physics
Assembly
HiMech.dll

The check of the three thermal constants of a material that the milling thermal chain reads — the conductivity HeatConductivity_WdmK, the density Density_gdcm3 and the specific heat HeatCapacity_JdgK. Three warnings. A constant that is NaN is not given — a material file without the element reads it so, and no default stands in (HasThermalConstants): the thermal model skips the material as it skips one that is missing (no thermal step for the tool; for the workpiece material, for every tool), and the warning names it. A constant that is 0, negative or infinite is used as given: the interface temperature of a contact weighs the cutter and the workpiece by their thermal effusivity √(k·ρ·c) and the thermal FEM reads k and ρ·c, so such a constant can turn the cutter temperatures into NaN or pin the interface to one side, and a unit slip of a factor 1000 scales that side's effusivity by about 31.6. Nothing downstream validates a given value: a material is used as given and this check only says so (see ReportThermalConstantIssues(IStructureMaterial, string, IProgress<IMessage>, object)). A fourth warning, for a cutter material, names the hardness and wear-coefficient curves its file lacks (ReportWearCurvesNotGiven(CutterMaterial, string, IProgress<IMessage>, object), Material-WearCurves–NotGiven): the native thermal session does not model its cutter.

The wordings live here, one literal id and one literal template per emit, because the engine-message gate reads both off the call: the physics runner hands in its sinks at a tool change, at the session begin and at the start of a play (the step-anchored one for a tool's materials, the session's shell for the workpiece's), the step-physics recompute its own progress, the web API a MessageCollector when a material is loaded. The caller's context (which tool, which file) rides in the detail payload, since the templates are shared and carry only values.

The range is the dense solids' the thermal model is built for: it catches a density in kg/m³ or g/mm³ and a specific heat in J/(kg·K), and a conductivity in W/(mm·K) only for a material under 100 W/(m·K) — above that (aluminium, copper, most carbides) the slip lands where polymers are, 0.1 to 0.5 W/(m·K), and passes. A foam, a wood or a cork falls under the conductivity bound by nature and is named; the template says so.

public static class MaterialThermalConstantCheck
Inheritance
MaterialThermalConstantCheck
Inherited Members

Fields

MaxDensity_gdcm3

The largest density, in g/cm³, taken as a solid's (osmium is 22.6).

public const double MaxDensity_gdcm3 = 25

Field Value

double

MaxHeatCapacity_JdgK

The largest specific heat, in J/(g·K), taken as a solid's (polymers reach about 2.5).

public const double MaxHeatCapacity_JdgK = 5

Field Value

double

MaxHeatConductivity_WdmK

The largest conductivity, in W/(m·K), taken as a solid's (diamond reaches about 2200).

public const double MaxHeatConductivity_WdmK = 2500

Field Value

double

MinDensity_gdcm3

The smallest density, in g/cm³, taken as a solid's (a light foam reaches about 0.03; every solid's density in g/mm³ is below it). A foam is named all the same, by its conductivity (MinHeatConductivity_WdmK).

public const double MinDensity_gdcm3 = 0.03

Field Value

double

MinHeatCapacity_JdgK

The smallest specific heat, in J/(g·K), taken as a solid's (tungsten is about 0.13).

public const double MinHeatCapacity_JdgK = 0.1

Field Value

double

MinHeatConductivity_WdmK

The smallest conductivity, in W/(m·K), taken as a solid's (polymers reach about 0.1).

public const double MinHeatConductivity_WdmK = 0.1

Field Value

double

Methods

DescribeContext(string, string)

The detail of a thermal-constants warning in the one wording the physics runner and the web API share: the owner and the file, as known — e.g. tool [3], file [WC.CutterMaterial]; null when neither is known.

public static string DescribeContext(string owner, string file)

Parameters

owner string

What holds the material (e.g. tool [3]); null or empty when nothing to say.

file string

The file the material was read from; null or empty when unknown or inline.

Returns

string

GetContentKey(IStructureMaterial)

What a material's three thermal constants and its name are, as a value: the key a caller groups and dedups the warnings by — the roles of one tool that carry equal values are one warning (a cutter duplicated with its flute and shank apart), a material is not named twice for one owner however many copies carry it, and an edit to other values is named again — and, for a cutter material, whether its wear curves are given (HasWearCurves): a material named for a constant and then edited to drop a curve is named again, as an edit of a constant is.

public static (string Name, double HeatConductivity_WdmK, double Density_gdcm3, double HeatCapacity_JdgK, bool WearCurvesGiven) GetContentKey(IStructureMaterial material)

Parameters

material IStructureMaterial

Returns

(string Name, double HeatConductivity_WdmK, double Density_gdcm3, double HeatCapacity_JdgK, bool WearCurvesGiven)

GetThermalConstantIssues(IStructureMaterial, string)

The warnings ReportThermalConstantIssues(IStructureMaterial, string, IProgress<IMessage>, object) would emit, as (Id, Message) pairs — the id in the structured-id convention of the IMessage channel, the message its rendered English notification. Empty when the constants are given, finite, positive and in range, or the material is null.

public static List<(string Id, string Message)> GetThermalConstantIssues(IStructureMaterial material, string roles)

Parameters

material IStructureMaterial
roles string

Returns

List<(string FilterTitle, string FileExtension)>

ReportThermalConstantIssues(IStructureMaterial, string, IProgress<IMessage>, object)

Reports what is wrong with material's thermal constants on sink, at most three ConfigurationWarnings, in this order: Material-ThermalConstants–NotGiven naming every constant that is NaN — not given: the material's file has no such element and no default stands in, so the thermal model skips the material as it skips a missing one (HasThermalConstants); Material-ThermalConstants–NotFinitePositive naming every constant that is given but not a finite positive number (±∞, 0 or negative); and Material-ThermalConstants–OutOfRange naming every finite positive one outside the range of a solid (a unit slip). The material is not changed: the given values are used as given.

public static int ReportThermalConstantIssues(IStructureMaterial material, string roles, IProgress<IMessage> sink, object detail = null)

Parameters

material IStructureMaterial

The material; null reports nothing.

roles string

The member or members that hold it, as identifiers joined by ", " (e.g. MillingCutter.FluteMaterial, MillingCutter.ShankMaterial).

sink IProgress<IMessage>

Destination of the warnings; null is a no-op.

detail object

The caller's context attached to the warnings — the tool, the file — since the templates are shared and carry only values.

Returns

int

The number of warnings, 0 to 3 — reported on sink when it is non-null.

ReportWearCurvesNotGiven(CutterMaterial, string, IProgress<IMessage>, object)

Reports on sink, as one ConfigurationWarning Material-WearCurves–NotGiven, the wear curves of material that are not given — TemperatureVsHardnessCurve, TemperatureVsWearCoefficientCurve, each named when it is null (the material's file has no such element) or empty (an empty element), see HasWearCurves. The native thermal session takes both curves of every cutter material in the flute's thermal layers — the flute material's and each coating layer's — when it is built and reads the surface material's at every step for the wear, so it does not model a cutter that carries such a material (the play says so once per tool, Physics-Thermal–ModelUnavailable); this is where the material is named. The material is not changed and no default stands in. The shank material is never read for its curves: callers pass the roles that read them (the flute, the coating layers), not the shank's.

public static int ReportWearCurvesNotGiven(CutterMaterial material, string roles, IProgress<IMessage> sink, object detail = null)

Parameters

material CutterMaterial

The cutter material; null reports nothing.

roles string

The member or members that hold it and read its curves, as identifiers joined by ", " (e.g. MillingCutter.FluteMaterial, MillingCutter.CoatingLayerList[0].Material).

sink IProgress<IMessage>

Destination of the warning; null is a no-op.

detail object

The caller's context attached to the warning — the tool, the file (see DescribeContext(string, string)).

Returns

int

1 when the warning was reported (or would be, on a null sink), else 0.