From a7b1477abdea9c6cf3aa6d29eaf92c594c1f0f26 Mon Sep 17 00:00:00 2001 From: Vladimir Portyanikhin <86243191+portyanikhin@users.noreply.github.com> Date: Wed, 11 Oct 2023 14:53:06 +0300 Subject: [PATCH] Updated formatting --- src/SharpProp/CoolProp/AbstractState.cs | 2 +- .../CoolProp/AbstractStatePInvoke.cs | 2 +- src/SharpProp/CoolProp/CoolProp.cs | 2 +- src/SharpProp/CoolProp/CoolPropPInvoke.cs | 2 +- src/SharpProp/CoolProp/DoubleVector.cs | 2 +- src/SharpProp/CoolProp/DoubleVectorPInvoke.cs | 2 +- src/SharpProp/CoolProp/Library.cs | 2 +- src/SharpProp/CoolProp/SwigExceptions.cs | 11 +- src/SharpProp/Enums/FluidInfoAttribute.cs | 2 +- src/SharpProp/Enums/FluidsList.cs | 932 ++++++++++++------ src/SharpProp/Enums/InputPairs.cs | 2 +- src/SharpProp/Enums/Mix.cs | 2 +- src/SharpProp/Enums/Parameters.cs | 2 +- src/SharpProp/Enums/Phases.cs | 2 +- src/SharpProp/Extensions/JsonExtensions.cs | 2 +- src/SharpProp/Fluids/AbstractFluid.cs | 12 +- src/SharpProp/Fluids/Fluid.cs | 30 +- src/SharpProp/Fluids/FluidProcesses.cs | 28 +- src/SharpProp/Fluids/FluidState.cs | 2 +- src/SharpProp/Fluids/IAbstractFluid.cs | 2 +- src/SharpProp/Fluids/IFluidState.cs | 2 +- src/SharpProp/Fluids/Mixture.cs | 24 +- src/SharpProp/HumidAir/HumidAir.cs | 10 +- src/SharpProp/HumidAir/HumidAirProcesses.cs | 40 +- src/SharpProp/HumidAir/HumidAirState.cs | 2 +- src/SharpProp/HumidAir/IHumidAirState.cs | 2 +- src/SharpProp/IJsonable.cs | 2 +- src/SharpProp/IO/IKeyedInput.cs | 2 +- src/SharpProp/IO/InputHumidAir.cs | 4 +- src/SharpProp/IO/OutputsValidator.cs | 2 +- src/SharpProp/IO/UpdatePair.cs | 2 +- .../SharpProp.Tests/Enums/FluidsListTests.cs | 2 +- tests/SharpProp.Tests/Fluids/FluidExtended.cs | 18 +- .../Fluids/FluidExtendedTests.cs | 2 +- .../Fluids/FluidProcessesTests.cs | 36 +- tests/SharpProp.Tests/Fluids/FluidTests.cs | 66 +- .../SharpProp.Tests/Fluids/IFluidExtended.cs | 2 +- .../Fluids/MixtureProcessesTests.cs | 6 +- tests/SharpProp.Tests/Fluids/MixtureTests.cs | 12 +- tests/SharpProp.Tests/GlobalUsings.cs | 2 +- .../HumidAir/HumidAirExtended.cs | 20 +- .../HumidAir/HumidAirExtendedTests.cs | 2 +- .../HumidAir/HumidAirProcessesTests.cs | 19 +- .../SharpProp.Tests/HumidAir/HumidAirTests.cs | 38 +- .../HumidAir/IHumidAirExtended.cs | 2 +- tests/SharpProp.Tests/IO/InputExtended.cs | 6 +- .../SharpProp.Tests/IO/InputExtendedTests.cs | 2 +- .../IO/InputHumidAirExtended.cs | 6 +- .../IO/InputHumidAirExtendedTests.cs | 2 +- .../SharpProp.Tests/IO/InputHumidAirTests.cs | 4 +- tests/SharpProp.Tests/IO/InputTests.cs | 2 +- 51 files changed, 844 insertions(+), 540 deletions(-) diff --git a/src/SharpProp/CoolProp/AbstractState.cs b/src/SharpProp/CoolProp/AbstractState.cs index f333cd0..3d6aa4d 100644 --- a/src/SharpProp/CoolProp/AbstractState.cs +++ b/src/SharpProp/CoolProp/AbstractState.cs @@ -117,4 +117,4 @@ public double KeyedOutput(Parameters key) SwigExceptions.ThrowPendingException(); return result; } -} \ No newline at end of file +} diff --git a/src/SharpProp/CoolProp/AbstractStatePInvoke.cs b/src/SharpProp/CoolProp/AbstractStatePInvoke.cs index ce447b1..a67099a 100644 --- a/src/SharpProp/CoolProp/AbstractStatePInvoke.cs +++ b/src/SharpProp/CoolProp/AbstractStatePInvoke.cs @@ -56,4 +56,4 @@ double secondInput [DllImport(Library.Name, EntryPoint = "CSharp_AbstractState_keyed_output")] public static extern double KeyedOutput(HandleRef abstractState, int key); -} \ No newline at end of file +} diff --git a/src/SharpProp/CoolProp/CoolProp.cs b/src/SharpProp/CoolProp/CoolProp.cs index e9f9f4d..4716afc 100644 --- a/src/SharpProp/CoolProp/CoolProp.cs +++ b/src/SharpProp/CoolProp/CoolProp.cs @@ -54,4 +54,4 @@ double thirdInputValue return result; } } -} \ No newline at end of file +} diff --git a/src/SharpProp/CoolProp/CoolPropPInvoke.cs b/src/SharpProp/CoolProp/CoolPropPInvoke.cs index 09cdaf7..384b9d1 100644 --- a/src/SharpProp/CoolProp/CoolPropPInvoke.cs +++ b/src/SharpProp/CoolProp/CoolPropPInvoke.cs @@ -23,4 +23,4 @@ public static extern double HAPropsSI( string thirdInputKey, double thirdInputValue ); -} \ No newline at end of file +} diff --git a/src/SharpProp/CoolProp/DoubleVector.cs b/src/SharpProp/CoolProp/DoubleVector.cs index dee5bb8..01233d8 100644 --- a/src/SharpProp/CoolProp/DoubleVector.cs +++ b/src/SharpProp/CoolProp/DoubleVector.cs @@ -205,4 +205,4 @@ public void Dispose() _currentObject = null; } } -} \ No newline at end of file +} diff --git a/src/SharpProp/CoolProp/DoubleVectorPInvoke.cs b/src/SharpProp/CoolProp/DoubleVectorPInvoke.cs index 6dd4358..5de9b6c 100644 --- a/src/SharpProp/CoolProp/DoubleVectorPInvoke.cs +++ b/src/SharpProp/CoolProp/DoubleVectorPInvoke.cs @@ -46,4 +46,4 @@ double item [DllImport(Library.Name, EntryPoint = "CSharp_delete_DoubleVector")] public static extern void Delete(HandleRef doubleVector); -} \ No newline at end of file +} diff --git a/src/SharpProp/CoolProp/Library.cs b/src/SharpProp/CoolProp/Library.cs index 66991d8..6fab9cf 100644 --- a/src/SharpProp/CoolProp/Library.cs +++ b/src/SharpProp/CoolProp/Library.cs @@ -4,4 +4,4 @@ internal static class Library { public const string Name = "libCoolProp"; -} \ No newline at end of file +} diff --git a/src/SharpProp/CoolProp/SwigExceptions.cs b/src/SharpProp/CoolProp/SwigExceptions.cs index 302dd55..f732152 100644 --- a/src/SharpProp/CoolProp/SwigExceptions.cs +++ b/src/SharpProp/CoolProp/SwigExceptions.cs @@ -3,7 +3,8 @@ [ExcludeFromCodeCoverage] internal static class SwigExceptions { - [ThreadStatic] private static Exception? _pendingException; + [ThreadStatic] + private static Exception? _pendingException; private static int _pendingExceptionsCount; private static readonly object ExceptionsLock = new(); @@ -83,9 +84,9 @@ private static void Set(Exception? exception) if (_pendingException is not null) throw new ApplicationException( "FATAL: An earlier pending exception from " - + "unmanaged code was missed and thus not thrown (" - + _pendingException - + ")", + + "unmanaged code was missed and thus not thrown (" + + _pendingException + + ")", exception ); _pendingException = exception; @@ -203,4 +204,4 @@ string argumentName ); private delegate void ExceptionDelegate(string message); -} \ No newline at end of file +} diff --git a/src/SharpProp/Enums/FluidInfoAttribute.cs b/src/SharpProp/Enums/FluidInfoAttribute.cs index 2d90071..214ffb5 100644 --- a/src/SharpProp/Enums/FluidInfoAttribute.cs +++ b/src/SharpProp/Enums/FluidInfoAttribute.cs @@ -61,4 +61,4 @@ public FluidInfoAttribute( /// Maximum possible fraction. /// public double FractionMax { get; } -} \ No newline at end of file +} diff --git a/src/SharpProp/Enums/FluidsList.cs b/src/SharpProp/Enums/FluidsList.cs index 3314487..5af3ed9 100644 --- a/src/SharpProp/Enums/FluidsList.cs +++ b/src/SharpProp/Enums/FluidsList.cs @@ -12,416 +12,621 @@ namespace SharpProp; public enum FluidsList { // Pure and pseudo-pure fluids - [FluidInfo("Acetone")] Acetone, + [FluidInfo("Acetone")] + Acetone, - [FluidInfo("Air")] Air, + [FluidInfo("Air")] + Air, - [FluidInfo("Air")] R729, + [FluidInfo("Air")] + R729, - [FluidInfo("Ammonia")] Ammonia, + [FluidInfo("Ammonia")] + Ammonia, - [FluidInfo("Ammonia")] R717, + [FluidInfo("Ammonia")] + R717, - [FluidInfo("Argon")] Argon, + [FluidInfo("Argon")] + Argon, - [FluidInfo("Argon")] R740, + [FluidInfo("Argon")] + R740, - [FluidInfo("Benzene")] Benzene, + [FluidInfo("Benzene")] + Benzene, - [FluidInfo("1-Butene")] Butene, + [FluidInfo("1-Butene")] + Butene, - [FluidInfo("CarbonDioxide")] CarbonDioxide, + [FluidInfo("CarbonDioxide")] + CarbonDioxide, - [FluidInfo("CarbonDioxide")] R744, + [FluidInfo("CarbonDioxide")] + R744, - [FluidInfo("CarbonMonoxide")] CarbonMonoxide, + [FluidInfo("CarbonMonoxide")] + CarbonMonoxide, - [FluidInfo("CarbonylSulfide")] CarbonylSulfide, + [FluidInfo("CarbonylSulfide")] + CarbonylSulfide, - [FluidInfo("cis-2-Butene")] cis2Butene, + [FluidInfo("cis-2-Butene")] + cis2Butene, - [FluidInfo("CycloHexane")] CycloHexane, + [FluidInfo("CycloHexane")] + CycloHexane, - [FluidInfo("CycloPentane")] CycloPentane, + [FluidInfo("CycloPentane")] + CycloPentane, - [FluidInfo("CycloPropane")] CycloPropane, + [FluidInfo("CycloPropane")] + CycloPropane, - [FluidInfo("D4")] D4, + [FluidInfo("D4")] + D4, - [FluidInfo("D5")] D5, + [FluidInfo("D5")] + D5, - [FluidInfo("D6")] D6, + [FluidInfo("D6")] + D6, - [FluidInfo("Deuterium")] Deuterium, + [FluidInfo("Deuterium")] + Deuterium, - [FluidInfo("Dichloroethane")] Dichloroethane, + [FluidInfo("Dichloroethane")] + Dichloroethane, - [FluidInfo("DiethylEther")] DiethylEther, + [FluidInfo("DiethylEther")] + DiethylEther, - [FluidInfo("DimethylCarbonate")] DimethylCarbonate, + [FluidInfo("DimethylCarbonate")] + DimethylCarbonate, - [FluidInfo("DimethylEther")] DimethylEther, + [FluidInfo("DimethylEther")] + DimethylEther, - [FluidInfo("Ethane")] Ethane, + [FluidInfo("Ethane")] + Ethane, - [FluidInfo("Ethane")] R170, + [FluidInfo("Ethane")] + R170, - [FluidInfo("Ethanol")] Ethanol, + [FluidInfo("Ethanol")] + Ethanol, - [FluidInfo("EthylBenzene")] EthylBenzene, + [FluidInfo("EthylBenzene")] + EthylBenzene, - [FluidInfo("Ethylene")] Ethylene, + [FluidInfo("Ethylene")] + Ethylene, - [FluidInfo("Ethylene")] R1150, + [FluidInfo("Ethylene")] + R1150, - [FluidInfo("EthyleneOxide")] EthyleneOxide, + [FluidInfo("EthyleneOxide")] + EthyleneOxide, - [FluidInfo("Fluorine")] Fluorine, + [FluidInfo("Fluorine")] + Fluorine, - [FluidInfo("HeavyWater")] HeavyWater, + [FluidInfo("HeavyWater")] + HeavyWater, - [FluidInfo("Helium")] Helium, + [FluidInfo("Helium")] + Helium, - [FluidInfo("Helium")] R704, + [FluidInfo("Helium")] + R704, - [FluidInfo("HFE143m")] HFE143m, + [FluidInfo("HFE143m")] + HFE143m, - [FluidInfo("HFE143m")] RE143a, + [FluidInfo("HFE143m")] + RE143a, - [FluidInfo("Hydrogen")] Hydrogen, + [FluidInfo("Hydrogen")] + Hydrogen, - [FluidInfo("Hydrogen")] R702, + [FluidInfo("Hydrogen")] + R702, - [FluidInfo("HydrogenChloride")] HydrogenChloride, + [FluidInfo("HydrogenChloride")] + HydrogenChloride, - [FluidInfo("HydrogenSulfide")] HydrogenSulfide, + [FluidInfo("HydrogenSulfide")] + HydrogenSulfide, - [FluidInfo("IsoButane")] IsoButane, + [FluidInfo("IsoButane")] + IsoButane, - [FluidInfo("IsoButane")] R600a, + [FluidInfo("IsoButane")] + R600a, - [FluidInfo("IsoButene")] IsoButene, + [FluidInfo("IsoButene")] + IsoButene, - [FluidInfo("Isohexane")] Isohexane, + [FluidInfo("Isohexane")] + Isohexane, - [FluidInfo("Isopentane")] Isopentane, + [FluidInfo("Isopentane")] + Isopentane, - [FluidInfo("Isopentane")] R601a, + [FluidInfo("Isopentane")] + R601a, - [FluidInfo("Krypton")] Krypton, + [FluidInfo("Krypton")] + Krypton, - [FluidInfo("MD2M")] MD2M, + [FluidInfo("MD2M")] + MD2M, - [FluidInfo("MD3M")] MD3M, + [FluidInfo("MD3M")] + MD3M, - [FluidInfo("MD4M")] MD4M, + [FluidInfo("MD4M")] + MD4M, - [FluidInfo("MDM")] MDM, + [FluidInfo("MDM")] + MDM, - [FluidInfo("Methane")] Methane, + [FluidInfo("Methane")] + Methane, - [FluidInfo("Methane")] R50, + [FluidInfo("Methane")] + R50, - [FluidInfo("Methanol")] Methanol, + [FluidInfo("Methanol")] + Methanol, - [FluidInfo("MethylLinoleate")] MethylLinoleate, + [FluidInfo("MethylLinoleate")] + MethylLinoleate, - [FluidInfo("MethylLinolenate")] MethylLinolenate, + [FluidInfo("MethylLinolenate")] + MethylLinolenate, - [FluidInfo("MethylOleate")] MethylOleate, + [FluidInfo("MethylOleate")] + MethylOleate, - [FluidInfo("MethylPalmitate")] MethylPalmitate, + [FluidInfo("MethylPalmitate")] + MethylPalmitate, - [FluidInfo("MethylStearate")] MethylStearate, + [FluidInfo("MethylStearate")] + MethylStearate, - [FluidInfo("MM")] MM, + [FluidInfo("MM")] + MM, - [FluidInfo("m-Xylene")] mXylene, + [FluidInfo("m-Xylene")] + mXylene, - [FluidInfo("n-Butane")] nButane, + [FluidInfo("n-Butane")] + nButane, - [FluidInfo("n-Butane")] R600, + [FluidInfo("n-Butane")] + R600, - [FluidInfo("n-Decane")] nDecane, + [FluidInfo("n-Decane")] + nDecane, - [FluidInfo("n-Dodecane")] nDodecane, + [FluidInfo("n-Dodecane")] + nDodecane, - [FluidInfo("Neon")] Neon, + [FluidInfo("Neon")] + Neon, - [FluidInfo("Neon")] R720, + [FluidInfo("Neon")] + R720, - [FluidInfo("Neopentane")] Neopentane, + [FluidInfo("Neopentane")] + Neopentane, - [FluidInfo("n-Heptane")] nHeptane, + [FluidInfo("n-Heptane")] + nHeptane, - [FluidInfo("n-Hexane")] nHexane, + [FluidInfo("n-Hexane")] + nHexane, - [FluidInfo("Nitrogen")] Nitrogen, + [FluidInfo("Nitrogen")] + Nitrogen, - [FluidInfo("Nitrogen")] R728, + [FluidInfo("Nitrogen")] + R728, - [FluidInfo("NitrousOxide")] NitrousOxide, + [FluidInfo("NitrousOxide")] + NitrousOxide, - [FluidInfo("n-Nonane")] nNonane, + [FluidInfo("n-Nonane")] + nNonane, - [FluidInfo("n-Octane")] nOctane, + [FluidInfo("n-Octane")] + nOctane, - [FluidInfo("Novec649")] Novec649, + [FluidInfo("Novec649")] + Novec649, - [FluidInfo("n-Pentane")] nPentane, + [FluidInfo("n-Pentane")] + nPentane, - [FluidInfo("n-Pentane")] R601, + [FluidInfo("n-Pentane")] + R601, - [FluidInfo("n-Propane")] nPropane, + [FluidInfo("n-Propane")] + nPropane, - [FluidInfo("n-Propane")] R290, + [FluidInfo("n-Propane")] + R290, - [FluidInfo("n-Undecane")] nUndecane, + [FluidInfo("n-Undecane")] + nUndecane, - [FluidInfo("OrthoDeuterium")] OrthoDeuterium, + [FluidInfo("OrthoDeuterium")] + OrthoDeuterium, - [FluidInfo("OrthoHydrogen")] OrthoHydrogen, + [FluidInfo("OrthoHydrogen")] + OrthoHydrogen, - [FluidInfo("Oxygen")] Oxygen, + [FluidInfo("Oxygen")] + Oxygen, - [FluidInfo("Oxygen")] R732, + [FluidInfo("Oxygen")] + R732, - [FluidInfo("o-Xylene")] oXylene, + [FluidInfo("o-Xylene")] + oXylene, - [FluidInfo("ParaDeuterium")] ParaDeuterium, + [FluidInfo("ParaDeuterium")] + ParaDeuterium, - [FluidInfo("ParaHydrogen")] ParaHydrogen, + [FluidInfo("ParaHydrogen")] + ParaHydrogen, - [FluidInfo("Propylene")] Propylene, + [FluidInfo("Propylene")] + Propylene, - [FluidInfo("Propylene")] R1270, + [FluidInfo("Propylene")] + R1270, - [FluidInfo("Propyne")] Propyne, + [FluidInfo("Propyne")] + Propyne, - [FluidInfo("p-Xylene")] pXylene, + [FluidInfo("p-Xylene")] + pXylene, - [FluidInfo("R11")] R11, + [FluidInfo("R11")] + R11, - [FluidInfo("R113")] R113, + [FluidInfo("R113")] + R113, - [FluidInfo("R114")] R114, + [FluidInfo("R114")] + R114, - [FluidInfo("R115")] R115, + [FluidInfo("R115")] + R115, - [FluidInfo("R116")] R116, + [FluidInfo("R116")] + R116, - [FluidInfo("R12")] R12, + [FluidInfo("R12")] + R12, - [FluidInfo("R123")] R123, + [FluidInfo("R123")] + R123, - [FluidInfo("R1233zd(E)")] R1233zdE, + [FluidInfo("R1233zd(E)")] + R1233zdE, - [FluidInfo("R1234yf")] R1234yf, + [FluidInfo("R1234yf")] + R1234yf, - [FluidInfo("R1234ze(E)")] R1234zeE, + [FluidInfo("R1234ze(E)")] + R1234zeE, - [FluidInfo("R1234ze(Z)")] R1234zeZ, + [FluidInfo("R1234ze(Z)")] + R1234zeZ, - [FluidInfo("R124")] R124, + [FluidInfo("R124")] + R124, - [FluidInfo("R1243zf")] R1243zf, + [FluidInfo("R1243zf")] + R1243zf, - [FluidInfo("R125")] R125, + [FluidInfo("R125")] + R125, - [FluidInfo("R13")] R13, + [FluidInfo("R13")] + R13, - [FluidInfo("R134a")] R134a, + [FluidInfo("R134a")] + R134a, - [FluidInfo("R13I1")] R13I1, + [FluidInfo("R13I1")] + R13I1, - [FluidInfo("R14")] R14, + [FluidInfo("R14")] + R14, - [FluidInfo("R141b")] R141b, + [FluidInfo("R141b")] + R141b, - [FluidInfo("R142b")] R142b, + [FluidInfo("R142b")] + R142b, - [FluidInfo("R143a")] R143a, + [FluidInfo("R143a")] + R143a, - [FluidInfo("R152A")] R152a, + [FluidInfo("R152A")] + R152a, - [FluidInfo("R161")] R161, + [FluidInfo("R161")] + R161, - [FluidInfo("R21")] R21, + [FluidInfo("R21")] + R21, - [FluidInfo("R218")] R218, + [FluidInfo("R218")] + R218, - [FluidInfo("R22")] R22, + [FluidInfo("R22")] + R22, - [FluidInfo("R227ea")] R227ea, + [FluidInfo("R227ea")] + R227ea, - [FluidInfo("R23")] R23, + [FluidInfo("R23")] + R23, - [FluidInfo("R236ea")] R236ea, + [FluidInfo("R236ea")] + R236ea, - [FluidInfo("R236fa")] R236fa, + [FluidInfo("R236fa")] + R236fa, - [FluidInfo("R245ca")] R245ca, + [FluidInfo("R245ca")] + R245ca, - [FluidInfo("R245fa")] R245fa, + [FluidInfo("R245fa")] + R245fa, - [FluidInfo("R32")] R32, + [FluidInfo("R32")] + R32, - [FluidInfo("R365mfc")] R365mfc, + [FluidInfo("R365mfc")] + R365mfc, - [FluidInfo("R40")] R40, + [FluidInfo("R40")] + R40, - [FluidInfo("R404A")] R404A, + [FluidInfo("R404A")] + R404A, - [FluidInfo("R407C")] R407C, + [FluidInfo("R407C")] + R407C, - [FluidInfo("R41")] R41, + [FluidInfo("R41")] + R41, - [FluidInfo("R410A")] R410A, + [FluidInfo("R410A")] + R410A, - [FluidInfo("R507A")] R507A, + [FluidInfo("R507A")] + R507A, - [FluidInfo("RC318")] RC318, + [FluidInfo("RC318")] + RC318, - [FluidInfo("SES36")] SES36, + [FluidInfo("SES36")] + SES36, - [FluidInfo("SulfurDioxide")] SulfurDioxide, + [FluidInfo("SulfurDioxide")] + SulfurDioxide, - [FluidInfo("SulfurDioxide")] R764, + [FluidInfo("SulfurDioxide")] + R764, - [FluidInfo("SulfurHexafluoride")] SulfurHexafluoride, + [FluidInfo("SulfurHexafluoride")] + SulfurHexafluoride, - [FluidInfo("SulfurHexafluoride")] R846, + [FluidInfo("SulfurHexafluoride")] + R846, - [FluidInfo("Toluene")] Toluene, + [FluidInfo("Toluene")] + Toluene, - [FluidInfo("trans-2-Butene")] trans2Butene, + [FluidInfo("trans-2-Butene")] + trans2Butene, - [FluidInfo("Water")] Water, + [FluidInfo("Water")] + Water, - [FluidInfo("Water")] R718, + [FluidInfo("Water")] + R718, - [FluidInfo("Xenon")] Xenon, + [FluidInfo("Xenon")] + Xenon, // Incompressible pure fluids - [FluidInfo("AS10", "INCOMP")] AS10, + [FluidInfo("AS10", "INCOMP")] + AS10, - [FluidInfo("AS20", "INCOMP")] AS20, + [FluidInfo("AS20", "INCOMP")] + AS20, - [FluidInfo("AS30", "INCOMP")] AS30, + [FluidInfo("AS30", "INCOMP")] + AS30, - [FluidInfo("AS40", "INCOMP")] AS40, + [FluidInfo("AS40", "INCOMP")] + AS40, - [FluidInfo("AS55", "INCOMP")] AS55, + [FluidInfo("AS55", "INCOMP")] + AS55, - [FluidInfo("DEB", "INCOMP")] DEB, + [FluidInfo("DEB", "INCOMP")] + DEB, - [FluidInfo("DowJ", "INCOMP")] DowJ, + [FluidInfo("DowJ", "INCOMP")] + DowJ, - [FluidInfo("DowJ2", "INCOMP")] DowJ2, + [FluidInfo("DowJ2", "INCOMP")] + DowJ2, - [FluidInfo("DowQ", "INCOMP")] DowQ, + [FluidInfo("DowQ", "INCOMP")] + DowQ, - [FluidInfo("DowQ2", "INCOMP")] DowQ2, + [FluidInfo("DowQ2", "INCOMP")] + DowQ2, - [FluidInfo("DSF", "INCOMP")] DSF, + [FluidInfo("DSF", "INCOMP")] + DSF, - [FluidInfo("HC10", "INCOMP")] HC10, + [FluidInfo("HC10", "INCOMP")] + HC10, - [FluidInfo("HC20", "INCOMP")] HC20, + [FluidInfo("HC20", "INCOMP")] + HC20, - [FluidInfo("HC30", "INCOMP")] HC30, + [FluidInfo("HC30", "INCOMP")] + HC30, - [FluidInfo("HC40", "INCOMP")] HC40, + [FluidInfo("HC40", "INCOMP")] + HC40, - [FluidInfo("HC50", "INCOMP")] HC50, + [FluidInfo("HC50", "INCOMP")] + HC50, - [FluidInfo("HCB", "INCOMP")] HCB, + [FluidInfo("HCB", "INCOMP")] + HCB, - [FluidInfo("HCM", "INCOMP")] HCM, + [FluidInfo("HCM", "INCOMP")] + HCM, - [FluidInfo("HFE", "INCOMP")] HFE, + [FluidInfo("HFE", "INCOMP")] + HFE, - [FluidInfo("HFE2", "INCOMP")] HFE2, + [FluidInfo("HFE2", "INCOMP")] + HFE2, - [FluidInfo("HY20", "INCOMP")] HY20, + [FluidInfo("HY20", "INCOMP")] + HY20, - [FluidInfo("HY30", "INCOMP")] HY30, + [FluidInfo("HY30", "INCOMP")] + HY30, - [FluidInfo("HY40", "INCOMP")] HY40, + [FluidInfo("HY40", "INCOMP")] + HY40, - [FluidInfo("HY45", "INCOMP")] HY45, + [FluidInfo("HY45", "INCOMP")] + HY45, - [FluidInfo("HY50", "INCOMP")] HY50, + [FluidInfo("HY50", "INCOMP")] + HY50, - [FluidInfo("NaK", "INCOMP")] NaK, + [FluidInfo("NaK", "INCOMP")] + NaK, - [FluidInfo("NBS", "INCOMP")] NBS, + [FluidInfo("NBS", "INCOMP")] + NBS, - [FluidInfo("PBB", "INCOMP")] PBB, + [FluidInfo("PBB", "INCOMP")] + PBB, - [FluidInfo("PCL", "INCOMP")] PCL, + [FluidInfo("PCL", "INCOMP")] + PCL, - [FluidInfo("PCR", "INCOMP")] PCR, + [FluidInfo("PCR", "INCOMP")] + PCR, - [FluidInfo("PGLT", "INCOMP")] PGLT, + [FluidInfo("PGLT", "INCOMP")] + PGLT, - [FluidInfo("PHE", "INCOMP")] PHE, + [FluidInfo("PHE", "INCOMP")] + PHE, - [FluidInfo("PHR", "INCOMP")] PHR, + [FluidInfo("PHR", "INCOMP")] + PHR, - [FluidInfo("PLR", "INCOMP")] PLR, + [FluidInfo("PLR", "INCOMP")] + PLR, - [FluidInfo("PMR", "INCOMP")] PMR, + [FluidInfo("PMR", "INCOMP")] + PMR, - [FluidInfo("PMS1", "INCOMP")] PMS1, + [FluidInfo("PMS1", "INCOMP")] + PMS1, - [FluidInfo("PMS2", "INCOMP")] PMS2, + [FluidInfo("PMS2", "INCOMP")] + PMS2, - [FluidInfo("PNF", "INCOMP")] PNF, + [FluidInfo("PNF", "INCOMP")] + PNF, - [FluidInfo("PNF2", "INCOMP")] PNF2, + [FluidInfo("PNF2", "INCOMP")] + PNF2, - [FluidInfo("S800", "INCOMP")] S800, + [FluidInfo("S800", "INCOMP")] + S800, - [FluidInfo("SAB", "INCOMP")] SAB, + [FluidInfo("SAB", "INCOMP")] + SAB, - [FluidInfo("T66", "INCOMP")] T66, + [FluidInfo("T66", "INCOMP")] + T66, - [FluidInfo("T72", "INCOMP")] T72, + [FluidInfo("T72", "INCOMP")] + T72, - [FluidInfo("TCO", "INCOMP")] TCO, + [FluidInfo("TCO", "INCOMP")] + TCO, - [FluidInfo("TD12", "INCOMP")] TD12, + [FluidInfo("TD12", "INCOMP")] + TD12, - [FluidInfo("TVP1", "INCOMP")] TVP1, + [FluidInfo("TVP1", "INCOMP")] + TVP1, - [FluidInfo("TVP1869", "INCOMP")] TVP1869, + [FluidInfo("TVP1869", "INCOMP")] + TVP1869, - [FluidInfo("TX22", "INCOMP")] TX22, + [FluidInfo("TX22", "INCOMP")] + TX22, - [FluidInfo("TY10", "INCOMP")] TY10, + [FluidInfo("TY10", "INCOMP")] + TY10, - [FluidInfo("TY15", "INCOMP")] TY15, + [FluidInfo("TY15", "INCOMP")] + TY15, - [FluidInfo("TY20", "INCOMP")] TY20, + [FluidInfo("TY20", "INCOMP")] + TY20, - [FluidInfo("TY24", "INCOMP")] TY24, + [FluidInfo("TY24", "INCOMP")] + TY24, - [FluidInfo("Water", "INCOMP")] WaterIncomp, + [FluidInfo("Water", "INCOMP")] + WaterIncomp, - [FluidInfo("XLT", "INCOMP")] XLT, + [FluidInfo("XLT", "INCOMP")] + XLT, - [FluidInfo("XLT2", "INCOMP")] XLT2, + [FluidInfo("XLT2", "INCOMP")] + XLT2, - [FluidInfo("ZS10", "INCOMP")] ZS10, + [FluidInfo("ZS10", "INCOMP")] + ZS10, - [FluidInfo("ZS25", "INCOMP")] ZS25, + [FluidInfo("ZS25", "INCOMP")] + ZS25, - [FluidInfo("ZS40", "INCOMP")] ZS40, + [FluidInfo("ZS40", "INCOMP")] + ZS40, - [FluidInfo("ZS45", "INCOMP")] ZS45, + [FluidInfo("ZS45", "INCOMP")] + ZS45, - [FluidInfo("ZS55", "INCOMP")] ZS55, + [FluidInfo("ZS55", "INCOMP")] + ZS55, // Incompressible mass-based binary mixtures [FluidInfo("FRE", "INCOMP", false, Mix.Mass, 0.19, 0.5)] @@ -570,213 +775,318 @@ public enum FluidsList ZMC, // Predefined mixtures - [FluidInfo("Air.mix")] AirMix, + [FluidInfo("Air.mix")] + AirMix, - [FluidInfo("Amarillo.mix")] Amarillo, + [FluidInfo("Amarillo.mix")] + Amarillo, - [FluidInfo("Ekofisk.mix")] Ekofisk, + [FluidInfo("Ekofisk.mix")] + Ekofisk, - [FluidInfo("GulfCoast.mix")] GulfCoast, + [FluidInfo("GulfCoast.mix")] + GulfCoast, - [FluidInfo("GulfCoastGas(NIST1).mix")] GulfCoastGasNIST, + [FluidInfo("GulfCoastGas(NIST1).mix")] + GulfCoastGasNIST, - [FluidInfo("HighCO2.mix")] HighCO2, + [FluidInfo("HighCO2.mix")] + HighCO2, - [FluidInfo("HighN2.mix")] HighN2, + [FluidInfo("HighN2.mix")] + HighN2, - [FluidInfo("NaturalGasSample.mix")] NaturalGasSample, + [FluidInfo("NaturalGasSample.mix")] + NaturalGasSample, - [FluidInfo("R401A.mix")] R401A, + [FluidInfo("R401A.mix")] + R401A, - [FluidInfo("R401B.mix")] R401B, + [FluidInfo("R401B.mix")] + R401B, - [FluidInfo("R401C.mix")] R401C, + [FluidInfo("R401C.mix")] + R401C, - [FluidInfo("R402A.mix")] R402A, + [FluidInfo("R402A.mix")] + R402A, - [FluidInfo("R402B.mix")] R402B, + [FluidInfo("R402B.mix")] + R402B, - [FluidInfo("R403A.mix")] R403A, + [FluidInfo("R403A.mix")] + R403A, - [FluidInfo("R403B.mix")] R403B, + [FluidInfo("R403B.mix")] + R403B, - [FluidInfo("R404A.mix")] R404AMix, + [FluidInfo("R404A.mix")] + R404AMix, - [FluidInfo("R405A.mix")] R405A, + [FluidInfo("R405A.mix")] + R405A, - [FluidInfo("R406A.mix")] R406A, + [FluidInfo("R406A.mix")] + R406A, - [FluidInfo("R407A.mix")] R407A, + [FluidInfo("R407A.mix")] + R407A, - [FluidInfo("R407B.mix")] R407B, + [FluidInfo("R407B.mix")] + R407B, - [FluidInfo("R407C.mix")] R407CMix, + [FluidInfo("R407C.mix")] + R407CMix, - [FluidInfo("R407D.mix")] R407D, + [FluidInfo("R407D.mix")] + R407D, - [FluidInfo("R407E.mix")] R407E, + [FluidInfo("R407E.mix")] + R407E, - [FluidInfo("R407F.mix")] R407F, + [FluidInfo("R407F.mix")] + R407F, - [FluidInfo("R408A.mix")] R408A, + [FluidInfo("R408A.mix")] + R408A, - [FluidInfo("R409A.mix")] R409A, + [FluidInfo("R409A.mix")] + R409A, - [FluidInfo("R409B.mix")] R409B, + [FluidInfo("R409B.mix")] + R409B, - [FluidInfo("R410A.mix")] R410AMix, + [FluidInfo("R410A.mix")] + R410AMix, - [FluidInfo("R410B.mix")] R410B, + [FluidInfo("R410B.mix")] + R410B, - [FluidInfo("R411A.mix")] R411A, + [FluidInfo("R411A.mix")] + R411A, - [FluidInfo("R411B.mix")] R411B, + [FluidInfo("R411B.mix")] + R411B, - [FluidInfo("R412A.mix")] R412A, + [FluidInfo("R412A.mix")] + R412A, - [FluidInfo("R413A.mix")] R413A, + [FluidInfo("R413A.mix")] + R413A, - [FluidInfo("R414A.mix")] R414A, + [FluidInfo("R414A.mix")] + R414A, - [FluidInfo("R414B.mix")] R414B, + [FluidInfo("R414B.mix")] + R414B, - [FluidInfo("R415A.mix")] R415A, + [FluidInfo("R415A.mix")] + R415A, - [FluidInfo("R415B.mix")] R415B, + [FluidInfo("R415B.mix")] + R415B, - [FluidInfo("R416A.mix")] R416A, + [FluidInfo("R416A.mix")] + R416A, - [FluidInfo("R417A.mix")] R417A, + [FluidInfo("R417A.mix")] + R417A, - [FluidInfo("R417B.mix")] R417B, + [FluidInfo("R417B.mix")] + R417B, - [FluidInfo("R417C.mix")] R417C, + [FluidInfo("R417C.mix")] + R417C, - [FluidInfo("R418A.mix")] R418A, + [FluidInfo("R418A.mix")] + R418A, - [FluidInfo("R419A.mix")] R419A, + [FluidInfo("R419A.mix")] + R419A, - [FluidInfo("R419B.mix")] R419B, + [FluidInfo("R419B.mix")] + R419B, - [FluidInfo("R420A.mix")] R420A, + [FluidInfo("R420A.mix")] + R420A, - [FluidInfo("R421A.mix")] R421A, + [FluidInfo("R421A.mix")] + R421A, - [FluidInfo("R421B.mix")] R421B, + [FluidInfo("R421B.mix")] + R421B, - [FluidInfo("R422A.mix")] R422A, + [FluidInfo("R422A.mix")] + R422A, - [FluidInfo("R422B.mix")] R422B, + [FluidInfo("R422B.mix")] + R422B, - [FluidInfo("R422C.mix")] R422C, + [FluidInfo("R422C.mix")] + R422C, - [FluidInfo("R422D.mix")] R422D, + [FluidInfo("R422D.mix")] + R422D, - [FluidInfo("R422E.mix")] R422E, + [FluidInfo("R422E.mix")] + R422E, - [FluidInfo("R423A.mix")] R423A, + [FluidInfo("R423A.mix")] + R423A, - [FluidInfo("R424A.mix")] R424A, + [FluidInfo("R424A.mix")] + R424A, - [FluidInfo("R425A.mix")] R425A, + [FluidInfo("R425A.mix")] + R425A, - [FluidInfo("R426A.mix")] R426A, + [FluidInfo("R426A.mix")] + R426A, - [FluidInfo("R427A.mix")] R427A, + [FluidInfo("R427A.mix")] + R427A, - [FluidInfo("R428A.mix")] R428A, + [FluidInfo("R428A.mix")] + R428A, - [FluidInfo("R429A.mix")] R429A, + [FluidInfo("R429A.mix")] + R429A, - [FluidInfo("R430A.mix")] R430A, + [FluidInfo("R430A.mix")] + R430A, - [FluidInfo("R431A.mix")] R431A, + [FluidInfo("R431A.mix")] + R431A, - [FluidInfo("R432A.mix")] R432A, + [FluidInfo("R432A.mix")] + R432A, - [FluidInfo("R433A.mix")] R433A, + [FluidInfo("R433A.mix")] + R433A, - [FluidInfo("R433B.mix")] R433B, + [FluidInfo("R433B.mix")] + R433B, - [FluidInfo("R433C.mix")] R433C, + [FluidInfo("R433C.mix")] + R433C, - [FluidInfo("R434A.mix")] R434A, + [FluidInfo("R434A.mix")] + R434A, - [FluidInfo("R435A.mix")] R435A, + [FluidInfo("R435A.mix")] + R435A, - [FluidInfo("R436A.mix")] R436A, + [FluidInfo("R436A.mix")] + R436A, - [FluidInfo("R436B.mix")] R436B, + [FluidInfo("R436B.mix")] + R436B, - [FluidInfo("R437A.mix")] R437A, + [FluidInfo("R437A.mix")] + R437A, - [FluidInfo("R438A.mix")] R438A, + [FluidInfo("R438A.mix")] + R438A, - [FluidInfo("R439A.mix")] R439A, + [FluidInfo("R439A.mix")] + R439A, - [FluidInfo("R440A.mix")] R440A, + [FluidInfo("R440A.mix")] + R440A, - [FluidInfo("R441A.mix")] R441A, + [FluidInfo("R441A.mix")] + R441A, - [FluidInfo("R442A.mix")] R442A, + [FluidInfo("R442A.mix")] + R442A, - [FluidInfo("R443A.mix")] R443A, + [FluidInfo("R443A.mix")] + R443A, - [FluidInfo("R444A.mix")] R444A, + [FluidInfo("R444A.mix")] + R444A, - [FluidInfo("R444B.mix")] R444B, + [FluidInfo("R444B.mix")] + R444B, - [FluidInfo("R445A.mix")] R445A, + [FluidInfo("R445A.mix")] + R445A, - [FluidInfo("R446A.mix")] R446A, + [FluidInfo("R446A.mix")] + R446A, - [FluidInfo("R447A.mix")] R447A, + [FluidInfo("R447A.mix")] + R447A, - [FluidInfo("R448A.mix")] R448A, + [FluidInfo("R448A.mix")] + R448A, - [FluidInfo("R449A.mix")] R449A, + [FluidInfo("R449A.mix")] + R449A, - [FluidInfo("R449B.mix")] R449B, + [FluidInfo("R449B.mix")] + R449B, - [FluidInfo("R450A.mix")] R450A, + [FluidInfo("R450A.mix")] + R450A, - [FluidInfo("R451A.mix")] R451A, + [FluidInfo("R451A.mix")] + R451A, - [FluidInfo("R451B.mix")] R451B, + [FluidInfo("R451B.mix")] + R451B, - [FluidInfo("R452A.mix")] R452A, + [FluidInfo("R452A.mix")] + R452A, - [FluidInfo("R453A.mix")] R453A, + [FluidInfo("R453A.mix")] + R453A, - [FluidInfo("R454A.mix")] R454A, + [FluidInfo("R454A.mix")] + R454A, - [FluidInfo("R454B.mix")] R454B, + [FluidInfo("R454B.mix")] + R454B, - [FluidInfo("R500.mix")] R500, + [FluidInfo("R500.mix")] + R500, - [FluidInfo("R501.mix")] R501, + [FluidInfo("R501.mix")] + R501, - [FluidInfo("R502.mix")] R502, + [FluidInfo("R502.mix")] + R502, - [FluidInfo("R503.mix")] R503, + [FluidInfo("R503.mix")] + R503, - [FluidInfo("R504.mix")] R504, + [FluidInfo("R504.mix")] + R504, - [FluidInfo("R507A.mix")] R507AMix, + [FluidInfo("R507A.mix")] + R507AMix, - [FluidInfo("R508A.mix")] R508A, + [FluidInfo("R508A.mix")] + R508A, - [FluidInfo("R508B.mix")] R508B, + [FluidInfo("R508B.mix")] + R508B, - [FluidInfo("R509A.mix")] R509A, + [FluidInfo("R509A.mix")] + R509A, - [FluidInfo("R510A.mix")] R510A, + [FluidInfo("R510A.mix")] + R510A, - [FluidInfo("R511A.mix")] R511A, + [FluidInfo("R511A.mix")] + R511A, - [FluidInfo("R512A.mix")] R512A, + [FluidInfo("R512A.mix")] + R512A, - [FluidInfo("R513A.mix")] R513A, + [FluidInfo("R513A.mix")] + R513A, - [FluidInfo("TypicalNaturalGas.mix")] TypicalNaturalGas -} \ No newline at end of file + [FluidInfo("TypicalNaturalGas.mix")] + TypicalNaturalGas +} diff --git a/src/SharpProp/Enums/InputPairs.cs b/src/SharpProp/Enums/InputPairs.cs index 22a3acf..bdc04ab 100644 --- a/src/SharpProp/Enums/InputPairs.cs +++ b/src/SharpProp/Enums/InputPairs.cs @@ -43,4 +43,4 @@ public enum InputPairs DmolarSmolar_INPUTS, DmassUmass_INPUTS, DmolarUmolar_INPUTS -} \ No newline at end of file +} diff --git a/src/SharpProp/Enums/Mix.cs b/src/SharpProp/Enums/Mix.cs index 6f4d4de..e0fc6d1 100644 --- a/src/SharpProp/Enums/Mix.cs +++ b/src/SharpProp/Enums/Mix.cs @@ -14,4 +14,4 @@ public enum Mix /// Volume-based mixture. /// Volume -} \ No newline at end of file +} diff --git a/src/SharpProp/Enums/Parameters.cs b/src/SharpProp/Enums/Parameters.cs index 8c30ed3..791f2c1 100644 --- a/src/SharpProp/Enums/Parameters.cs +++ b/src/SharpProp/Enums/Parameters.cs @@ -87,4 +87,4 @@ public enum Parameters iODP, iPhase, iundefined_parameter -} \ No newline at end of file +} diff --git a/src/SharpProp/Enums/Phases.cs b/src/SharpProp/Enums/Phases.cs index 6de5613..1afab47 100644 --- a/src/SharpProp/Enums/Phases.cs +++ b/src/SharpProp/Enums/Phases.cs @@ -16,4 +16,4 @@ public enum Phases TwoPhase, Unknown, NotImposed -} \ No newline at end of file +} diff --git a/src/SharpProp/Extensions/JsonExtensions.cs b/src/SharpProp/Extensions/JsonExtensions.cs index 43f68ef..a882555 100644 --- a/src/SharpProp/Extensions/JsonExtensions.cs +++ b/src/SharpProp/Extensions/JsonExtensions.cs @@ -17,4 +17,4 @@ public static string ConvertToJson(this object? instance, bool indented) Settings.Formatting = indented ? Formatting.Indented : Formatting.None; return JsonConvert.SerializeObject(instance, Settings); } -} \ No newline at end of file +} diff --git a/src/SharpProp/Fluids/AbstractFluid.cs b/src/SharpProp/Fluids/AbstractFluid.cs index a579725..e483803 100644 --- a/src/SharpProp/Fluids/AbstractFluid.cs +++ b/src/SharpProp/Fluids/AbstractFluid.cs @@ -57,10 +57,10 @@ public virtual void Reset() [SuppressMessage("ReSharper", "NonReadonlyMemberInGetHashCode")] public override int GetHashCode() => - ( - string.Join("&", Inputs.Select(input => input.Value)), - string.Join("&", Inputs.Select(input => input.CoolPropKey)) - ).GetHashCode(); + ( + string.Join("&", Inputs.Select(input => input.Value)), + string.Join("&", Inputs.Select(input => input.CoolPropKey)) + ).GetHashCode(); protected AbstractFluid WithState( IKeyedInput firstInput, @@ -134,6 +134,6 @@ IKeyedInput secondInput ) => AbstractState.GetInputPair( $"{firstInput.CoolPropHighLevelKey}" - + $"{secondInput.CoolPropHighLevelKey}_INPUTS" + + $"{secondInput.CoolPropHighLevelKey}_INPUTS" ); -} \ No newline at end of file +} diff --git a/src/SharpProp/Fluids/Fluid.cs b/src/SharpProp/Fluids/Fluid.cs index f2dbee8..4a903c2 100644 --- a/src/SharpProp/Fluids/Fluid.cs +++ b/src/SharpProp/Fluids/Fluid.cs @@ -29,15 +29,15 @@ fraction is not null ) throw new ArgumentException( "Invalid fraction value! " - + $"It should be in [{name.FractionMin().Percent};" - + $"{name.FractionMax().Percent}] %. " - + $"Entered value = {fraction.Value.Percent} %." + + $"It should be in [{name.FractionMin().Percent};" + + $"{name.FractionMax().Percent}] %. " + + $"Entered value = {fraction.Value.Percent} %." ); Name = name; Fraction = Name.Pure() ? Ratio.FromPercent(100) : fraction?.ToUnit(RatioUnit.Percent) - ?? throw new ArgumentException("Need to define the fraction!"); + ?? throw new ArgumentException("Need to define the fraction!"); Backend = AbstractState.Factory( Name.CoolPropBackend(), Name.CoolPropName() @@ -117,12 +117,12 @@ IFluid second ) => IsValidFluidsForMixing(first, second) ? (Fluid) - base.Mixing( - firstSpecificMassFlow, - first, - secondSpecificMassFlow, - second - ) + base.Mixing( + firstSpecificMassFlow, + first, + secondSpecificMassFlow, + second + ) : throw new ArgumentException( "The mixing process is possible only for the same fluids!" ); @@ -145,11 +145,11 @@ public bool Equals(IFluid? other) public override bool Equals(object? obj) => Equals(obj as Fluid); public override int GetHashCode() => - ( - Name.CoolPropName(), - Fraction.DecimalFractions, - base.GetHashCode() - ).GetHashCode(); + ( + Name.CoolPropName(), + Fraction.DecimalFractions, + base.GetHashCode() + ).GetHashCode(); protected override AbstractFluid CreateInstance() => new Fluid(Name, Fraction); diff --git a/src/SharpProp/Fluids/FluidProcesses.cs b/src/SharpProp/Fluids/FluidProcesses.cs index c18c17a..777c8e9 100644 --- a/src/SharpProp/Fluids/FluidProcesses.cs +++ b/src/SharpProp/Fluids/FluidProcesses.cs @@ -9,7 +9,7 @@ protected AbstractFluid IsentropicCompressionTo(Pressure pressure) => ? WithState(Input.Pressure(pressure), Input.Entropy(Entropy)) : throw new ArgumentException( "Compressor outlet pressure " - + "should be higher than inlet pressure!" + + "should be higher than inlet pressure!" ); protected AbstractFluid CompressionTo( @@ -21,10 +21,10 @@ isentropicEfficiency.Percent is > 0 and < 100 Input.Pressure(pressure), Input.Enthalpy( Enthalpy - + ( - IsentropicCompressionTo(pressure).Enthalpy - - Enthalpy - ) / isentropicEfficiency.DecimalFractions + + ( + IsentropicCompressionTo(pressure).Enthalpy + - Enthalpy + ) / isentropicEfficiency.DecimalFractions ) ) : throw new ArgumentException( @@ -36,7 +36,7 @@ protected AbstractFluid IsenthalpicExpansionTo(Pressure pressure) => ? WithState(Input.Pressure(pressure), Input.Enthalpy(Enthalpy)) : throw new ArgumentException( "Expansion valve outlet pressure " - + "should be lower than inlet pressure!" + + "should be lower than inlet pressure!" ); protected AbstractFluid IsentropicExpansionTo(Pressure pressure) => @@ -55,8 +55,8 @@ isentropicEfficiency.Percent is > 0 and < 100 Input.Pressure(pressure), Input.Enthalpy( Enthalpy - - (Enthalpy - IsentropicExpansionTo(pressure).Enthalpy) - * isentropicEfficiency.DecimalFractions + - (Enthalpy - IsentropicExpansionTo(pressure).Enthalpy) + * isentropicEfficiency.DecimalFractions ) ) : throw new ArgumentException( @@ -131,16 +131,16 @@ IFluidState second ( firstSpecificMassFlow.DecimalFractions * first.Enthalpy + secondSpecificMassFlow.DecimalFractions - * second.Enthalpy + * second.Enthalpy ) - / ( - firstSpecificMassFlow + secondSpecificMassFlow - ).DecimalFractions + / ( + firstSpecificMassFlow + secondSpecificMassFlow + ).DecimalFractions ) ) : throw new ArgumentException( "The mixing process is possible " - + "only for flows with the same pressure!" + + "only for flows with the same pressure!" ); private AbstractFluid HeatTransferTo( @@ -168,4 +168,4 @@ private AbstractFluid HeatTransferTo( Input.Pressure(Pressure - (pressureDrop ?? Pressure.Zero)), Input.Enthalpy(enthalpy) ); -} \ No newline at end of file +} diff --git a/src/SharpProp/Fluids/FluidState.cs b/src/SharpProp/Fluids/FluidState.cs index d306851..e81965c 100644 --- a/src/SharpProp/Fluids/FluidState.cs +++ b/src/SharpProp/Fluids/FluidState.cs @@ -206,4 +206,4 @@ out var output .FromKelvins(output!.Value) .ToUnit(TemperatureUnit.DegreeCelsius) : null; -} \ No newline at end of file +} diff --git a/src/SharpProp/Fluids/IAbstractFluid.cs b/src/SharpProp/Fluids/IAbstractFluid.cs index 54d87f6..94426f9 100644 --- a/src/SharpProp/Fluids/IAbstractFluid.cs +++ b/src/SharpProp/Fluids/IAbstractFluid.cs @@ -34,4 +34,4 @@ IKeyedInput secondInput /// go back to calculating it based on the inputs. /// public void UnspecifyPhase(); -} \ No newline at end of file +} diff --git a/src/SharpProp/Fluids/IFluidState.cs b/src/SharpProp/Fluids/IFluidState.cs index ac7b5c4..635df26 100644 --- a/src/SharpProp/Fluids/IFluidState.cs +++ b/src/SharpProp/Fluids/IFluidState.cs @@ -140,4 +140,4 @@ public interface IFluidState /// Temperature at the triple point (by default, °C). /// public Temperature? TripleTemperature { get; } -} \ No newline at end of file +} diff --git a/src/SharpProp/Fluids/Mixture.cs b/src/SharpProp/Fluids/Mixture.cs index 29dab85..255557c 100644 --- a/src/SharpProp/Fluids/Mixture.cs +++ b/src/SharpProp/Fluids/Mixture.cs @@ -34,7 +34,7 @@ public Mixture(IEnumerable fluids, IEnumerable fractions) if (Fluids.Count != Fractions.Count) throw new ArgumentException( "Invalid input! Fluids and Fractions " - + "should be of the same length." + + "should be of the same length." ); if ( !Fluids.All( @@ -44,17 +44,17 @@ public Mixture(IEnumerable fluids, IEnumerable fractions) ) throw new ArgumentException( "Invalid components! All of them should be a pure fluid with " - + $"{AvailableBackend} backend." + + $"{AvailableBackend} backend." ); if (!Fractions.All(fraction => fraction.Percent is > 0 and < 100)) throw new ArgumentException( "Invalid component mass fractions! " - + "All of them should be in (0;100) %." + + "All of them should be in (0;100) %." ); if (Math.Abs(Fractions.Sum(fraction => fraction.Percent) - 100) > 1e-6) throw new ArgumentException( "Invalid component mass fractions! " - + "Their sum should be equal to 100 %." + + "Their sum should be equal to 100 %." ); Backend = AbstractState.Factory( AvailableBackend, @@ -104,14 +104,14 @@ public bool Equals(IMixture? other) public override bool Equals(object? obj) => Equals(obj as Mixture); public override int GetHashCode() => - ( - string.Join("&", Fluids.Select(fluid => fluid.CoolPropName())), - string.Join( - "&", - Fractions.Select(fraction => fraction.DecimalFractions) - ), - base.GetHashCode() - ).GetHashCode(); + ( + string.Join("&", Fluids.Select(fluid => fluid.CoolPropName())), + string.Join( + "&", + Fractions.Select(fraction => fraction.DecimalFractions) + ), + base.GetHashCode() + ).GetHashCode(); protected override AbstractFluid CreateInstance() => new Mixture(Fluids, Fractions); diff --git a/src/SharpProp/HumidAir/HumidAir.cs b/src/SharpProp/HumidAir/HumidAir.cs index f065c4d..0db80f2 100644 --- a/src/SharpProp/HumidAir/HumidAir.cs +++ b/src/SharpProp/HumidAir/HumidAir.cs @@ -74,10 +74,10 @@ public bool Equals(IHumidAir? other) [SuppressMessage("ReSharper", "NonReadonlyMemberInGetHashCode")] public override int GetHashCode() => - ( - string.Join("&", _inputs.Select(input => input.Value)), - string.Join("&", _inputs.Select(input => input.CoolPropKey)) - ).GetHashCode(); + ( + string.Join("&", _inputs.Select(input => input.Value)), + string.Join("&", _inputs.Select(input => input.CoolPropKey)) + ).GetHashCode(); protected virtual HumidAir CreateInstance() => new(); @@ -111,4 +111,4 @@ private void CheckInputs() if (_inputs.Count != 3 || uniqueKeys.Count != 3) throw new ArgumentException("Need to define 3 unique inputs!"); } -} \ No newline at end of file +} diff --git a/src/SharpProp/HumidAir/HumidAirProcesses.cs b/src/SharpProp/HumidAir/HumidAirProcesses.cs index adbd3be..5bee09e 100644 --- a/src/SharpProp/HumidAir/HumidAirProcesses.cs +++ b/src/SharpProp/HumidAir/HumidAirProcesses.cs @@ -116,26 +116,26 @@ IHumidAir second ( firstSpecificMassFlow.DecimalFractions * first.Enthalpy + secondSpecificMassFlow.DecimalFractions - * second.Enthalpy + * second.Enthalpy ) - / ( - firstSpecificMassFlow + secondSpecificMassFlow - ).DecimalFractions + / ( + firstSpecificMassFlow + secondSpecificMassFlow + ).DecimalFractions ), InputHumidAir.Humidity( ( firstSpecificMassFlow.DecimalFractions * first.Humidity + secondSpecificMassFlow.DecimalFractions - * second.Humidity + * second.Humidity ) - / ( - firstSpecificMassFlow + secondSpecificMassFlow - ).DecimalFractions + / ( + firstSpecificMassFlow + secondSpecificMassFlow + ).DecimalFractions ) ) : throw new ArgumentException( "The mixing process is possible " - + "only for flows with the same pressure!" + + "only for flows with the same pressure!" ); private IHumidAir DryHeatTransferTo( @@ -190,7 +190,7 @@ private IHumidAir WetCoolingTo( ? result : throw new ArgumentException( "During the wet cooling process, " - + "the absolute humidity ratio should decrease!" + + "the absolute humidity ratio should decrease!" ); } @@ -208,7 +208,7 @@ IKeyedInput secondInput ? result : throw new ArgumentException( "During the humidification process, " - + "the absolute humidity ratio should increase!" + + "the absolute humidity ratio should increase!" ); } @@ -219,12 +219,12 @@ private void CheckTemperature(Temperature temperature, bool cooling) case true when temperature >= Temperature: throw new ArgumentException( "During the cooling process, " - + "the temperature should decrease!" + + "the temperature should decrease!" ); case false when temperature <= Temperature: throw new ArgumentException( "During the heating process, " - + "the temperature should increase!" + + "the temperature should increase!" ); } } @@ -236,12 +236,12 @@ private void CheckEnthalpy(SpecificEnergy enthalpy, bool cooling) case true when enthalpy >= Enthalpy: throw new ArgumentException( "During the cooling process, " - + "the enthalpy should decrease!" + + "the enthalpy should decrease!" ); case false when enthalpy <= Enthalpy: throw new ArgumentException( "During the heating process, " - + "the enthalpy should increase!" + + "the enthalpy should increase!" ); } } @@ -251,8 +251,8 @@ private void CheckDewTemperature(Temperature temperature) if (temperature < DewTemperature) throw new ArgumentException( "The outlet temperature after " - + "dry heat transfer should be " - + "greater than the dew point temperature!" + + "dry heat transfer should be " + + "greater than the dew point temperature!" ); } @@ -261,8 +261,8 @@ private void CheckDewEnthalpy(SpecificEnergy enthalpy) if (enthalpy < DewPoint.Enthalpy) throw new ArgumentException( "The outlet enthalpy after " - + "dry heat transfer should be " - + "greater than the dew point enthalpy!" + + "dry heat transfer should be " + + "greater than the dew point enthalpy!" ); } @@ -273,4 +273,4 @@ private static void CheckPressureDrop(Pressure? pressureDrop) "Invalid pressure drop in the heat exchanger!" ); } -} \ No newline at end of file +} diff --git a/src/SharpProp/HumidAir/HumidAirState.cs b/src/SharpProp/HumidAir/HumidAirState.cs index 7abcfaa..dfdd1ed 100644 --- a/src/SharpProp/HumidAir/HumidAirState.cs +++ b/src/SharpProp/HumidAir/HumidAirState.cs @@ -97,4 +97,4 @@ public partial class HumidAir _wetBulbTemperature ??= Temperature .FromKelvins(KeyedOutput("B")) .ToUnit(TemperatureUnit.DegreeCelsius); -} \ No newline at end of file +} diff --git a/src/SharpProp/HumidAir/IHumidAirState.cs b/src/SharpProp/HumidAir/IHumidAirState.cs index faeb6b3..ecb0b92 100644 --- a/src/SharpProp/HumidAir/IHumidAirState.cs +++ b/src/SharpProp/HumidAir/IHumidAirState.cs @@ -90,4 +90,4 @@ public interface IHumidAirState /// Wet-bulb temperature (by default, °C). /// public Temperature WetBulbTemperature { get; } -} \ No newline at end of file +} diff --git a/src/SharpProp/IJsonable.cs b/src/SharpProp/IJsonable.cs index 882186e..4ffda30 100644 --- a/src/SharpProp/IJsonable.cs +++ b/src/SharpProp/IJsonable.cs @@ -11,4 +11,4 @@ public interface IJsonable /// true if indented. /// A JSON string. public string AsJson(bool indented = true); -} \ No newline at end of file +} diff --git a/src/SharpProp/IO/IKeyedInput.cs b/src/SharpProp/IO/IKeyedInput.cs index d5a7dcd..2ed8a6e 100644 --- a/src/SharpProp/IO/IKeyedInput.cs +++ b/src/SharpProp/IO/IKeyedInput.cs @@ -24,4 +24,4 @@ public interface IKeyedInput /// Input value in SI units. /// public double Value { get; } -} \ No newline at end of file +} diff --git a/src/SharpProp/IO/InputHumidAir.cs b/src/SharpProp/IO/InputHumidAir.cs index 8752a61..a3269b5 100644 --- a/src/SharpProp/IO/InputHumidAir.cs +++ b/src/SharpProp/IO/InputHumidAir.cs @@ -40,7 +40,7 @@ value.Meters is < -5000 or > 11000 nameof(value), value, "Altitude above sea level " - + "should be between -5000 and 11000 meters!" + + "should be between -5000 and 11000 meters!" ) : new InputHumidAir( "P", @@ -144,4 +144,4 @@ public static InputHumidAir Temperature(Temperature value) => /// Wet-bulb temperature for the input. public static InputHumidAir WetBulbTemperature(Temperature value) => new("B", value.Kelvins); -} \ No newline at end of file +} diff --git a/src/SharpProp/IO/OutputsValidator.cs b/src/SharpProp/IO/OutputsValidator.cs index 326ccb1..572c085 100644 --- a/src/SharpProp/IO/OutputsValidator.cs +++ b/src/SharpProp/IO/OutputsValidator.cs @@ -26,4 +26,4 @@ public void Validate() if (double.IsInfinity(_output) || double.IsNaN(_output)) throw new ArgumentException("Invalid or not defined state!"); } -} \ No newline at end of file +} diff --git a/src/SharpProp/IO/UpdatePair.cs b/src/SharpProp/IO/UpdatePair.cs index 1f3b1bc..ef39f64 100644 --- a/src/SharpProp/IO/UpdatePair.cs +++ b/src/SharpProp/IO/UpdatePair.cs @@ -9,4 +9,4 @@ double SecondValue public InputPairs InputPair { get; } = InputPair; public double FirstValue { get; } = FirstValue; public double SecondValue { get; } = SecondValue; -} \ No newline at end of file +} diff --git a/tests/SharpProp.Tests/Enums/FluidsListTests.cs b/tests/SharpProp.Tests/Enums/FluidsListTests.cs index 0624de2..d1be36b 100644 --- a/tests/SharpProp.Tests/Enums/FluidsListTests.cs +++ b/tests/SharpProp.Tests/Enums/FluidsListTests.cs @@ -112,4 +112,4 @@ params char[] charsToRemove "", s.Split(charsToRemove, StringSplitOptions.RemoveEmptyEntries) ); -} \ No newline at end of file +} diff --git a/tests/SharpProp.Tests/Fluids/FluidExtended.cs b/tests/SharpProp.Tests/Fluids/FluidExtended.cs index ce3a04c..e76a9b1 100644 --- a/tests/SharpProp.Tests/Fluids/FluidExtended.cs +++ b/tests/SharpProp.Tests/Fluids/FluidExtended.cs @@ -12,9 +12,7 @@ public class FluidExtended : Fluid, IFluidExtended private SpecificEntropy? _specificHeatConstVolume; public FluidExtended(FluidsList name, Ratio? fraction = null) - : base(name, fraction) - { - } + : base(name, fraction) { } public SpecificEntropy SpecificHeatConstVolume => _specificHeatConstVolume ??= SpecificEntropy @@ -108,12 +106,12 @@ public IFluidExtended Mixing( IFluidExtended second ) => (FluidExtended) - base.Mixing( - firstSpecificMassFlow, - first, - secondSpecificMassFlow, - second - ); + base.Mixing( + firstSpecificMassFlow, + first, + secondSpecificMassFlow, + second + ); public new IFluidExtended Clone() => (FluidExtended)base.Clone(); @@ -121,4 +119,4 @@ IFluidExtended second protected override AbstractFluid CreateInstance() => new FluidExtended(Name, Fraction); -} \ No newline at end of file +} diff --git a/tests/SharpProp.Tests/Fluids/FluidExtendedTests.cs b/tests/SharpProp.Tests/Fluids/FluidExtendedTests.cs index 6dd060d..e5472aa 100644 --- a/tests/SharpProp.Tests/Fluids/FluidExtendedTests.cs +++ b/tests/SharpProp.Tests/Fluids/FluidExtendedTests.cs @@ -119,4 +119,4 @@ public void Methods_New_ReturnsInstancesOfInheritedType() .Should() .BeOfType(); } -} \ No newline at end of file +} diff --git a/tests/SharpProp.Tests/Fluids/FluidProcessesTests.cs b/tests/SharpProp.Tests/Fluids/FluidProcessesTests.cs index caaff6e..205e7df 100644 --- a/tests/SharpProp.Tests/Fluids/FluidProcessesTests.cs +++ b/tests/SharpProp.Tests/Fluids/FluidProcessesTests.cs @@ -39,7 +39,7 @@ public void IsentropicCompressionTo_WrongPressure_ThrowsArgumentException() .Throw() .WithMessage( "Compressor outlet pressure " - + "should be higher than inlet pressure!" + + "should be higher than inlet pressure!" ); } @@ -87,11 +87,11 @@ public void CompressionTo_HighPressureWithIsentropicEfficiency_ReturnsFluidAtHig Input.Pressure(HighPressure), Input.Enthalpy( _fluid.Enthalpy - + ( - _fluid - .IsentropicCompressionTo(HighPressure) - .Enthalpy - _fluid.Enthalpy - ) / IsentropicEfficiency.DecimalFractions + + ( + _fluid + .IsentropicCompressionTo(HighPressure) + .Enthalpy - _fluid.Enthalpy + ) / IsentropicEfficiency.DecimalFractions ) ) ); @@ -105,7 +105,7 @@ public void IsenthalpicExpansionTo_WrongPressure_ThrowsArgumentException() .Throw() .WithMessage( "Expansion valve outlet pressure " - + "should be lower than inlet pressure!" + + "should be lower than inlet pressure!" ); } @@ -130,7 +130,7 @@ public void IsentropicExpansionTo_WrongPressure_ThrowsArgumentException() .Throw() .WithMessage( "Expander outlet pressure " - + "should be lower than inlet pressure!" + + "should be lower than inlet pressure!" ); } @@ -178,12 +178,12 @@ public void ExpansionTo_LowPressureWithIsentropicEfficiency_ReturnsFluidAtLowPre Input.Pressure(LowPressure), Input.Enthalpy( _fluid.Enthalpy - - ( - _fluid.Enthalpy - - _fluid - .IsentropicExpansionTo(LowPressure) - .Enthalpy - ) * IsentropicEfficiency.DecimalFractions + - ( + _fluid.Enthalpy + - _fluid + .IsentropicExpansionTo(LowPressure) + .Enthalpy + ) * IsentropicEfficiency.DecimalFractions ) ) ); @@ -204,7 +204,7 @@ string message Action action = () => _ = _fluid.CoolingTo( _fluid.Temperature - + TemperatureDelta.FromKelvins(temperatureDelta), + + TemperatureDelta.FromKelvins(temperatureDelta), pressureDrop.Kilopascals() ); action.Should().Throw().WithMessage($"*{message}*"); @@ -271,7 +271,7 @@ string message Action action = () => _ = _fluid.HeatingTo( _fluid.Temperature - - TemperatureDelta.FromKelvins(temperatureDelta), + - TemperatureDelta.FromKelvins(temperatureDelta), pressureDrop.Kilopascals() ); action.Should().Throw().WithMessage($"*{message}*"); @@ -409,7 +409,7 @@ public void Mixing_WrongPressures_ThrowsArgumentException() .Throw() .WithMessage( "The mixing process is possible " - + "only for flows with the same pressure!" + + "only for flows with the same pressure!" ); } @@ -430,4 +430,4 @@ public void Mixing_SamePressures_ReturnsMixPoint() ) ); } -} \ No newline at end of file +} diff --git a/tests/SharpProp.Tests/Fluids/FluidTests.cs b/tests/SharpProp.Tests/Fluids/FluidTests.cs index 1834117..d41e279 100644 --- a/tests/SharpProp.Tests/Fluids/FluidTests.cs +++ b/tests/SharpProp.Tests/Fluids/FluidTests.cs @@ -107,32 +107,32 @@ public void Update_VariousFluids_MatchesWithCoolProp(FluidsList name) fluid.TripleTemperature?.Kelvins }; var expected = new[] - { - "Z", - "L", - "p_critical", - "T_critical", - "D", - "V", - "H", - "S", - "T_freeze", - "U", - "P_max", - "T_max", - "P_min", - "T_min", - "M", - "Prandtl", - "P", - "Q", - "A", - "C", - "I", - "T", - "p_triple", - "T_triple" - } + { + "Z", + "L", + "p_critical", + "T_critical", + "D", + "V", + "H", + "S", + "T_freeze", + "U", + "P_max", + "T_max", + "P_min", + "T_min", + "M", + "Prandtl", + "P", + "Q", + "A", + "C", + "I", + "T", + "p_triple", + "T_triple" + } .Select(CoolPropInterface) .ToList(); for (var i = 0; i < actual.Length; i++) @@ -371,12 +371,12 @@ private void SetUpFluid(FluidsList name) "T", _fluid.Temperature.Kelvins, $"{_fluid.Name.CoolPropBackend()}::" - + $"{_fluid.Name.CoolPropName()}" - + ( - _fluid.Name.Pure() - ? string.Empty - : $"-{_fluid.Fraction.Percent}%" - ) + + $"{_fluid.Name.CoolPropName()}" + + ( + _fluid.Name.Pure() + ? string.Empty + : $"-{_fluid.Fraction.Percent}%" + ) ); return CheckedValue(value, outputKey); } @@ -393,4 +393,4 @@ private void SetUpFluid(FluidsList name) || (outputKey == "Q" && value is < 0 or > 1) ? null : value; -} \ No newline at end of file +} diff --git a/tests/SharpProp.Tests/Fluids/IFluidExtended.cs b/tests/SharpProp.Tests/Fluids/IFluidExtended.cs index 5094ec5..4594e83 100644 --- a/tests/SharpProp.Tests/Fluids/IFluidExtended.cs +++ b/tests/SharpProp.Tests/Fluids/IFluidExtended.cs @@ -285,4 +285,4 @@ IFluidExtended second /// A new instance with no defined state. /// public new IFluidExtended Factory(); -} \ No newline at end of file +} diff --git a/tests/SharpProp.Tests/Fluids/MixtureProcessesTests.cs b/tests/SharpProp.Tests/Fluids/MixtureProcessesTests.cs index 086e6ca..7880d72 100644 --- a/tests/SharpProp.Tests/Fluids/MixtureProcessesTests.cs +++ b/tests/SharpProp.Tests/Fluids/MixtureProcessesTests.cs @@ -40,7 +40,7 @@ string message Action action = () => _ = _mixture.CoolingTo( _mixture.Temperature - + TemperatureDelta.FromKelvins(temperatureDelta), + + TemperatureDelta.FromKelvins(temperatureDelta), pressureDrop.Kilopascals() ); action.Should().Throw().WithMessage($"*{message}*"); @@ -74,7 +74,7 @@ string message Action action = () => _ = _mixture.HeatingTo( _mixture.Temperature - - TemperatureDelta.FromKelvins(temperatureDelta), + - TemperatureDelta.FromKelvins(temperatureDelta), pressureDrop.Kilopascals() ); action.Should().Throw().WithMessage($"*{message}*"); @@ -91,4 +91,4 @@ public void HeatingTo_TemperatureWithPressureDrop_ReturnsMixtureAtTemperatureAnd Input.Temperature(_mixture.Temperature + TemperatureDelta) ) ); -} \ No newline at end of file +} diff --git a/tests/SharpProp.Tests/Fluids/MixtureTests.cs b/tests/SharpProp.Tests/Fluids/MixtureTests.cs index ab31b15..676a19c 100644 --- a/tests/SharpProp.Tests/Fluids/MixtureTests.cs +++ b/tests/SharpProp.Tests/Fluids/MixtureTests.cs @@ -201,35 +201,35 @@ public static IEnumerable WrongFluidsOrFractions() => new List { FluidsList.Water }, new List { 60.Percent(), 40.Percent() }, "Invalid input! Fluids and Fractions " - + "should be of the same length." + + "should be of the same length." }, new object[] { new List { FluidsList.MPG, FluidsList.MEG }, new List { 60.Percent(), 40.Percent() }, "Invalid components! All of them " - + "should be a pure fluid with HEOS backend." + + "should be a pure fluid with HEOS backend." }, new object[] { new List { FluidsList.Water, FluidsList.Ethanol }, new List { -200.Percent(), 40.Percent() }, "Invalid component mass fractions! " - + "All of them should be in (0;100) %." + + "All of them should be in (0;100) %." }, new object[] { new List { FluidsList.Water, FluidsList.Ethanol }, new List { 60.Percent(), 200.Percent() }, "Invalid component mass fractions! " - + "All of them should be in (0;100) %." + + "All of them should be in (0;100) %." }, new object[] { new List { FluidsList.Water, FluidsList.Ethanol }, new List { 80.Percent(), 80.Percent() }, "Invalid component mass fractions! " - + "Their sum should be equal to 100 %." + + "Their sum should be equal to 100 %." } }; -} \ No newline at end of file +} diff --git a/tests/SharpProp.Tests/GlobalUsings.cs b/tests/SharpProp.Tests/GlobalUsings.cs index 33f8149..19d9667 100644 --- a/tests/SharpProp.Tests/GlobalUsings.cs +++ b/tests/SharpProp.Tests/GlobalUsings.cs @@ -14,4 +14,4 @@ global using UnitsNet.NumberExtensions.NumberToTemperature; global using UnitsNet.Serialization.JsonNet; global using UnitsNet.Units; -global using Xunit; \ No newline at end of file +global using Xunit; diff --git a/tests/SharpProp.Tests/HumidAir/HumidAirExtended.cs b/tests/SharpProp.Tests/HumidAir/HumidAirExtended.cs index 62fa42e..b8c1ba8 100644 --- a/tests/SharpProp.Tests/HumidAir/HumidAirExtended.cs +++ b/tests/SharpProp.Tests/HumidAir/HumidAirExtended.cs @@ -42,7 +42,7 @@ IKeyedInput thirdInput Pressure? pressureDrop = null ) => (HumidAirExtended) - base.WetCoolingTo(temperature, relativeHumidity, pressureDrop); + base.WetCoolingTo(temperature, relativeHumidity, pressureDrop); public new IHumidAirExtended WetCoolingTo( Temperature temperature, @@ -50,7 +50,7 @@ IKeyedInput thirdInput Pressure? pressureDrop = null ) => (HumidAirExtended) - base.WetCoolingTo(temperature, humidity, pressureDrop); + base.WetCoolingTo(temperature, humidity, pressureDrop); public new IHumidAirExtended WetCoolingTo( SpecificEnergy enthalpy, @@ -58,7 +58,7 @@ IKeyedInput thirdInput Pressure? pressureDrop = null ) => (HumidAirExtended) - base.WetCoolingTo(enthalpy, relativeHumidity, pressureDrop); + base.WetCoolingTo(enthalpy, relativeHumidity, pressureDrop); public new IHumidAirExtended WetCoolingTo( SpecificEnergy enthalpy, @@ -97,16 +97,16 @@ public IHumidAirExtended Mixing( IHumidAirExtended second ) => (HumidAirExtended) - base.Mixing( - firstSpecificMassFlow, - first, - secondSpecificMassFlow, - second - ); + base.Mixing( + firstSpecificMassFlow, + first, + secondSpecificMassFlow, + second + ); public new IHumidAirExtended Clone() => (HumidAirExtended)base.Clone(); public new IHumidAirExtended Factory() => (HumidAirExtended)base.Factory(); protected override HumidAir CreateInstance() => new HumidAirExtended(); -} \ No newline at end of file +} diff --git a/tests/SharpProp.Tests/HumidAir/HumidAirExtendedTests.cs b/tests/SharpProp.Tests/HumidAir/HumidAirExtendedTests.cs index ad4324a..bced456 100644 --- a/tests/SharpProp.Tests/HumidAir/HumidAirExtendedTests.cs +++ b/tests/SharpProp.Tests/HumidAir/HumidAirExtendedTests.cs @@ -114,4 +114,4 @@ public void Methods_New_ReturnsInstancesOfInheritedType() .Should() .BeOfType(); } -} \ No newline at end of file +} diff --git a/tests/SharpProp.Tests/HumidAir/HumidAirProcessesTests.cs b/tests/SharpProp.Tests/HumidAir/HumidAirProcessesTests.cs index 295ed63..9ad0b87 100644 --- a/tests/SharpProp.Tests/HumidAir/HumidAirProcessesTests.cs +++ b/tests/SharpProp.Tests/HumidAir/HumidAirProcessesTests.cs @@ -39,7 +39,7 @@ public class TestHumidAirProcesses 0, 0, "The outlet temperature after dry heat transfer " - + "should be greater than the dew point temperature!" + + "should be greater than the dew point temperature!" )] [InlineData(15, -100, "Invalid pressure drop in the heat exchanger!")] public void DryCoolingTo_WrongTemperatureOrPressureDrop_ThrowsArgumentException( @@ -84,7 +84,7 @@ public void DryCoolingTo_TemperatureWithPressureDrop_ReturnsAirAtTemperatureSame 0, 0, "The outlet enthalpy after dry heat transfer " - + "should be greater than the dew point enthalpy!" + + "should be greater than the dew point enthalpy!" )] [InlineData(30, -100, "Invalid pressure drop in the heat exchanger!")] public void DryCoolingTo_WrongEnthalpyOrPressureDrop_ThrowsArgumentException( @@ -145,8 +145,7 @@ string message } [Fact] - public void - WetCoolingTo_TemperatureRelHumidityWithPressureDrop_ReturnsAirAtTemperatureRelHumidityAndLowerPressure() => + public void WetCoolingTo_TemperatureRelHumidityWithPressureDrop_ReturnsAirAtTemperatureRelHumidityAndLowerPressure() => _humidAir .WetCoolingTo( _humidAir.Temperature - TemperatureDelta, @@ -387,7 +386,7 @@ public void HumidificationByWaterTo_WrongRelHumidity_ThrowsArgumentException() .Throw() .WithMessage( "During the humidification process, " - + "the absolute humidity ratio should increase!" + + "the absolute humidity ratio should increase!" ); } @@ -414,7 +413,7 @@ public void HumidificationByWaterTo_WrongHumidity_ThrowsArgumentException() .Throw() .WithMessage( "During the humidification process, " - + "the absolute humidity ratio should increase!" + + "the absolute humidity ratio should increase!" ); } @@ -441,7 +440,7 @@ public void HumidificationBySteamTo_WrongRelHumidity_ThrowsArgumentException() .Throw() .WithMessage( "During the humidification process, " - + "the absolute humidity ratio should increase!" + + "the absolute humidity ratio should increase!" ); } @@ -468,7 +467,7 @@ public void HumidificationBySteamTo_WrongHumidity_ThrowsArgumentException() .Throw() .WithMessage( "During the humidification process, " - + "the absolute humidity ratio should increase!" + + "the absolute humidity ratio should increase!" ); } @@ -506,7 +505,7 @@ public void Mixing_WrongPressures_ThrowsArgumentException() .Throw() .WithMessage( "The mixing process is possible " - + "only for flows with the same pressure!" + + "only for flows with the same pressure!" ); } @@ -532,4 +531,4 @@ public void Mixing_SamePressures_ReturnsMixPoint() ) ); } -} \ No newline at end of file +} diff --git a/tests/SharpProp.Tests/HumidAir/HumidAirTests.cs b/tests/SharpProp.Tests/HumidAir/HumidAirTests.cs index 1221421..ede3d61 100644 --- a/tests/SharpProp.Tests/HumidAir/HumidAirTests.cs +++ b/tests/SharpProp.Tests/HumidAir/HumidAirTests.cs @@ -90,22 +90,22 @@ public void Update_VariousConditions_MatchesWithCoolProp( _humidAir.WetBulbTemperature.Kelvins }; var expected = new[] - { - "Z", - "K", - "D", - "M", - "Hha", - "Sha", - "W", - "P_w", - "P", - "R", - "Cha", - "Vha", - "T", - "B" - } + { + "Z", + "K", + "D", + "M", + "Hha", + "Sha", + "W", + "P_w", + "P", + "R", + "Cha", + "Vha", + "T", + "B" + } .Select(CoolPropInterface) .ToList(); for (var i = 0; i < actual.Length; i++) @@ -130,8 +130,8 @@ public void Update_VariousConditions_MatchesWithCoolProp( .Should() .Be( _humidAir.DynamicViscosity.PascalSeconds - * _humidAir.SpecificHeat.JoulesPerKilogramKelvin - / _humidAir.Conductivity.WattsPerMeterKelvin + * _humidAir.SpecificHeat.JoulesPerKilogramKelvin + / _humidAir.Conductivity.WattsPerMeterKelvin ); } @@ -314,4 +314,4 @@ private double CoolPropInterface(string key) => .FromPercent(_humidAir.RelativeHumidity.Percent) .DecimalFractions ); -} \ No newline at end of file +} diff --git a/tests/SharpProp.Tests/HumidAir/IHumidAirExtended.cs b/tests/SharpProp.Tests/HumidAir/IHumidAirExtended.cs index 5c5077e..455cf06 100644 --- a/tests/SharpProp.Tests/HumidAir/IHumidAirExtended.cs +++ b/tests/SharpProp.Tests/HumidAir/IHumidAirExtended.cs @@ -333,4 +333,4 @@ IHumidAirExtended second /// A new instance with no defined state. /// public new IHumidAirExtended Factory(); -} \ No newline at end of file +} diff --git a/tests/SharpProp.Tests/IO/InputExtended.cs b/tests/SharpProp.Tests/IO/InputExtended.cs index ba8319a..c5954f6 100644 --- a/tests/SharpProp.Tests/IO/InputExtended.cs +++ b/tests/SharpProp.Tests/IO/InputExtended.cs @@ -6,9 +6,7 @@ public record InputExtended : Input { private InputExtended(Parameters coolPropKey, double value) - : base(coolPropKey, value) - { - } + : base(coolPropKey, value) { } /// /// Molar density. @@ -17,4 +15,4 @@ private InputExtended(Parameters coolPropKey, double value) /// Molar density for the input. public static InputExtended MolarDensity(MolarMass value) => new(Parameters.iDmolar, value.KilogramsPerMole); -} \ No newline at end of file +} diff --git a/tests/SharpProp.Tests/IO/InputExtendedTests.cs b/tests/SharpProp.Tests/IO/InputExtendedTests.cs index 5e7d5ca..da80e16 100644 --- a/tests/SharpProp.Tests/IO/InputExtendedTests.cs +++ b/tests/SharpProp.Tests/IO/InputExtendedTests.cs @@ -13,4 +13,4 @@ public void CoolPropKey_NewInput_MatchesWithCoolProp() => [Fact] public void Value_NewInput_ShouldBeInSIUnits() => _input.Value.Should().Be(900); -} \ No newline at end of file +} diff --git a/tests/SharpProp.Tests/IO/InputHumidAirExtended.cs b/tests/SharpProp.Tests/IO/InputHumidAirExtended.cs index 2e19461..db00ac0 100644 --- a/tests/SharpProp.Tests/IO/InputHumidAirExtended.cs +++ b/tests/SharpProp.Tests/IO/InputHumidAirExtended.cs @@ -6,9 +6,7 @@ public record InputHumidAirExtended : InputHumidAir { private InputHumidAirExtended(string coolPropKey, double value) - : base(coolPropKey, value) - { - } + : base(coolPropKey, value) { } /// /// Water mole fraction. @@ -17,4 +15,4 @@ private InputHumidAirExtended(string coolPropKey, double value) /// Water mole fraction for the input. public static InputHumidAirExtended WaterMoleFraction(Ratio value) => new("psi_w", value.DecimalFractions); -} \ No newline at end of file +} diff --git a/tests/SharpProp.Tests/IO/InputHumidAirExtendedTests.cs b/tests/SharpProp.Tests/IO/InputHumidAirExtendedTests.cs index de988b6..4b024ad 100644 --- a/tests/SharpProp.Tests/IO/InputHumidAirExtendedTests.cs +++ b/tests/SharpProp.Tests/IO/InputHumidAirExtendedTests.cs @@ -14,4 +14,4 @@ public void CoolPropKey_NewInput_MatchesWithCoolProp() => [Fact] public void Value_NewInput_ShouldBeInSIUnits() => _input.Value.Should().Be(5e-3); -} \ No newline at end of file +} diff --git a/tests/SharpProp.Tests/IO/InputHumidAirTests.cs b/tests/SharpProp.Tests/IO/InputHumidAirTests.cs index 6a25848..56bd939 100644 --- a/tests/SharpProp.Tests/IO/InputHumidAirTests.cs +++ b/tests/SharpProp.Tests/IO/InputHumidAirTests.cs @@ -31,7 +31,7 @@ double altitude .Throw() .WithMessage( "*Altitude above sea level " - + "should be between -5000 and 11000 meters!*" + + "should be between -5000 and 11000 meters!*" ); } @@ -162,4 +162,4 @@ public static IEnumerable Values() => 288.15 } }; -} \ No newline at end of file +} diff --git a/tests/SharpProp.Tests/IO/InputTests.cs b/tests/SharpProp.Tests/IO/InputTests.cs index c0f9256..d8821dd 100644 --- a/tests/SharpProp.Tests/IO/InputTests.cs +++ b/tests/SharpProp.Tests/IO/InputTests.cs @@ -93,4 +93,4 @@ public static IEnumerable Values() => }, new object[] { Input.Temperature(20.DegreesCelsius()), 293.15 } }; -} \ No newline at end of file +}