Class WorkpieceMaterial
Represents the physical and mechanical properties of a workpiece material.
public class WorkpieceMaterial : IPreferredFileName, IStructureMaterial, IMakeXmlSource, IDuplicate, INameNote
- Inheritance
-
WorkpieceMaterial
- Implements
- Inherited Members
- Extension Methods
Constructors
WorkpieceMaterial()
Ctor.
public WorkpieceMaterial()
WorkpieceMaterial(XElement, string)
Ctor.
public WorkpieceMaterial(XElement src, string baseDirectory)
Parameters
Properties
Al6061T6
General condition of Al6061T6.
public static WorkpieceMaterial Al6061T6 { get; }
Property Value
CompressiveYieldStrength_MPa
Gets or sets the compressive yield strength in megapascals (MPa).
public double CompressiveYieldStrength_MPa { get; set; }
Property Value
Density_gdcm3
Gets or sets the density in grams per cubic centimeter (g/cm³). NaN when the file the material was read from has no such element (not given); see HasThermalConstants.
public double Density_gdcm3 { get; set; }
Property Value
Density_gdm3
Gets or sets the density in grams per cubic meter (g/m³).
public double Density_gdm3 { get; set; }
Property Value
Density_gdmm3
Gets or sets the density in grams per cubic millimeter (g/mm³).
public double Density_gdmm3 { get; set; }
Property Value
ElasticModulus_GPa
Gets or sets the elastic modulus in gigapascals (GPa).
public double ElasticModulus_GPa { get; set; }
Property Value
ElogationRaioAtBreak
Gets or sets the elongation ratio at break point.
public double ElogationRaioAtBreak { get; set; }
Property Value
FusionLatentHeat_Jdg
Gets or sets the latent heat of fusion in joules per gram (J/g).
public double FusionLatentHeat_Jdg { get; set; }
Property Value
HasThermalConstants
Whether the three thermal constants the thermal model reads are given: none of
HeatConductivity_WdmK, Density_gdcm3 and HeatCapacity_JdgK
is NaN. A material file without one of the elements reads it as NaN (not given) and no default
stands in; the thermal model then skips the material as it skips one that is missing, and
MaterialThermalConstantCheck names it (Material-ThermalConstants–NotGiven).
A constant that is given but not usable (0, negative, infinite) counts as given: the model runs
with it as it is, and the check names it apart. The three material classes implement it as
well: a default interface member is reachable through the interface type alone, and a cutter's
flute material and a workpiece's material are held by their class types.
public bool HasThermalConstants { get; }
Property Value
HeatCapacity_JdgK
Gets or sets the specific heat capacity in joules per gram per Kelvin (J/g·K). NaN when the file the material was read from has no such element (not given); see HasThermalConstants.
public double HeatCapacity_JdgK { get; set; }
Property Value
HeatConductivity_WdmK
Gets or sets the thermal conductivity in watts per meter per Kelvin (W/(m·K)). NaN when the file the material was read from has no such element (not given); see HasThermalConstants.
public double HeatConductivity_WdmK { get; set; }
Property Value
HeatConductivity_WdmmK
Gets or sets the heat conductivity in watts per millimeter per Kelvin (W/mm·K). This is a conversion of HeatConductivity_WdmK with a factor of 1/1000.
public double HeatConductivity_WdmmK { get; set; }
Property Value
MeltingTemperature_C
Gets or sets the melting temperature in Celsius (°C).
public double MeltingTemperature_C { get; set; }
Property Value
MeltingTemperature_K
Gets or sets the melting temperature in Kelvin (K).
public double MeltingTemperature_K { get; set; }
Property Value
Name
Gets or sets the name of the material.
public string Name { get; set; }
Property Value
Note
Gets or sets additional notes about the material.
public string Note { get; set; }
Property Value
PoissonRatio
Gets or sets the Poisson's ratio of the material.
public double PoissonRatio { get; set; }
Property Value
PreferredFileName
Gets or sets the preferred file name for this object when generating or saving files.
public string PreferredFileName { get; set; }
Property Value
TensileYieldStrength_MPa
Gets or sets the tensile yield strength in megapascals (MPa).
public double TensileYieldStrength_MPa { get; set; }
Property Value
XName
Name for XML IO.
public static string XName { get; }
Property Value
Methods
Duplicate(params object[])
Creates a deep copy of the object, excluding any source file references.
public object Duplicate(params object[] res)
Parameters
resobject[]Optional parameters that may be needed during the duplication process
Returns
- object
A new instance that is a deep copy of the original object
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
baseDirectorystringThe base directory for resolving relative paths
relFilestringThe relative file path for the XML source
exhibitionOnlyboolif 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
and chains Reg(factory) on dependents. Idempotent.
public static void Reg(XFactory factory = null)
Parameters
factoryXFactory