public override void SetID(IDGenerator idGenerator) { ID = idGenerator.GetID(); Uncertainty.SetID(idGenerator); LengthUnit.SetID(idGenerator); PlaneAngleUnit.SetID(idGenerator); SolidAngleUnit.SetID(idGenerator); }
/// <summary> /// Creates a new angular feed constant unit based on angle per rotation. /// </summary> /// <param name="angleUnit">The angle feed per rotation</param> /// <param name="rotations">The rotations the angle feed is based on.</param> public AngularFeedConstantUnit(PlaneAngleUnit angleUnit, RotationUnit rotations) : base(new UnitCompositeCollection() { new MultipliedByUnit(angleUnit, 1), new DividedByUnit(rotations, 1) }) { }
/// <summary> /// Creates a new instance of an angular jerk unit. /// </summary> /// <param name="angle">The angle unit</param> /// <param name="time">The time unit</param> public AngularJerkUnit(PlaneAngleUnit angle, TimeUnit time) : base(new UnitCompositeCollection() { new MultipliedByUnit(angle, 1), new DividedByUnit(time, 3) }) { }
public void UpdateUnitSystem(UnitSystem unitSystem) { this.unitSystem = unitSystem; this.TextBox.Clear(); if (unitSystem != null) { this.textBoxUnitSystem.ScrollBars = System.Windows.Forms.ScrollBars.None; string temperature = "Temperature: \t\t" + TemperatureUnit.GetUnitAsString(unitSystem.TemperatureUnitType); string pressure = "Pressure: \t\t\t" + PressureUnit.GetUnitAsString(unitSystem.PressureUnitType); string massFlowRate = "Mass Flow Rate: \t\t" + MassFlowRateUnit.GetUnitAsString(unitSystem.MassFlowRateUnitType); string volumeFlowRate = "Volume Flow Rate: \t\t" + VolumeFlowRateUnit.GetUnitAsString(unitSystem.VolumeFlowRateUnitType); string moistureContent = "Moisture Content: \t\t" + MoistureContentUnit.GetUnitAsString(unitSystem.MoistureContentUnitType); string relativeHumidity = "Fraction: \t\t\t" + FractionUnit.GetUnitAsString(unitSystem.FractionUnitType); string enthalpy = "Specific Energy: \t\t" + SpecificEnergyUnit.GetUnitAsString(unitSystem.SpecificEnergyUnitType); string specificHeat = "Specific Heat: \t\t" + SpecificHeatUnit.GetUnitAsString(unitSystem.SpecificHeatUnitType); string energy = "Energy: \t\t\t" + EnergyUnit.GetUnitAsString(unitSystem.EnergyUnitType); string power = "Power: \t\t\t" + PowerUnit.GetUnitAsString(unitSystem.PowerUnitType); string density = "Density: \t\t\t" + DensityUnit.GetUnitAsString(unitSystem.DensityUnitType); string dynamicViscosity = "Dynamic Viscosity: \t\t" + DynamicViscosityUnit.GetUnitAsString(unitSystem.DynamicViscosityUnitType); string kinematicViscosity = "Kinematic Viscosity: \t" + KinematicViscosityUnit.GetUnitAsString(unitSystem.KinematicViscosityUnitType); string conductivity = "Thermal Conductivity: \t" + ThermalConductivityUnit.GetUnitAsString(unitSystem.ThermalConductivityUnitType); string diffusivity = "Diffusivity: \t\t" + DiffusivityUnit.GetUnitAsString(unitSystem.DiffusivityUnitType); string mass = "Mass: \t\t\t" + MassUnit.GetUnitAsString(unitSystem.MassUnitType); string length = "Length: \t\t\t" + LengthUnit.GetUnitAsString(unitSystem.LengthUnitType); string area = "Area: \t\t\t" + AreaUnit.GetUnitAsString(unitSystem.AreaUnitType); string volume = "Volume: \t\t\t" + VolumeUnit.GetUnitAsString(unitSystem.VolumeUnitType); string time = "Time: \t\t\t" + TimeUnit.GetUnitAsString(unitSystem.TimeUnitType); string smallLength = "Small Length: \t\t" + SmallLengthUnit.GetUnitAsString(unitSystem.SmallLengthUnitType); string microLength = "Micro Length: \t\t" + MicroLengthUnit.GetUnitAsString(unitSystem.MicroLengthUnitType); string liquidHead = "Liquid Head: \t\t" + LiquidHeadUnit.GetUnitAsString(unitSystem.LiquidHeadUnitType); string volumeRateFlowLiquids = "Volume Rate Flow Liquids: \t" + VolumeRateFlowLiquidsUnit.GetUnitAsString(unitSystem.VolumeRateFlowLiquidsUnitType); string volumeRateFlowGases = "Volume Rate Flow Gases: \t" + VolumeRateFlowGasesUnit.GetUnitAsString(unitSystem.VolumeRateFlowGasesUnitType); string heatTransferCoeff = "Heat Transfer Coeff.: \t" + HeatTransferCoefficientUnit.GetUnitAsString(unitSystem.HeatTransferCoefficientUnitType); string surfaceTension = "Surface Tension: \t\t" + SurfaceTensionUnit.GetUnitAsString(unitSystem.SurfaceTensionUnitType); string velocity = "Velocity: \t\t\t" + VelocityUnit.GetUnitAsString(unitSystem.VelocityUnitType); string foulingFactor = "Fouling Factor: \t\t" + FoulingFactorUnit.GetUnitAsString(unitSystem.FoulingFactorUnitType); string specificVolume = "Specific Volume: \t\t" + SpecificVolumeUnit.GetUnitAsString(unitSystem.SpecificVolumeUnitType); string massVolumeConcentration = "Mass Volume Concentration: \t" + MassVolumeConcentrationUnit.GetUnitAsString(unitSystem.MassVolumeConcentrationUnitType); string planeAngle = "Plane Angle: \t\t" + PlaneAngleUnit.GetUnitAsString(unitSystem.PlaneAngleUnitType); string volumeHeatTransferCoefficient = "Volume Heat Transfer Coeff.: \t" + VolumeHeatTransferCoefficientUnit.GetUnitAsString(unitSystem.VolumeHeatTransferCoefficientUnitType); this.TextBox.AppendText(temperature + "\r\n"); this.TextBox.AppendText(pressure + "\r\n"); this.TextBox.AppendText(massFlowRate + "\r\n"); this.TextBox.AppendText(volumeFlowRate + "\r\n"); this.TextBox.AppendText(moistureContent + "\r\n"); this.TextBox.AppendText(relativeHumidity + "\r\n"); this.TextBox.AppendText(enthalpy + "\r\n"); this.TextBox.AppendText(specificHeat + "\r\n"); this.TextBox.AppendText(energy + "\r\n"); this.TextBox.AppendText(power + "\r\n"); this.TextBox.AppendText(density + "\r\n"); this.TextBox.AppendText(dynamicViscosity + "\r\n"); this.TextBox.AppendText(kinematicViscosity + "\r\n"); this.TextBox.AppendText(conductivity + "\r\n"); this.TextBox.AppendText(diffusivity + "\r\n"); this.TextBox.AppendText(mass + "\r\n"); this.TextBox.AppendText(length + "\r\n"); this.TextBox.AppendText(area + "\r\n"); this.TextBox.AppendText(volume + "\r\n"); this.TextBox.AppendText(time + "\r\n"); this.TextBox.AppendText(smallLength + "\r\n"); this.TextBox.AppendText(microLength + "\r\n"); this.TextBox.AppendText(liquidHead + "\r\n"); this.TextBox.AppendText(volumeRateFlowLiquids + "\r\n"); this.TextBox.AppendText(volumeRateFlowGases + "\r\n"); this.TextBox.AppendText(heatTransferCoeff + "\r\n"); this.TextBox.AppendText(surfaceTension + "\r\n"); this.TextBox.AppendText(velocity + "\r\n"); this.TextBox.AppendText(foulingFactor + "\r\n"); this.TextBox.AppendText(specificVolume + "\r\n"); this.TextBox.AppendText(massVolumeConcentration + "\r\n"); this.TextBox.AppendText(planeAngle + "\r\n"); this.TextBox.AppendText(volumeHeatTransferCoefficient + "\r\n"); this.textBoxUnitSystem.ScrollBars = System.Windows.Forms.ScrollBars.Both; } }
/// <summary> /// Creates a new instance of an angular speed unit. /// </summary> /// <param name="angle">The unit for the angle travelled.</param> /// <param name="time">The timeframe for the angle travelled</param> public AngularSpeedUnit(PlaneAngleUnit angle, TimeUnit time) : base(new UnitCompositeCollection() { new MultipliedByUnit(angle, 1), new DividedByUnit(time, 1) }) { // angular speed is always angle over time. }
public PlaneAngle(double v, PlaneAngleUnit u) : base(value: v, scale: u) { }
/// <summary> /// returns full angle in the specified unit (full circle) /// </summary> /// <param name="unit"></param> /// <returns></returns> public static PlaneAngle GetFullAngle(PlaneAngleUnit unit) { return(UnitConverter.ConvertMeasure(new PlaneAngle(360, PlaneAngleUnit.Degree), unit)); }
/// <summary> /// returns straight angle in the specified unit (half circle) /// </summary> /// <param name="unit"></param> /// <returns></returns> public static PlaneAngle GetStraightAngle(PlaneAngleUnit unit) { return(UnitConverter.ConvertMeasure(new PlaneAngle(180, PlaneAngleUnit.Degree), unit)); }
/// <summary> /// Returns null angle in the specified unit /// </summary> /// <param name="unit"></param> /// <returns></returns> public static PlaneAngle getNullAngle(PlaneAngleUnit unit) { return(new PlaneAngle(0, unit)); }
/// <summary> /// Creates a new instance of an angular acceleration unit. /// </summary> /// <param name="angle">The angle unit</param> /// <param name="time">The time unit</param> public AngularAccelerationUnit(PlaneAngleUnit angle, TimeUnit time) : base(new UnitCompositeCollection() { new MultipliedByUnit(angle, 1), new DividedByUnit(time, 2) }) { // accleration is always the second derivative of distance over time, // therefore this ctor can be made public. }
/// <summary> /// For deriving units that can offer a multiple of the given unit. /// </summary> /// <param name="multiple">The multiple that shall be applied to the unit</param> /// <param name="angleUnit">The concrete unit for the plane angle.</param> protected PlaneAngleUnit(Multiple multiple, PlaneAngleUnit angleUnit) : base(multiple, angleUnit) { }