python 求 酒精与水的混合物
"""
import CoolProp.CoolProp as CP
摩尔数的比值0.7189 :0.2811=质量比0.5:0.5
求5度下酒精溶液的密度 蒸汽占比为0
b=CP.PropsSI('D','T',278.15,'Q',0,'HEOS::water[0.7189]ÐANOL[0.2811]')
print(b)
923.0093552654256
c#
using SharpProp;
using UnitsNet;
using UnitsNet.NumberExtensions.NumberToPressure;
using UnitsNet.NumberExtensions.NumberToRatio;
using UnitsNet.NumberExtensions.NumberToTemperature;
using UnitsNet.Units;
//此为质量百分比
var mixture = new Mixture(
new List<FluidsList> { FluidsList.Water, FluidsList.Ethanol },
new List<UnitsNet.Ratio> { (50).Percent(), (50).Percent() }
)
// .WithState(Input.Pressure((200).Kilopascals()), Input.Temperature((5).DegreesCelsius()));
//quality 0=全部为液态 1,100=全部为气态。
.WithState(Input.Temperature((5).DegreesCelsius()),Input.Quality((0).Percent()));
Console.WriteLine(mixture.Density.KilogramsPerCubicMeter);
Console.WriteLine(mixture.Density);
Console.WriteLine(mixture.Density.ToUnit(UnitsNet.Units.DensityUnit.GramPerDeciliter));
923.0038782658024
923 kg/m3
92.3 g/dl