//public AmountOfSubstanceUnit AmountOfSubstanceUnit { // get {return amountOfSubstance;} // set {amountOfSubstance = value;} //} public void Commit(UnitSystem us) { this.name = us.Name; //ep this.temperature = us.temperature; this.pressure = us.pressure; this.liquidHead = us.liquidHead; this.massFlowRate = us.massFlowRate; this.volumeFlowRate = us.volumeFlowRate; this.volumeRateFlowLiquids = us.volumeRateFlowLiquids; this.volumeRateFlowGases = us.volumeRateFlowGases; this.moistureContent = us.moistureContent; this.fraction = us.fraction; this.enthalpy = us.enthalpy; this.entropy = us.entropy; this.specificHeat = us.specificHeat; this.energy = us.energy; this.power = us.power; this.density = us.density; this.specificVolume = us.specificVolume; this.dynamicViscosity = us.dynamicViscosity; this.kinematicViscosity = us.kinematicViscosity; this.conductivity = us.conductivity; this.diffusivity = us.diffusivity; this.heatTransferCoefficient = us.heatTransferCoefficient; this.volumeHeatTransferCoefficient = us.volumeHeatTransferCoefficient; this.foulingFactor = us.foulingFactor; this.heatFlux = us.heatFlux; this.surfaceTension = us.surfaceTension; this.velocity = us.velocity; this.mass = us.mass; this.length = us.length; this.smallLength = us.smallLength; this.microLength = us.microLength; this.area = us.area; this.volume = us.volume; this.massVolumeConcentration = us.massVolumeConcentration; this.time = us.time; this.planeAngle = us.planeAngle; this.OnUnitSystemChanged(this); }
public UnitSystem() { this.name = "SI"; //ep this.temperature = TemperatureUnitType.Kelvin; this.pressure = PressureUnitType.Kilopascal; this.liquidHead = LiquidHeadUnitType.Meter; this.massFlowRate = MassFlowRateUnitType.KgPerHour; this.volumeFlowRate = VolumeFlowRateUnitType.CubicMeterPerHour; this.volumeRateFlowLiquids = VolumeRateFlowLiquidsUnitType.CubicMeterPerHour; this.volumeRateFlowGases = VolumeRateFlowGasesUnitType.CubicMeterPerHour; this.moistureContent = MoistureContentUnitType.KgPerKg; this.fraction = FractionUnitType.Percent; this.enthalpy = SpecificEnergyUnitType.KilojoulePerKg; this.entropy = SpecificEntropyUnitType.KilojoulePerKgKelvin; this.specificHeat = SpecificHeatUnitType.KilojoulePerKgKelvin; this.energy = EnergyUnitType.Kilojoule; this.power = PowerUnitType.Kilowatt; this.density = DensityUnitType.KgPerCubicMeter; this.specificVolume = SpecificVolumeUnitType.CubicMeterPerKg; this.dynamicViscosity = DynamicViscosityUnitType.PascalSecond; this.kinematicViscosity = KinematicViscosityUnitType.SquareMeterPerSec; this.conductivity = ThermalConductivityUnitType.WattPerMeterKelvin; this.diffusivity = DiffusivityUnitType.SquareMeterPerSec; this.velocity = VelocityUnitType.MeterPerSec; this.mass = MassUnitType.Kilogram; this.length = LengthUnitType.Meter; this.smallLength = SmallLengthUnitType.Centimeter; this.microLength = MicroLengthUnitType.Micrometer; this.heatTransferCoefficient = HeatTransferCoefficientUnitType.WattPerSquareMeterKelvin; this.volumeHeatTransferCoefficient = VolumeHeatTransferCoefficientUnitType.WattPerCubicMeterKelvin; this.foulingFactor = FoulingFactorUnitType.SquareMeterKelvinPerWatt; this.surfaceTension = SurfaceTensionUnitType.NewtonPerMeter; this.area = AreaUnitType.SquareMeter; this.volume = VolumeUnitType.CubicMeter; this.massVolumeConcentration = MassVolumeConcentrationUnitType.KgPerCubicMeter; this.time = TimeUnitType.Second; this.heatFlux = HeatFluxUnitType.WattPerSquareMeter; this.planeAngle = PlaneAngleUnitType.Radian; this.moleFlowRate = MoleFlowRateUnitType.KmolePerSec; this.readOnly = true; }
public static double ConvertFromSIValue(MassVolumeConcentrationUnitType unitType, double kgPerCuMValue) { double convertionCoeff = (double)coeffTable[unitType]; return(kgPerCuMValue / convertionCoeff); }
public static string GetUnitAsString(MassVolumeConcentrationUnitType unitType) { return(unitStringTable[unitType] as String); }
public static double ConvertToSIValue(MassVolumeConcentrationUnitType unitType, double toBeConvertedValue) { double convertionCoeff = (double)coeffTable[unitType]; return(convertionCoeff * toBeConvertedValue); }