XUnitSystem

Inherited from NItem,

Inherited by NULL

Friend class NULL

Description

XUnitSystem从NItem继承,封装了单位系统定义的数据及其方法,其类型标识为“CUNITSYSTEM”。 XT的单位系统以国际标准单位系统(SI)为基准,所有的数据在底层都按照SI单位存储读取,在应用层面用户可以定义自己的单位系统,XUnitSystem提供了用于SI与定制单位系之间的转换函数。

XUnitSystem预置了7个基本基本量纲单位以及40多种导出量纲单位,基本上覆盖了仿真分析中所使用的绝大多数单位类型。

Unit_Length“Length” 0
Unit_Time“Time” 1
Unit_Mass“Mass” 2
Unit_Force“Force” 3
Unit_Angle“Angle” 4
Unit_Temperature“Temperature” 5
Unit_Area“Area” 6
Unit_Volume“Volume” 7
Unit_Velocity“Velocity” 8
Unit_Acceleration“Acceleration” 9
Unit_RotateVelo“AngularVelocity” 10
Unit_RotateAcc“AngularAcceleration” 11
Unit_Moment“Moment” 12
Unit_Pressure“Pressure” 13
Unit_Density“Density” 14
Unit_Stiffness“Stiffness” 15
Unit_RotateStiff“RotateStiffness” 16
Unit_DampingCoef“DampingCoefficient” 17
Unit_RotateDampingCoef“RotateDampingCoefficient” 18
Unit_Modulus“ElasticModules” 19
Unit_Energy“Energy” 20
Unit_Power“Power” 21
Unit_ThermalExCoef“ThermalExpansionCoefficient” 22
Unit_ThermalConductivity“ThermalConductivity” 23
Unit_ConvectionCoef“ConvectionCoefficient” 24
Unit_SpecificHeat“SpecificHeat” 25
Unit_HeatFlux“HeatFlux” 26
Unit_HeatGeneration“HeatGeneration” 27
Unit_LinearDensity“MassPerUnitLength” 28
Unit_SurfaceDensity“MassPerUnitArea” 29
Unit_AreaMomentInertia“AreaMomentInertia” 30
Unit_TorsionalConst“TorsionalConstant” 31
Unit_WarpCoef“WarpingCoefficient” 32
Unit_LinearMassMomentIntertia“MassMomentOfInertiaPerUnitLength” 33
Unit_MomentInertia“MassMomentOfInertia” 34
Unit_Stress“Stress” 35
Unit_Strain“Strain” 36
Unit_StrainEnergy“StrainEnergy” 37
Unit_ThermalEnergy“ThermalEnergy” 38
Unit_Frequency“Frequency” 39
Unit_VolumeEnergyDensity“VolumeEnergyDensity” 40
Unit_ElectricalResistivity“ElectricalResistivity” 41
Unit_StressReciprocal“StressReciprocal” 42
Unit_ThermalRadiation“ThermalRadiation” 43
Unit_DynamicViscosity“DynamicViscosity” 44
Unit_KinematicViscosity“KinematicViscosity” 45
Unit_FlowRate“FlowRate” 46
Unit_VelocityReciprocal“VelocityReciprocal” 47
Unit_EquivalentViscosity“EquivalentViscosity” 48

Members

Public interface


int m_iUnits[Unit_Type_Count]

各类型单位选项数组


XUnitSystem(ulong id)

~XUnitSystem()

static int getUnitCount(TypeID unitType)

static const char * getUnitString(TypeID unitType, ulong unitID)

static const char * getUnitTypeString(TypeID unitType)

static double convertToSI(TypeID unitType, ulong unitID, double curValue)

static double convertFromSI(TypeID unitType, ulong unitID, double coreValue)

static int getSIUnit(TypeID unitType)

double getValue(TypeID unitType, double siValue) const

double getSIValue(TypeID unitType, double value) const

int & getUnit(TypeID unitType)

int getUnit(TypeID unitType) const

void setUnit(TypeID unitType, ulong unitID)

virtual void write(XBinaryIO * io)

virtual ErrorCode read(XBinaryIO * io)