New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AbstractState Mathematica Wrapper #2085
base: master
Are you sure you want to change the base?
AbstractState Mathematica Wrapper #2085
Conversation
Please rebase based on #2084 |
3b29003
to
3ac5681
Compare
Hi, |
I would say if you have further changes to make to Lib, best to resolve those first. |
@friederikeboehm - Any progress on this? A few comments:
I'd like to proceed with some enhancements of my own and can help with the paclet creation. Don't want to get too aggressive if your PR is eminent. |
@henningjp Thanks for the input! Yes, I did made progress on this, just got busy doing other things befor cleaning everything up for the PR. I will try to get to it this week. About your comments:
|
3ac5681
to
10a3ae4
Compare
@friederikeboehm - Thanks. I'll wait until this settles down before contributing. I've been using the new Doc Tools in MM 13.0 outside of Workbench. It works pretty good. There are a few bugs yet, but it's workable. I can help with that and/or the paclet-izing if you like. Docs are just tedious, however you do it. |
@henningjp Turned out to be less tedious than I thought. Mathematica 13 definetly improved this process! Could automatically generate the documentation notebooks whicht then contain the usage message, guess thats okay for a version 0.0.1 I think we should open an issue to further discuss paclet development as this wasn't the point of this PR originally. @ianhbell should I close this PR and open a new one or keep this going on here? Or should we merge this one and do the paclet development in a new one? |
Probably related to DLL hell (not being able to find expected shared libraries, likely standard library ones). That's why I statically link the standard library, although this is not a recommended best practice. |
Props1SImulti new function in CoolProp
Implementation comparable to HelmholtzEOSMixturebackend See PR CoolProp#1371 (4014f85) Minor changes to CubicBackend.cpp If phase is imposed, it is returned instead of always returning gas phase for mixtures TODO is not properly fixed though
AbstractState_get_mole_fractions_satState AbstractState_keyed_output_satState AbstractState_backend_name add_fluids_as_JSON changes to AbstractState_get_phase_envelope_data
Add PhaseSI, test.nb and filterNotebooks.bat filterNotebook.bat utilizes Notebook-Filter to clean up Mathematica .nb files Fix memory leak String handling in Mathematica... Add Abstract_State_factory for Mathematica Add Abstract_State_free Add get_input_pair_index Add get_param_index, AS_update and AS_keyed_output Add Abstract_State_set_fractions Add AbstractState_set_binary_interaction_double test.nb contains examples from CoolProp documentation regarding low level access from the high level interface and accessic cubic EoS mixtures Add get_global_param_string and many fixes fix char pointers fix function names Add error handling for mathematica Add Mathematica Package to load LibraryFunctions Supports error messages CoolPropMathematica.cpp minor changes Add AbstractState_get_mole_fractions CoolPropLib Add AbstractState_set_fractions, get_input_pair_description and get_parameter_information to Mathematica Wrapper Add AbstractState_fluid_names to CoolPropLib Add AbstractState_fluid_names to Mathematica Wrapper Add get_cubic_fluids_list to Mathematica Wrapper Add pattern matching for Mathematica Wrapper Functions overloaded, error message generation for incorrect type entry Syntax highlighting for number of Arguments Add AbstractState_specify_phase Build Phase Envelope Fix CoolProp.wl Add ReadPhaseEnvelopeData Add AbstractState_keyed_output_satState Add AbstractState_get_mole_fractions_satState Proper Calls to Saturated State Add Comments add_fluids_as_JSON Add get_fluid_as_JSON Add AbstractState_set_cubic_alpha_C Add Boolean and Fix List of Reals Add fluid_param_string to cubic backend Add PropsSImulti to CoolPropLib Add PropsSImulti to Mathematica wrapper Add Props1SImulti Add Props1SImulti to Mathematica wrapper Add Props1SImulti and PropsSImulti to CoolProp.wl Files formatted Format Mathematica wrapper Add Props1SI to Mathematica wrapper Add set_buffer_length to Mathematica wrapper Keep imposed phase for cubic backend AbstractState -> AS in Mathematica Fix Buffer for multi outputs example.nb überarbeitet Add ASSetCubicAlpha to CoolProp.wl
10a3ae4
to
a1281e5
Compare
I tried (and think succeeded) in statically linking only to realise, static librarys seem not to work with Mathematica... But I did manage to get it working! Including and loading three missing dlls, that are not part of standard Windows (see https://github.com/friederikeboehm/CoolProp/tree/pacletDev/wrappers/Mathematica/CoolProp/LibraryResources/Windows-x86-64) did the trick. @ibell how should I proceed with this PR (see above, tagged your other account last time)? @henningjp The package is working on Windows now, can you test it?
|
@friederikeboehm - This is pretty incredible. I've only just loaded it and started testing, but everything behaves as I'd expect. Installing the paclet was seamless. I'll poke at it some more in the evenings. I have a Mathcad verification document that I'll try and recreate in Mathematica and check that everything is behaving. So far returned values seam reasonable. It'll take some time to work through all the functions. My wheels are spinning already on fleshing out the docs to be more "Wolfram like", but we can do that later. Nice work! I'm tied up this weekend so it may take me into next week to check it all out. |
@friederikeboehm Some thoughts, which you may already be considering:
|
@henningjp Some of your points I actually did consider:
|
@friederikeboehm - Ignore third item, I didn't realize that it would bundle all existing OS versions into a single paclet. I think that's the way to go. |
@friederikeboehm Are you still working on this? I liked where it was going. |
@henningjp Kind of, I am using what I implemented, just never fot around to finishing it to a point to make it worth publishing... What would you think is a good way to bring this to a nice form? |
@friederikeboehm - I'll take a look at what you have on your site and see. I noticed that the WIP PR is now quite out of date with the current state of CoolProp with some conflicts. I have a personal interest in
I'll check your repo over the next week or so and see where it stands. |
I've kept my private repo somewhat up to date (currently on a commit from mid-January), I'll try to clean up and update to the current master over the weekend! |
@henningjp Didn't get around to it until today. I've kept the changes on a different branch so far (https://github.com/friederikeboehm/CoolProp/tree/pacletDev/wrappers/Mathematica) as I'm still not sure what should live on the official CoolProp repo and what shouldn't (i.e. other DLLs necessary to make it run on other Windows machines). |
Description of the Change
[ We must be able to understand the design of your change from this description. If we can't get a good idea of what the code will be doing from the description here, the pull request may be closed at the maintainers' discretion. Keep in mind that the maintainer reviewing this PR may not be familiar with or have worked with the wrapper code being implemented, so please walk us through the concepts. ]
Benefits
Adds a lot of functionality to the Mathematica Wrapper. Especially the use of the interface layer to the low-level interface was not implemented in Mathematica beforehand.
Possible Drawbacks
None
Verification Process
I implemented a mathematica package to use the Library Functions (CoolProp.wl). This also adds error recognition and error messages to the Mathematica Wrapper. This was used in the example.nb Notebook. There I used examples from the CoolProp Homepage (Access from High-Level Interface and Cubic Equations of State - Mixtures) and received the same results.
Applicable Issues
Changes in PR #2084 are used in this one
#2065