Class SpindleSpeedCache
- Namespace
- Hi.MachiningProcs
- Assembly
- HiMech.dll
Represents cached spindle speed information.
public class SpindleSpeedCache
- Inheritance
-
SpindleSpeedCache
- Inherited Members
- Extension Methods
Constructors
SpindleSpeedCache(SpindleSpeedCache)
Initializes a new instance by copying from another instance.
public SpindleSpeedCache(SpindleSpeedCache src)
Parameters
srcSpindleSpeedCacheThe source instance to copy from.
SpindleSpeedCache(double, double, double, double, double, double, double, double)
Initializes a new instance.
public SpindleSpeedCache(double spindleSpeed_cycleDs, double infInsistentRatioSpindleTorqueBoundary_Nm, double infInsistentRatioSpindlePowerBoundary_W, double minInsistentRatioSpindleTorqueBoundary_Nm, double minInsistentRatioSpindlePowerBoundary_W, double heatCapacity_JdK, double convectionPara_WdK, double dryRunPower_W)
Parameters
spindleSpeed_cycleDsdoubleThe spindle speed in cycles per second.
infInsistentRatioSpindleTorqueBoundary_NmdoubleThe infinite insistent ratio spindle torque boundary in Newton-meters.
infInsistentRatioSpindlePowerBoundary_WdoubleThe infinite insistent ratio spindle power boundary in watts.
minInsistentRatioSpindleTorqueBoundary_NmdoubleThe minimum insistent ratio spindle torque boundary in Newton-meters.
minInsistentRatioSpindlePowerBoundary_WdoubleThe minimum insistent ratio spindle power boundary in watts.
heatCapacity_JdKdoubleThe heat capacity in joules per Kelvin.
convectionPara_WdKdoubleThe convection parameter in watts per Kelvin.
dryRunPower_WdoubleThe dry run power in watts.
Fields
ContinuousConditionNotSetWarning
What the builder says when the capability has no continuous torque or power contour
(ContinuousConditionNotSet); the play reports it
as Spindle-Speed–Capped, the recompute as its chain warning.
public const string ContinuousConditionNotSetWarning = "Continuous condition not set in Spindle Capability."
Field Value
HeatCapacityUnderivedWarning
What a play says on the first step of a run of spindle speeds whose heat capacity the capability's ratings do not give, and a recompute once: the shortest-duration power contour holds no more power than the continuous one, or the capability has no power contour of a finite duration. The spindle temperature is computed all the same.
public const string HeatCapacityUnderivedWarning = "The Spindle Capability does not tell how fast the spindle warms up at a spindle speed in use: its shortest-duration power contour holds no more power than the continuous one (on that speed's side of the gear shift speed when one is set), or it has no power contour of a finite duration. The spindle temperature on the steps at that speed is computed all the same, but how fast it rises and falls does not come from the capability, and without a finite-duration contour it does not change at all. Give the shortest-duration power contour more power than the continuous one, as a short-time rating has."
Field Value
LimitsUnreadableWarning
What a play says on the step at which a run of steps the spindle limits cannot be read at starts, a recompute once, and an NC optimization once: Create(SpindleCapability, MachineMotionStep, SpindleSpeedCache, out SpindleSpeedCacheWarning) throws at a spindle speed the capability leaves it nothing to read the four boundaries and the heat parameters from — a power or torque contour without points, or a power contour with none on that speed's side of the gear shift speed — and the caller takes the step without a cache, as one played without a capability: the spindle temperature is carried over, and the spindle torque and power ratios of a step that cuts read NaN. One wording whatever the read that threw: the exception's own text (an index out of range, a sequence without elements) names no contour and helps no user.
public const string LimitsUnreadableWarning = "The spindle limits and heat parameters cannot be read from the spindle capability at the spindle speed of some steps: a power or torque contour has no points, or a power contour has none on those steps' side of the gear shift speed; on those steps the spindle temperature stays at the previous step's value and the spindle torque and power ratios of the steps that cut read NaN — correct the contours or the gear shift speed and recompute."
Field Value
NoHeatModelWarning
What a play says on the step at which a run of spindle speeds without a heat model starts, and a recompute once, about a spindle speed the chain can take no heat model from.
public const string NoHeatModelWarning = "The spindle heat model cannot be derived from the Spindle Capability at a spindle speed in use, so the spindle temperature is carried over on the steps at that speed. Check the continuous and the shortest-duration power contours (power above zero on that speed's side of the gear shift speed when one is set), the energy efficiency (above 0 and below 1), the working temperature upper boundary (above room temperature) and the shortest workable duration (above 0)."
Field Value
Properties
ConvectionPara_WdK
Gets or sets the convection parameter in watts per Kelvin.
public double ConvectionPara_WdK { get; set; }
Property Value
DryRunPower_W
Gets or sets the dry run power in watts.
public double DryRunPower_W { get; set; }
Property Value
HasHeatModel
Whether this cache carries a spindle heat model: a convection parameter and a heat capacity above zero. The capability yields no such pair where it leaves nothing to derive them from at the cache's speed: no power above zero on the continuous or on the shortest-duration power contour there (on the speed's side of the gear shift speed when one is set), an energy efficiency of 1 or more, a working temperature upper boundary with no range to warm through, or a shortest workable duration of zero. The spindle temperature is then carried over on the steps that use the cache; its four boundaries hold all the same.
public bool HasHeatModel { get; }
Property Value
HeatCapacity_JdK
Gets or sets the heat capacity in joules per Kelvin.
public double HeatCapacity_JdK { get; set; }
Property Value
InfInsistentRatioSpindlePowerBoundary_W
Gets or sets the infinite insistent ratio spindle power boundary in watts.
public double InfInsistentRatioSpindlePowerBoundary_W { get; set; }
Property Value
InfInsistentRatioSpindleTorqueBoundary_Nm
Gets or sets the infinite insistent ratio spindle torque boundary in Newton-meters.
public double InfInsistentRatioSpindleTorqueBoundary_Nm { get; set; }
Property Value
MinInsistentRatioSpindlePowerBoundary_W
Gets or sets the minimum insistent ratio spindle power boundary in watts.
public double MinInsistentRatioSpindlePowerBoundary_W { get; set; }
Property Value
MinInsistentRatioSpindleTorqueBoundary_Nm
Gets or sets the minimum insistent ratio spindle torque boundary in Newton-meters.
public double MinInsistentRatioSpindleTorqueBoundary_Nm { get; set; }
Property Value
SpindleSpeed_cycleDs
Gets or sets the spindle speed in cycles per second.
public double SpindleSpeed_cycleDs { get; set; }
Property Value
Methods
Create(SpindleCapability, MachineMotionStep, SpindleSpeedCache, out SpindleSpeedCacheWarning)
Creates a SpindleSpeedCache from spindle capability and machine motion step.
Returns preSpindleSpeedCache if the spindle speed is unchanged
or the capability data is incomplete, and null when there is no
spindleCapability at all (the readers then skip the
spindle ratios and the spindle temperature). The cache it builds may come
without a heat model (HasHeatModel) where the capability
leaves nothing to derive one from at that speed: its four boundaries are
good, and the caller that runs the chain with it carries the spindle
temperature over and says NoHeatModelWarning. Throws where the
capability leaves it nothing to read the boundaries or the heat parameters
from at the step's speed — a power or torque contour without points, or a
power contour with none on that speed's side of the gear shift speed: the
callers (the play, the recompute, the NC optimization) take such a step
without a cache and say LimitsUnreadableWarning.
public static SpindleSpeedCache Create(SpindleCapability spindleCapability, MachineMotionStep machineMotionStep, SpindleSpeedCache preSpindleSpeedCache, out SpindleSpeedCacheWarning warning)
Parameters
spindleCapabilitySpindleCapabilityThe capability of the moment; null builds no cache.
machineMotionStepMachineMotionStepThe step.
preSpindleSpeedCacheSpindleSpeedCacheThe previous step's cache, handed back while the speed stays.
warningSpindleSpeedCacheWarningWhat the builder has to say about the capability; None when nothing.
Returns
- SpindleSpeedCache
The cache, the previous one, or null.
Remarks
The body: a pure function of the capability, the step and the previous cache; what it
has to say comes back as warning (play-core migration P9), and the
caller emits it at its own site – the play as Spindle-Speed–Capped
(MachiningActRunner.BuildSpindleSpeedCache), the step-physics recompute as its
chain warning – with the text of WarningText(SpindleSpeedCacheWarning). The
Create(SpindleCapability, MachineMotionStep, SpindleSpeedCache, Action<string>)
form wraps it for the callers that hand a sink over.
Create(SpindleCapability, MachineMotionStep, SpindleSpeedCache, Action<string>)
Create(SpindleCapability, MachineMotionStep, SpindleSpeedCache, out SpindleSpeedCacheWarning)
for a caller that hands a sink over: onWarning is invoked with the
text of the warning (WarningText(SpindleSpeedCacheWarning)) when the builder has one, and the
cache answered is the same. The step's own getter, the feed solver and the NC
optimization call this form; the play and the step-physics recompute call the body
and emit at their own site.
public static SpindleSpeedCache Create(SpindleCapability spindleCapability, MachineMotionStep machineMotionStep, SpindleSpeedCache preSpindleSpeedCache, Action<string> onWarning)
Parameters
spindleCapabilitySpindleCapabilityThe capability of the moment; null builds no cache.
machineMotionStepMachineMotionStepThe step.
preSpindleSpeedCacheSpindleSpeedCacheThe previous step's cache, handed back while the speed stays.
onWarningAction<string>Invoked with the warning's text; may be null.
Returns
- SpindleSpeedCache
The cache, the previous one, or null.
WarningText(SpindleSpeedCacheWarning)
The text of a builder warning: ContinuousConditionNotSetWarning for ContinuousConditionNotSet, null for None.
public static string WarningText(SpindleSpeedCacheWarning warning)
Parameters
warningSpindleSpeedCacheWarningThe warning the builder answered.
Returns
- string
The text, or null when there is nothing to say.