public void SpecificWeightDividedByDensityEqualsAcceleration()
        {
            Acceleration acceleration = SpecificWeight.FromNewtonsPerCubicMeter(40) / Density.FromKilogramsPerCubicMeter(4);

            Assert.Equal(Acceleration.FromMetersPerSecondSquared(10), acceleration);
        }
Ejemplo n.º 2
0
        public void EqualsReturnsFalseOnTypeMismatch()
        {
            Density kilogrampercubicmeter = Density.FromKilogramsPerCubicMeter(1);

            Assert.False(kilogrampercubicmeter.Equals(new object()));
        }
 /// <inheritdoc cref="Density.FromKilogramsPerCubicMeter(double)"/>
 public static Density KilogramsPerCubicMeter(this long value) => Density.FromKilogramsPerCubicMeter(value);
Ejemplo n.º 4
0
        public void DensityTimesVolumeFlowEqualsMassFlow()
        {
            MassFlow massFlow = Density.FromKilogramsPerCubicMeter(3) * VolumeFlow.FromCubicMetersPerSecond(7);

            Assert.Equal(MassFlow.FromKilogramsPerSecond(21), massFlow);
        }
Ejemplo n.º 5
0
        public void CompareToThrowsOnTypeMismatch()
        {
            Density kilogrampercubicmeter = Density.FromKilogramsPerCubicMeter(1);

            Assert.Throws <ArgumentException>(() => kilogrampercubicmeter.CompareTo(new object()));
        }
Ejemplo n.º 6
0
 public static Density operator /(double constant, SpecificVolume volume)
 {
     return(Density.FromKilogramsPerCubicMeter(constant / volume.CubicMetersPerKilogram));
 }
Ejemplo n.º 7
0
 public void NumberToKilogramsPerCubicMeterTest() =>
 Assert.Equal(Density.FromKilogramsPerCubicMeter(2), 2.KilogramsPerCubicMeter());
Ejemplo n.º 8
0
        public static void KinematicViscosityTimesDensityEqualsDynamicViscosity()
        {
            DynamicViscosity dynamicViscosity = KinematicViscosity.FromSquareMetersPerSecond(10) * Density.FromKilogramsPerCubicMeter(2);

            Assert.Equal(dynamicViscosity, DynamicViscosity.FromNewtonSecondsPerMeterSquared(20));
        }
 /// <inheritdoc cref="Density.FromKilogramsPerCubicMeter(UnitsNet.QuantityValue)" />
 public static Density KilogramsPerCubicMeter <T>(this T value) => Density.FromKilogramsPerCubicMeter(Convert.ToDouble(value));
Ejemplo n.º 10
0
 /// <summary>
 ///     Get a <see cref="Density"/> from this <see cref="Molarity"/>.
 /// </summary>
 /// <param name="molecularWeight"></param>
 public Density ToDensity(Mass molecularWeight)
 {
     return(Density.FromKilogramsPerCubicMeter(MolesPerCubicMeter * molecularWeight.Kilograms));
 }
Ejemplo n.º 11
0
 public static Density operator /(MassFlux massFlux, Speed speed)
 {
     return(Density.FromKilogramsPerCubicMeter(massFlux.KilogramsPerSecondPerSquareMeter / speed.MetersPerSecond));
 }
Ejemplo n.º 12
0
        public static List <CustomOil> GetList()
        {
            List <CustomOil> ListOfOil = new List <CustomOil>();



            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(-30), KinematicViscosity.FromCentistokes(22124.9), Density.FromKilogramsPerCubicMeter(863.3), SpecificEntropy.FromKilojoulesPerKilogramKelvin(1.896), ThermalConductivity.FromWattsPerMeterKelvin(0.1486)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(-20), KinematicViscosity.FromCentistokes(6864.5), Density.FromKilogramsPerCubicMeter(858), SpecificEntropy.FromKilojoulesPerKilogramKelvin(1.933), ThermalConductivity.FromWattsPerMeterKelvin(0.1475)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(-10), KinematicViscosity.FromCentistokes(2535.8), Density.FromKilogramsPerCubicMeter(852.8), SpecificEntropy.FromKilojoulesPerKilogramKelvin(1.97), ThermalConductivity.FromWattsPerMeterKelvin(0.1464)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(0), KinematicViscosity.FromCentistokes(1080.9), Density.FromKilogramsPerCubicMeter(847.6), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.007), ThermalConductivity.FromWattsPerMeterKelvin(0.1454)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(10), KinematicViscosity.FromCentistokes(518.5), Density.FromKilogramsPerCubicMeter(842.5), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.044), ThermalConductivity.FromWattsPerMeterKelvin(0.1443)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(20), KinematicViscosity.FromCentistokes(274.4), Density.FromKilogramsPerCubicMeter(837.5), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.081), ThermalConductivity.FromWattsPerMeterKelvin(0.1432)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(30), KinematicViscosity.FromCentistokes(157.6), Density.FromKilogramsPerCubicMeter(832.5), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.118), ThermalConductivity.FromWattsPerMeterKelvin(0.1421)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(40), KinematicViscosity.FromCentistokes(97), Density.FromKilogramsPerCubicMeter(827.6), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.155), ThermalConductivity.FromWattsPerMeterKelvin(0.141)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(50), KinematicViscosity.FromCentistokes(63.3), Density.FromKilogramsPerCubicMeter(822.7), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.192), ThermalConductivity.FromWattsPerMeterKelvin(0.1399)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(60), KinematicViscosity.FromCentistokes(43.3), Density.FromKilogramsPerCubicMeter(817.9), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.229), ThermalConductivity.FromWattsPerMeterKelvin(0.1389)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(70), KinematicViscosity.FromCentistokes(30.9), Density.FromKilogramsPerCubicMeter(813.2), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.266), ThermalConductivity.FromWattsPerMeterKelvin(0.1378)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(80), KinematicViscosity.FromCentistokes(22.9), Density.FromKilogramsPerCubicMeter(808.5), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.303), ThermalConductivity.FromWattsPerMeterKelvin(0.1367)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(90), KinematicViscosity.FromCentistokes(17.5), Density.FromKilogramsPerCubicMeter(803.8), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.34), ThermalConductivity.FromWattsPerMeterKelvin(0.1356)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(100), KinematicViscosity.FromCentistokes(13.7), Density.FromKilogramsPerCubicMeter(799.2), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.377), ThermalConductivity.FromWattsPerMeterKelvin(0.1345)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(110), KinematicViscosity.FromCentistokes(11), Density.FromKilogramsPerCubicMeter(794.7), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.414), ThermalConductivity.FromWattsPerMeterKelvin(0.1334)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(120), KinematicViscosity.FromCentistokes(9), Density.FromKilogramsPerCubicMeter(790.2), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.451), ThermalConductivity.FromWattsPerMeterKelvin(0.1324)));



            return(ListOfOil);
        }
Ejemplo n.º 13
0
        public static void DensityTimesVolumeEqualsMass()
        {
            Mass mass = Density.FromKilogramsPerCubicMeter(2) * Volume.FromCubicMeters(3);

            Assert.Equal(mass, Mass.FromKilograms(6));
        }
        public void SpecificWeightDividedByAccelerationEqualsDensity()
        {
            Density density = SpecificWeight.FromNewtonsPerCubicMeter(20) / Acceleration.FromMetersPerSecondSquared(2);

            Assert.Equal(Density.FromKilogramsPerCubicMeter(10), density);
        }
Ejemplo n.º 15
0
        public void MassFluxDividedByDensityEqualsSpeed()
        {
            Speed speed = MassFlux.FromKilogramsPerSecondPerSquareMeter(20) / Density.FromKilogramsPerCubicMeter(2);

            Assert.Equal(speed, Speed.FromMetersPerSecond(10));
        }
 public static Density?KilogramsPerCubicMeter <T>(this T?value) where T : struct => Density.FromKilogramsPerCubicMeter(value == null ? (double?)null : Convert.ToDouble(value.Value));
Ejemplo n.º 17
0
        public void VolumeTimesDensityEqualsMass()
        {
            Mass mass = Volume.FromCubicMeters(2) * Density.FromKilogramsPerCubicMeter(3);

            Assert.Equal(mass, Mass.FromKilograms(6));
        }
Ejemplo n.º 18
0
        public static void DynamicViscosityDividedByDensityEqualsKinematicViscosity()
        {
            KinematicViscosity kinematicViscosity = DynamicViscosity.FromNewtonSecondsPerMeterSquared(10) / Density.FromKilogramsPerCubicMeter(2);

            Assert.Equal(kinematicViscosity, KinematicViscosity.FromSquareMetersPerSecond(5));
        }
Ejemplo n.º 19
0
        public static void ConstantOverSpecificVolumeEqualsDensity()
        {
            Density density = 5 / SpecificVolume.FromCubicMetersPerKilogram(20);

            Assert.Equal(density, Density.FromKilogramsPerCubicMeter(0.25));
        }
Ejemplo n.º 20
0
        public void AccelerationTimesDensityEqualsSpecificWeight()
        {
            SpecificWeight specificWeight = Acceleration.FromMetersPerSecondSquared(10) * Density.FromKilogramsPerCubicMeter(2);

            Assert.Equal(SpecificWeight.FromNewtonsPerCubicMeter(20), specificWeight);
        }
Ejemplo n.º 21
0
        public void VolumeFlowTimesDensityEqualsMassFlow()
        {
            MassFlow massFlow = VolumeFlow.FromCubicMetersPerSecond(2) * Density.FromKilogramsPerCubicMeter(3);

            Assert.Equal(MassFlow.FromKilogramsPerSecond(6), massFlow);
        }
Ejemplo n.º 22
0
        public static List <CustomOil> GetList()
        {
            List <CustomOil> ListOfOil = new List <CustomOil>();



            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(-30), KinematicViscosity.FromCentistokes(75984.3), Density.FromKilogramsPerCubicMeter(873.6), SpecificEntropy.FromKilojoulesPerKilogramKelvin(1.885), ThermalConductivity.FromWattsPerMeterKelvin(0.1469)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(-20), KinematicViscosity.FromCentistokes(22001.9), Density.FromKilogramsPerCubicMeter(868.2), SpecificEntropy.FromKilojoulesPerKilogramKelvin(1.922), ThermalConductivity.FromWattsPerMeterKelvin(0.1458)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(-10), KinematicViscosity.FromCentistokes(7604.5), Density.FromKilogramsPerCubicMeter(862.9), SpecificEntropy.FromKilojoulesPerKilogramKelvin(1.959), ThermalConductivity.FromWattsPerMeterKelvin(0.1447)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(0), KinematicViscosity.FromCentistokes(3042.5), Density.FromKilogramsPerCubicMeter(857.7), SpecificEntropy.FromKilojoulesPerKilogramKelvin(1.995), ThermalConductivity.FromWattsPerMeterKelvin(0.1436)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(10), KinematicViscosity.FromCentistokes(1374.9), Density.FromKilogramsPerCubicMeter(852.6), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.032), ThermalConductivity.FromWattsPerMeterKelvin(0.1426)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(20), KinematicViscosity.FromCentistokes(688), Density.FromKilogramsPerCubicMeter(847.5), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.069), ThermalConductivity.FromWattsPerMeterKelvin(0.1415)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(30), KinematicViscosity.FromCentistokes(375.2), Density.FromKilogramsPerCubicMeter(842.4), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.106), ThermalConductivity.FromWattsPerMeterKelvin(0.1404)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(40), KinematicViscosity.FromCentistokes(220), Density.FromKilogramsPerCubicMeter(837.4), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.142), ThermalConductivity.FromWattsPerMeterKelvin(0.1394)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(50), KinematicViscosity.FromCentistokes(137.2), Density.FromKilogramsPerCubicMeter(832.5), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.179), ThermalConductivity.FromWattsPerMeterKelvin(0.1383)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(60), KinematicViscosity.FromCentistokes(90.2), Density.FromKilogramsPerCubicMeter(827.7), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.216), ThermalConductivity.FromWattsPerMeterKelvin(0.1372)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(70), KinematicViscosity.FromCentistokes(62.1), Density.FromKilogramsPerCubicMeter(822.8), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.253), ThermalConductivity.FromWattsPerMeterKelvin(0.1362)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(80), KinematicViscosity.FromCentistokes(44.4), Density.FromKilogramsPerCubicMeter(818.1), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.29), ThermalConductivity.FromWattsPerMeterKelvin(0.1351)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(90), KinematicViscosity.FromCentistokes(32.8), Density.FromKilogramsPerCubicMeter(813.4), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.326), ThermalConductivity.FromWattsPerMeterKelvin(0.134)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(100), KinematicViscosity.FromCentistokes(25), Density.FromKilogramsPerCubicMeter(808.8), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.363), ThermalConductivity.FromWattsPerMeterKelvin(0.1329)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(110), KinematicViscosity.FromCentistokes(19.5), Density.FromKilogramsPerCubicMeter(804.2), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.4), ThermalConductivity.FromWattsPerMeterKelvin(0.1319)));
            ListOfOil.Add(new CustomOil(Temperature.FromDegreesCelsius(120), KinematicViscosity.FromCentistokes(15.6), Density.FromKilogramsPerCubicMeter(799.6), SpecificEntropy.FromKilojoulesPerKilogramKelvin(2.437), ThermalConductivity.FromWattsPerMeterKelvin(0.1308)));



            return(ListOfOil);
        }
Ejemplo n.º 23
0
        public void MassDividedByVolumeEqualsDensity()
        {
            Density density = Mass.FromKilograms(18) / Volume.FromCubicMeters(3);

            Assert.Equal(density, Density.FromKilogramsPerCubicMeter(6));
        }
Ejemplo n.º 24
0
        public void SpeedTimesDensityEqualsMassFlux()
        {
            MassFlux massFlux = Speed.FromMetersPerSecond(20) * Density.FromKilogramsPerCubicMeter(2);

            Assert.Equal(massFlux, MassFlux.FromKilogramsPerSecondPerSquareMeter(40));
        }
Ejemplo n.º 25
0
        public void CompareToThrowsOnNull()
        {
            Density kilogrampercubicmeter = Density.FromKilogramsPerCubicMeter(1);

            Assert.Throws <ArgumentNullException>(() => kilogrampercubicmeter.CompareTo(null));
        }
Ejemplo n.º 26
0
        public void MassFlowDividedByDensityEqualsVolumeFlow()
        {
            VolumeFlow volumeFlow = MassFlow.FromKilogramsPerSecond(20) / Density.FromKilogramsPerCubicMeter(4);

            Assert.Equal(5, volumeFlow.CubicMetersPerSecond);
        }
Ejemplo n.º 27
0
        public void EqualsReturnsFalseOnNull()
        {
            Density kilogrampercubicmeter = Density.FromKilogramsPerCubicMeter(1);

            Assert.False(kilogrampercubicmeter.Equals(null));
        }
Ejemplo n.º 28
0
        public void MassFluxDividedBySpeedEqualsDensity()
        {
            Density density = MassFlux.FromKilogramsPerSecondPerSquareMeter(20) / Speed.FromMetersPerSecond(2);

            Assert.Equal(density, Density.FromKilogramsPerCubicMeter(10));
        }
 /// <inheritdoc cref="Density.FromKilogramsPerCubicMeter(double?)"/>
 public static Density?KilogramsPerCubicMeter(this double?value) => Density.FromKilogramsPerCubicMeter(value);
Ejemplo n.º 30
0
        public void ToUnit()
        {
            var kilogrampercubicmeter = Density.FromKilogramsPerCubicMeter(1);

            var decigramperdeciliterQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.DecigramPerDeciliter);

            AssertEx.EqualTolerance(DecigramsPerDeciLiterInOneKilogramPerCubicMeter, (double)decigramperdeciliterQuantity.Value, DecigramsPerDeciLiterTolerance);
            Assert.Equal(DensityUnit.DecigramPerDeciliter, decigramperdeciliterQuantity.Unit);

            var decigramperliterQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.DecigramPerLiter);

            AssertEx.EqualTolerance(DecigramsPerLiterInOneKilogramPerCubicMeter, (double)decigramperliterQuantity.Value, DecigramsPerLiterTolerance);
            Assert.Equal(DensityUnit.DecigramPerLiter, decigramperliterQuantity.Unit);

            var decigrampermilliliterQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.DecigramPerMilliliter);

            AssertEx.EqualTolerance(DecigramsPerMilliliterInOneKilogramPerCubicMeter, (double)decigrampermilliliterQuantity.Value, DecigramsPerMilliliterTolerance);
            Assert.Equal(DensityUnit.DecigramPerMilliliter, decigrampermilliliterQuantity.Unit);

            var grampercubiccentimeterQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.GramPerCubicCentimeter);

            AssertEx.EqualTolerance(GramsPerCubicCentimeterInOneKilogramPerCubicMeter, (double)grampercubiccentimeterQuantity.Value, GramsPerCubicCentimeterTolerance);
            Assert.Equal(DensityUnit.GramPerCubicCentimeter, grampercubiccentimeterQuantity.Unit);

            var grampercubicmeterQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.GramPerCubicMeter);

            AssertEx.EqualTolerance(GramsPerCubicMeterInOneKilogramPerCubicMeter, (double)grampercubicmeterQuantity.Value, GramsPerCubicMeterTolerance);
            Assert.Equal(DensityUnit.GramPerCubicMeter, grampercubicmeterQuantity.Unit);

            var grampercubicmillimeterQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.GramPerCubicMillimeter);

            AssertEx.EqualTolerance(GramsPerCubicMillimeterInOneKilogramPerCubicMeter, (double)grampercubicmillimeterQuantity.Value, GramsPerCubicMillimeterTolerance);
            Assert.Equal(DensityUnit.GramPerCubicMillimeter, grampercubicmillimeterQuantity.Unit);

            var gramperdeciliterQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.GramPerDeciliter);

            AssertEx.EqualTolerance(GramsPerDeciLiterInOneKilogramPerCubicMeter, (double)gramperdeciliterQuantity.Value, GramsPerDeciLiterTolerance);
            Assert.Equal(DensityUnit.GramPerDeciliter, gramperdeciliterQuantity.Unit);

            var gramperliterQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.GramPerLiter);

            AssertEx.EqualTolerance(GramsPerLiterInOneKilogramPerCubicMeter, (double)gramperliterQuantity.Value, GramsPerLiterTolerance);
            Assert.Equal(DensityUnit.GramPerLiter, gramperliterQuantity.Unit);

            var grampermilliliterQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.GramPerMilliliter);

            AssertEx.EqualTolerance(GramsPerMilliliterInOneKilogramPerCubicMeter, (double)grampermilliliterQuantity.Value, GramsPerMilliliterTolerance);
            Assert.Equal(DensityUnit.GramPerMilliliter, grampermilliliterQuantity.Unit);

            var kilogrampercubiccentimeterQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.KilogramPerCubicCentimeter);

            AssertEx.EqualTolerance(KilogramsPerCubicCentimeterInOneKilogramPerCubicMeter, (double)kilogrampercubiccentimeterQuantity.Value, KilogramsPerCubicCentimeterTolerance);
            Assert.Equal(DensityUnit.KilogramPerCubicCentimeter, kilogrampercubiccentimeterQuantity.Unit);

            var kilogrampercubicmeterQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.KilogramPerCubicMeter);

            AssertEx.EqualTolerance(KilogramsPerCubicMeterInOneKilogramPerCubicMeter, (double)kilogrampercubicmeterQuantity.Value, KilogramsPerCubicMeterTolerance);
            Assert.Equal(DensityUnit.KilogramPerCubicMeter, kilogrampercubicmeterQuantity.Unit);

            var kilogrampercubicmillimeterQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.KilogramPerCubicMillimeter);

            AssertEx.EqualTolerance(KilogramsPerCubicMillimeterInOneKilogramPerCubicMeter, (double)kilogrampercubicmillimeterQuantity.Value, KilogramsPerCubicMillimeterTolerance);
            Assert.Equal(DensityUnit.KilogramPerCubicMillimeter, kilogrampercubicmillimeterQuantity.Unit);

            var kilopoundpercubicfootQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.KilopoundPerCubicFoot);

            AssertEx.EqualTolerance(KilopoundsPerCubicFootInOneKilogramPerCubicMeter, (double)kilopoundpercubicfootQuantity.Value, KilopoundsPerCubicFootTolerance);
            Assert.Equal(DensityUnit.KilopoundPerCubicFoot, kilopoundpercubicfootQuantity.Unit);

            var kilopoundpercubicinchQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.KilopoundPerCubicInch);

            AssertEx.EqualTolerance(KilopoundsPerCubicInchInOneKilogramPerCubicMeter, (double)kilopoundpercubicinchQuantity.Value, KilopoundsPerCubicInchTolerance);
            Assert.Equal(DensityUnit.KilopoundPerCubicInch, kilopoundpercubicinchQuantity.Unit);

            var milligrampercubicmeterQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.MilligramPerCubicMeter);

            AssertEx.EqualTolerance(MilligramsPerCubicMeterInOneKilogramPerCubicMeter, (double)milligrampercubicmeterQuantity.Value, MilligramsPerCubicMeterTolerance);
            Assert.Equal(DensityUnit.MilligramPerCubicMeter, milligrampercubicmeterQuantity.Unit);

            var milligramperdeciliterQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.MilligramPerDeciliter);

            AssertEx.EqualTolerance(MilligramsPerDeciLiterInOneKilogramPerCubicMeter, (double)milligramperdeciliterQuantity.Value, MilligramsPerDeciLiterTolerance);
            Assert.Equal(DensityUnit.MilligramPerDeciliter, milligramperdeciliterQuantity.Unit);

            var milligramperliterQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.MilligramPerLiter);

            AssertEx.EqualTolerance(MilligramsPerLiterInOneKilogramPerCubicMeter, (double)milligramperliterQuantity.Value, MilligramsPerLiterTolerance);
            Assert.Equal(DensityUnit.MilligramPerLiter, milligramperliterQuantity.Unit);

            var milligrampermilliliterQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.MilligramPerMilliliter);

            AssertEx.EqualTolerance(MilligramsPerMilliliterInOneKilogramPerCubicMeter, (double)milligrampermilliliterQuantity.Value, MilligramsPerMilliliterTolerance);
            Assert.Equal(DensityUnit.MilligramPerMilliliter, milligrampermilliliterQuantity.Unit);

            var poundpercubicfootQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.PoundPerCubicFoot);

            AssertEx.EqualTolerance(PoundsPerCubicFootInOneKilogramPerCubicMeter, (double)poundpercubicfootQuantity.Value, PoundsPerCubicFootTolerance);
            Assert.Equal(DensityUnit.PoundPerCubicFoot, poundpercubicfootQuantity.Unit);

            var poundpercubicinchQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.PoundPerCubicInch);

            AssertEx.EqualTolerance(PoundsPerCubicInchInOneKilogramPerCubicMeter, (double)poundpercubicinchQuantity.Value, PoundsPerCubicInchTolerance);
            Assert.Equal(DensityUnit.PoundPerCubicInch, poundpercubicinchQuantity.Unit);

            var poundperimperialgallonQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.PoundPerImperialGallon);

            AssertEx.EqualTolerance(PoundsPerImperialGallonInOneKilogramPerCubicMeter, (double)poundperimperialgallonQuantity.Value, PoundsPerImperialGallonTolerance);
            Assert.Equal(DensityUnit.PoundPerImperialGallon, poundperimperialgallonQuantity.Unit);

            var poundperusgallonQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.PoundPerUSGallon);

            AssertEx.EqualTolerance(PoundsPerUSGallonInOneKilogramPerCubicMeter, (double)poundperusgallonQuantity.Value, PoundsPerUSGallonTolerance);
            Assert.Equal(DensityUnit.PoundPerUSGallon, poundperusgallonQuantity.Unit);

            var slugpercubicfootQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.SlugPerCubicFoot);

            AssertEx.EqualTolerance(SlugsPerCubicFootInOneKilogramPerCubicMeter, (double)slugpercubicfootQuantity.Value, SlugsPerCubicFootTolerance);
            Assert.Equal(DensityUnit.SlugPerCubicFoot, slugpercubicfootQuantity.Unit);

            var tonnepercubiccentimeterQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.TonnePerCubicCentimeter);

            AssertEx.EqualTolerance(TonnesPerCubicCentimeterInOneKilogramPerCubicMeter, (double)tonnepercubiccentimeterQuantity.Value, TonnesPerCubicCentimeterTolerance);
            Assert.Equal(DensityUnit.TonnePerCubicCentimeter, tonnepercubiccentimeterQuantity.Unit);

            var tonnepercubicmeterQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.TonnePerCubicMeter);

            AssertEx.EqualTolerance(TonnesPerCubicMeterInOneKilogramPerCubicMeter, (double)tonnepercubicmeterQuantity.Value, TonnesPerCubicMeterTolerance);
            Assert.Equal(DensityUnit.TonnePerCubicMeter, tonnepercubicmeterQuantity.Unit);

            var tonnepercubicmillimeterQuantity = kilogrampercubicmeter.ToUnit(DensityUnit.TonnePerCubicMillimeter);

            AssertEx.EqualTolerance(TonnesPerCubicMillimeterInOneKilogramPerCubicMeter, (double)tonnepercubicmillimeterQuantity.Value, TonnesPerCubicMillimeterTolerance);
            Assert.Equal(DensityUnit.TonnePerCubicMillimeter, tonnepercubicmillimeterQuantity.Unit);
        }