diff --git a/SharpProp.Tests/Enums/TestFluidsList.cs b/SharpProp.Tests/Enums/TestFluidsList.cs index 842ccba..45a1589 100644 --- a/SharpProp.Tests/Enums/TestFluidsList.cs +++ b/SharpProp.Tests/Enums/TestFluidsList.cs @@ -9,18 +9,22 @@ public static class TestFluidsList [Test] public static void TestCoolPropName([Values] FluidsList coolPropFluid) { - switch (coolPropFluid) - { - case FluidsList.Butene: - Assert.AreEqual("1-Butene", coolPropFluid.CoolPropName()); - break; - case FluidsList.WaterIncomp: - Assert.AreEqual("Water", coolPropFluid.CoolPropName()); - break; - default: - Assert.AreEqual(coolPropFluid.CoolPropName().RemoveChars('-', '(', ')'), coolPropFluid.ToString()); - break; - } + if (coolPropFluid.CoolPropName().EndsWith(".mix")) + Assert.Pass(); + else + switch (coolPropFluid) + { + case FluidsList.Butene: + Assert.AreEqual("1-Butene", coolPropFluid.CoolPropName()); + break; + case FluidsList.WaterIncomp: + Assert.AreEqual("Water", coolPropFluid.CoolPropName()); + break; + default: + Assert.AreEqual(coolPropFluid.CoolPropName().RemoveChars('-', '(', ')'), + coolPropFluid.ToString()); + break; + } } private static string RemoveChars(this string s, params char[] charsToRemove) => diff --git a/SharpProp.Tests/Fluids/TestFluid.cs b/SharpProp.Tests/Fluids/TestFluid.cs index 67e0fa4..01b60ac 100644 --- a/SharpProp.Tests/Fluids/TestFluid.cs +++ b/SharpProp.Tests/Fluids/TestFluid.cs @@ -68,6 +68,7 @@ public void TestWithState() public void TestUpdate([Values] FluidsList name, [Values(1e7, 1e8)] double pressure) { if (name is FluidsList.AL or FluidsList.AN) Assert.Pass(); // Cause CoolProp error + if (name.CoolPropName().EndsWith(".mix")) Assert.Pass(); SetUp(name, pressure); var actual = new List { diff --git a/SharpProp.sln.DotSettings b/SharpProp.sln.DotSettings index cdf648b..42a9338 100644 --- a/SharpProp.sln.DotSettings +++ b/SharpProp.sln.DotSettings @@ -5,6 +5,7 @@ True True True + True True True True diff --git a/SharpProp/Enums/FluidsList.cs b/SharpProp/Enums/FluidsList.cs index 5a48983..4674511 100644 --- a/SharpProp/Enums/FluidsList.cs +++ b/SharpProp/Enums/FluidsList.cs @@ -248,6 +248,113 @@ public enum FluidsList [FluidInfo("ZFC", "INCOMP", false, Mix.Volume, 0.3, 0.6)] ZFC, [FluidInfo("ZLC", "INCOMP", false, Mix.Volume, 0.3, 0.7)] ZLC, [FluidInfo("ZM", "INCOMP", false, Mix.Volume)] ZM, - [FluidInfo("ZMC", "INCOMP", false, Mix.Volume, 0.3, 0.7)] ZMC + [FluidInfo("ZMC", "INCOMP", false, Mix.Volume, 0.3, 0.7)] ZMC, + + // Predefined mixtures + [FluidInfo("Air.mix")] AirMix, + [FluidInfo("Amarillo.mix")] Amarillo, + [FluidInfo("Ekofisk.mix")] Ekofisk, + [FluidInfo("GulfCoast.mix")] GulfCoast, + [FluidInfo("GulfCoastGas(NIST1).mix")] GulfCoastGasNIST, + [FluidInfo("HighCO2.mix")] HighCO2, + [FluidInfo("HighN2.mix")] HighN2, + [FluidInfo("NaturalGasSample.mix")] NaturalGasSample, + [FluidInfo("R401A.mix")] R401A, + [FluidInfo("R401B.mix")] R401B, + [FluidInfo("R401C.mix")] R401C, + [FluidInfo("R402A.mix")] R402A, + [FluidInfo("R402B.mix")] R402B, + [FluidInfo("R403A.mix")] R403A, + [FluidInfo("R403B.mix")] R403B, + [FluidInfo("R404A.mix")] R404AMix, + [FluidInfo("R405A.mix")] R405A, + [FluidInfo("R406A.mix")] R406A, + [FluidInfo("R407A.mix")] R407A, + [FluidInfo("R407B.mix")] R407B, + [FluidInfo("R407C.mix")] R407CMix, + [FluidInfo("R407D.mix")] R407D, + [FluidInfo("R407E.mix")] R407E, + [FluidInfo("R407F.mix")] R407F, + [FluidInfo("R408A.mix")] R408A, + [FluidInfo("R409A.mix")] R409A, + [FluidInfo("R409B.mix")] R409B, + [FluidInfo("R410A.mix")] R410AMix, + [FluidInfo("R410B.mix")] R410B, + [FluidInfo("R411A.mix")] R411A, + [FluidInfo("R411B.mix")] R411B, + [FluidInfo("R412A.mix")] R412A, + [FluidInfo("R413A.mix")] R413A, + [FluidInfo("R414A.mix")] R414A, + [FluidInfo("R414B.mix")] R414B, + [FluidInfo("R415A.mix")] R415A, + [FluidInfo("R415B.mix")] R415B, + [FluidInfo("R416A.mix")] R416A, + [FluidInfo("R417A.mix")] R417A, + [FluidInfo("R417B.mix")] R417B, + [FluidInfo("R417C.mix")] R417C, + [FluidInfo("R418A.mix")] R418A, + [FluidInfo("R419A.mix")] R419A, + [FluidInfo("R419B.mix")] R419B, + [FluidInfo("R420A.mix")] R420A, + [FluidInfo("R421A.mix")] R421A, + [FluidInfo("R421B.mix")] R421B, + [FluidInfo("R422A.mix")] R422A, + [FluidInfo("R422B.mix")] R422B, + [FluidInfo("R422C.mix")] R422C, + [FluidInfo("R422D.mix")] R422D, + [FluidInfo("R422E.mix")] R422E, + [FluidInfo("R423A.mix")] R423A, + [FluidInfo("R424A.mix")] R424A, + [FluidInfo("R425A.mix")] R425A, + [FluidInfo("R426A.mix")] R426A, + [FluidInfo("R427A.mix")] R427A, + [FluidInfo("R428A.mix")] R428A, + [FluidInfo("R429A.mix")] R429A, + [FluidInfo("R430A.mix")] R430A, + [FluidInfo("R431A.mix")] R431A, + [FluidInfo("R432A.mix")] R432A, + [FluidInfo("R433A.mix")] R433A, + [FluidInfo("R433B.mix")] R433B, + [FluidInfo("R433C.mix")] R433C, + [FluidInfo("R434A.mix")] R434A, + [FluidInfo("R435A.mix")] R435A, + [FluidInfo("R436A.mix")] R436A, + [FluidInfo("R436B.mix")] R436B, + [FluidInfo("R437A.mix")] R437A, + [FluidInfo("R438A.mix")] R438A, + [FluidInfo("R439A.mix")] R439A, + [FluidInfo("R440A.mix")] R440A, + [FluidInfo("R441A.mix")] R441A, + [FluidInfo("R442A.mix")] R442A, + [FluidInfo("R443A.mix")] R443A, + [FluidInfo("R444A.mix")] R444A, + [FluidInfo("R444B.mix")] R444B, + [FluidInfo("R445A.mix")] R445A, + [FluidInfo("R446A.mix")] R446A, + [FluidInfo("R447A.mix")] R447A, + [FluidInfo("R448A.mix")] R448A, + [FluidInfo("R449A.mix")] R449A, + [FluidInfo("R449B.mix")] R449B, + [FluidInfo("R450A.mix")] R450A, + [FluidInfo("R451A.mix")] R451A, + [FluidInfo("R451B.mix")] R451B, + [FluidInfo("R452A.mix")] R452A, + [FluidInfo("R453A.mix")] R453A, + [FluidInfo("R454A.mix")] R454A, + [FluidInfo("R454B.mix")] R454B, + [FluidInfo("R500.mix")] R500, + [FluidInfo("R501.mix")] R501, + [FluidInfo("R502.mix")] R502, + [FluidInfo("R503.mix")] R503, + [FluidInfo("R504.mix")] R504, + [FluidInfo("R507A.mix")] R507AMix, + [FluidInfo("R508A.mix")] R508A, + [FluidInfo("R508B.mix")] R508B, + [FluidInfo("R509A.mix")] R509A, + [FluidInfo("R510A.mix")] R510A, + [FluidInfo("R511A.mix")] R511A, + [FluidInfo("R512A.mix")] R512A, + [FluidInfo("R513A.mix")] R513A, + [FluidInfo("TypicalNaturalGas.mix")] TypicalNaturalGas } } \ No newline at end of file diff --git a/SharpProp/SharpProp.csproj b/SharpProp/SharpProp.csproj index 462a10f..b586bec 100644 --- a/SharpProp/SharpProp.csproj +++ b/SharpProp/SharpProp.csproj @@ -15,7 +15,7 @@ README.md icon.png $(MSBuildThisFileDirectory)pictures\icon.png - 1.0.6 + 1.1.0