portyanikhin / sharpprop Goto Github PK
View Code? Open in Web Editor NEWA simple, full-featured, lightweight, cross-platform CoolProp wrapper for C#
Home Page: https://www.nuget.org/packages/SharpProp
License: MIT License
A simple, full-featured, lightweight, cross-platform CoolProp wrapper for C#
Home Page: https://www.nuget.org/packages/SharpProp
License: MIT License
nPropane
to the mix.nButane
yields no errorsSharpProp 5.0.0
var mixture = new Mixture(
new List<FluidsList> {
FluidsList.Methane,
FluidsList.Ethane,
FluidsList.nPropane,
FluidsList.IsoButane,
FluidsList.nButane,
FluidsList.Nitrogen,
FluidsList.CarbonDioxide
},
new List<Ratio> {
(85.5267271).Percent(),
(0.270918).Percent(),
(0.02083985).Percent(),
(0.01041992).Percent(),
(0.01041992).Percent(),
(6.75211003).Percent(),
(7.40856518).Percent()
})
.WithState(
Input.Pressure((1074).PoundsForcePerSquareInch()),
Input.Temperature((75.2).DegreesFahrenheit())
);
System.ApplicationException
HResult=0x80131600
Message=key [nPropane] was not found in string_to_index_map in JSONFluidLibrary
Source=SharpProp
StackTrace:
at SharpProp.AbstractState.Factory(String backend, String fluidNames)
at SharpProp.Mixture..ctor(IEnumerable`1 fluids, IEnumerable`1 fractions)
at SharpProp_Core.MainForm.buttonTesting_Click(Object sender, EventArgs e) in C:\Users\aviivgi\Documents\Projects\Project EMC2PDFA\EMMC2PDFA - REFPROP\MainForm.cs:line 907
This exception was originally thrown at this call stack:
[External Code]
SharpProp_Core.MainForm.buttonTesting_Click(object, System.EventArgs) in MainForm.cs
After downloading the package from NuGet, for somereason the libCoolProp dll does not download. Everything works fine in VS, but when I try to run it, I get a DLL not found exception for libCoolProp. I tried grabbing it externally and adding it, but it is still not found.
For context, I am trying to use SharpProp with unity C# .net 2.1
CoolProp
in my projectCoolProp
is no longer available as a package, I wish to use SharpProp
(which looks amazing BTW)net6.0
and net7.0
.Net 4.X
supported at some point?Thanks in advance!
I'm using the mixture
example provided in the repo.
var mixture = new Mixture(
new List<FluidsList> {FluidsList.Water, FluidsList.Ethanol},
new List<Ratio> {(60).Percent(), (40).Percent()})
.WithState(Input.Pressure((200).Kilopascals()),
Input.Temperature((277.15).Kelvins()));
Console.WriteLine(mixture.Density.KilogramsPerCubicMeter); // 883.3922771627759
Console.WriteLine(mixture.Density); // 883.39 kg/m3
Console.WriteLine(mixture.Density.ToUnit(DensityUnit.GramPerDeciliter)); // 88.34 g/dl
Error | CS1061 | 'int' does not contain a definition for 'Percent' and no accessible extension method 'Percent'
accepting a first argument of type 'int' could be found (are you missing a using directive or an assembly reference?)
Microsoft Visual Studio Community 2022
Version 17.4.3
VisualStudio.17.Release/17.4.3+33205.214
Microsoft .NET Framework
Version 4.8.09032
Installed Version: Community
Visual C++ 2022 00482-90000-00000-AA361
Microsoft Visual C++ 2022
ASP.NET and Web Tools 17.4.326.54890
ASP.NET and Web Tools
Azure App Service Tools v3.0.0 17.4.326.54890
Azure App Service Tools v3.0.0
Azure Functions and Web Jobs Tools 17.4.326.54890
Azure Functions and Web Jobs Tools
C# Tools 4.4.0-6.22580.4+d7a61210a88b584ca0827585ec6e871c6b1c5a14
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Node.js Tools 1.5.40817.1 Commit Hash:66443775f9f3b1d8f8fee47af5002828b346688d
Adds support for developing and debugging Node.js apps in Visual Studio
NuGet Package Manager 6.4.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
Razor (ASP.NET Core) 17.0.0.2246202+61cc048d36a3fc9246d2f04625988b19a18ab8f0
Provides languages services for ASP.NET Core Razor.
SQL Server Data Tools 17.0.62207.28050
Microsoft SQL Server Data Tools
Test Adapter for Boost.Test 1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.
Test Adapter for Google Test 1.0
Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.
TypeScript Tools 17.0.10921.2001
TypeScript Tools for Microsoft Visual Studio
Visual Basic Tools 4.4.0-6.22580.4+d7a61210a88b584ca0827585ec6e871c6b1c5a14
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual F# Tools 17.4.0-beta.22512.4+525d5109e389341bb90b144c24e2ad1ceec91e7b
Microsoft Visual F# Tools
Visual Studio IntelliCode 2.2
AI-assisted development for Visual Studio.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.