Table of Contents

Class SpindleCapability

Namespace
Hi.Milling
Assembly
HiMech.dll

Represents the capability of a spindle, including power, torque, and thermal characteristics. Internal Use Only

public class SpindleCapability : IMakeXmlSource, INameNote
Inheritance
SpindleCapability
Implements
Inherited Members
Extension Methods

Constructors

SpindleCapability()

Ctor.

public SpindleCapability()

SpindleCapability(XElement, string, params object[])

Initializes a new instance of the SpindleCapability class.

public SpindleCapability(XElement src, string baseDirectory, params object[] res)

Parameters

src XElement

The XML element containing spindle data.

baseDirectory string

The base directory for resolving relative paths.

res object[]

Additional resolution parameters.

Properties

DryRunFrictionPowerCoefficient_mWdrpm

Dry Run Friction Power Coefficient. unit is mW/rpm. DryRunFrictionPower = DryRunFrictionPowerCoefficient * S.

public double DryRunFrictionPowerCoefficient_mWdrpm { get; set; }

Property Value

double

Remarks

The default 4.82 is a rough estimate, not a measurement of a spindle; fit it to the spindle's idle power readings.

DryRunWindagePowerCoefficient_pWdrpm3

Dry Run Windage Power Coefficient. unit is pW/(rpm^3). DryRunWindagePower = DryRunWindagePowerCoefficient * (S^3).

public double DryRunWindagePowerCoefficient_pWdrpm3 { get; set; }

Property Value

double

Remarks

The default 90 is a rough estimate, not a measurement of a spindle; fit it to the spindle's idle power readings.

EnergyEfficiency

Energy Conversion Efficiency. Where is Ouput/Input.

public double EnergyEfficiency { get; set; }

Property Value

double

GearShiftSpindleSpeed_cycleds

Crossover speed. Gear Shift speed. spindle speed at shifting point between low gear mode and high gear mode. null means there is no gear shift mechanism.

public double? GearShiftSpindleSpeed_cycleds { get; set; }

Property Value

double?

GearShiftSpindleSpeed_rpm

Gear shift spindle speed in RPM.

public double? GearShiftSpindleSpeed_rpm { get; set; }

Property Value

double?

InfInsistentSpindleSpeedToPower_cycleDs_kW

SpindleSpeed(cycle/sec) to Power(kW) at infinte workable time.

public List<vec2d_t> InfInsistentSpindleSpeedToPower_cycleDs_kW { get; set; }

Property Value

List<vec2d_t>

InfInsistentSpindleSpeedToTorque_cycleDs_Nm

SpindleSpeed(cycle/sec) to Torque(Nm) at 100% insistent ratio.

public List<vec2d_t> InfInsistentSpindleSpeedToTorque_cycleDs_Nm { get; set; }

Property Value

List<vec2d_t>

Name

Name.

public string Name { get; set; }

Property Value

string

Note

Note.

public string Note { get; set; }

Property Value

string

WorkableDurationToSpindleSpeedPowerContoursDictionary_min_cycleDs_kW

WorkableDuration To SpindleSpeedToPowerContours. The dictionary is workable time (min) to (x:SpindleSpeed(cycle/sec), y:Power(kW))

public Dictionary<double, List<vec2d_t>> WorkableDurationToSpindleSpeedPowerContoursDictionary_min_cycleDs_kW { get; set; }

Property Value

Dictionary<double, List<vec2d_t>>

WorkableDurationToSpindleSpeedTorqueContoursDictionary_min_cycleDs_Nm

WorkableDuration To SpindleSpeedToTorqueContours. The dictionary is workable time (min) to (x:SpindleSpeed(cycle/sec), y:Torque(Nm)).

public Dictionary<double, List<vec2d_t>> WorkableDurationToSpindleSpeedTorqueContoursDictionary_min_cycleDs_Nm { get; set; }

Property Value

Dictionary<double, List<vec2d_t>>

WorkingTemperatureUpperBoundary_C

Upper boundary of working temperature in Celsius.

public double WorkingTemperatureUpperBoundary_C { get; set; }

Property Value

double

WorkingTemperatureUpperBoundary_K

Upper boundary of working temperature in Kelvin.

public double WorkingTemperatureUpperBoundary_K { get; set; }

Property Value

double

XName

Name for XML IO.

public static string XName { get; }

Property Value

string

Methods

GetDryRunPower_W(double)

Dry-run (idle) power in watts: what the spindle draws turning in air at spindleSpeed_rpm, bearing friction plus windage, DryRunFrictionPowerCoefficient_mWdrpm × 10⁻³ × S + DryRunWindagePowerCoefficient_pWdrpm3 × 10⁻¹² × S³ with S in rpm, capped at the loss the spindle sheds on its continuous rating at that speed: (1 − EnergyEfficiency) × the power of the longest-duration power contour, the continuous (PositiveInfinity) one whenever the capability has it.

public double GetDryRunPower_W(double spindleSpeed_rpm)

Parameters

spindleSpeed_rpm double

The spindle speed in revolutions per minute; its sign is ignored.

Returns

double

The dry-run power in watts: 0 at speed 0, and NaN at any other speed when the capability carries no power contour to take the cap from, or its longest-duration power contour has no point.

GetHeatPara(double)

Gets thermal parameters for the spindle at a given speed. Internal Use Only

public (double HeatCapacity_JdK, double ConvectionPara_WdK) GetHeatPara(double spindleSpeed_cycleDs)

Parameters

spindleSpeed_cycleDs double

Spindle speed in cycles per second

Returns

(double HeatCapacity_JdK, double ConvectionPara_WdK)

A tuple containing heat capacity and convection parameter

GetMeterPower_W(double, double)

The power in watts a spindle load meter reads while the spindle delivers outputPower_W to the cut: the output power plus the spindle's loss, the loss being the larger of the dry-run power (GetDryRunPower_W(double)) and the efficiency loss of the input power, i.e. max(output ÷ EnergyEfficiency, output + dry-run power). The spindle temperature is driven by the same loss.

public double GetMeterPower_W(double outputPower_W, double turningSpindleSpeed_rpm)

Parameters

outputPower_W double

The power the spindle delivers to the cut (0 in air).

turningSpindleSpeed_rpm double

The speed the spindle turns at; 0 for a stopped spindle (S0 or M05), which draws no dry-run power.

Returns

double

The meter power in watts; NaN when the dry-run power is (a turning speed on a capability without a power contour, or whose longest-duration power contour has no point). With an EnergyEfficiency of 0 it is NaN at no output power and positive infinity at any other.

MakeXmlSource(string, string, bool)

Creates an XML representation of the object. This method may also generate additional resources such as related files.

public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)

Parameters

baseDirectory string

The base directory for resolving relative paths

relFile string

The relative file path for the XML source

exhibitionOnly bool

if true, the extended file creation is suppressed.

Returns

XElement

An XML element representing the object's state

Remarks

For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied. The baseDirectory is typically the folder at the nearest configuration file folder. Since the folder can be moving with the configuration file.

Reg(XFactory)

Registers this type's deserializer with the given XFactory (or Default when factory is null). Idempotent.

public static void Reg(XFactory factory = null)

Parameters

factory XFactory