Code Monkey home page Code Monkey logo

sharpprop's People

Contributors

dependabot[bot] avatar portyanikhin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sharpprop's Issues

key [nPropane] was not found in string_to_index_map in JSONFluidLibrary

INTRO

  • I'm trying to build a Mixture (of 7 compositions)
  • I'm getting an error when adding the nPropane to the mix.

TROUBLESHOOTING

  • Changing the order of the compositions in the mix yields no changes
  • The nButane yields no errors

ENV

SharpProp 5.0.0

CODE

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())
            );

ERROR

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

RESOURCES

image

DllNotFoundException: libCoolProp assembly

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

Availability for .NET Framework

INTRO

  • I would like to use CoolProp in my project
  • Since CoolProp is no longer available as a package, I wish to use SharpProp (which looks amazing BTW)
  • Based on the package dependencies, I can only see net6.0 and net7.0

QUESTION / ASK

  • Is there a plan to have .Net 4.X supported at some point?
  • Any alternative(s)?

RESOURCES

image

Thanks in advance!

'int' does not contain a definition for 'Percent' and no accessible extension method 'Percent' accepting a first argument of type 'int' could be found

ISSUE

I'm using the mixture example provided in the repo.

Mixture

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

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?) 

RESOURCES

  • error

image

- installed nuget

image

- System and IDE
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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.