CoolProp - CoolProp is an open-source, cross-platform, free, thermo physical, fluid properties database. - Messages
CoolProp for PTC Mathcad
QuoteCoolProp is an open-source, cross-platform, free, thermo physical, fluid properties database that includes pure fluids, pseudo-pure fluids, and humid air properties. Nearly all the fluid models in CoolProp are based on Helmholtz energy formulations, and therefore the thermodynamic properties of interest can be obtained directly from partial derivatives of the Helmholtz energy.
Distributed with the most recent version of CoolProp (4.0.0) are PTC Mathcad “User Function” libraries, designed to wrap some of the primary CoolProp functions and make them available within PTC Mathcad worksheets. There are wrapper libraries defined for both PTC Mathcad 15.0 and PTC Mathcad Prime 3.0. The CoolProp wrapper source code for PTC Mathcad is also open-source and distributed freely on the CoolProp website.
In addition to the source code, there are pre-compiled libraries (.dll files) for both PTC Mathcad 15.0 and PTC Mathcad Prime 3.0. The provided PTC Mathcad 15.0 .dll was compiled/built in a 32-bit environment. The provided PTC Mathcad Prime 3.0 library was compiled/built in a 64-bit environment. If using a PTC Mathcad environment other than the two mentioned, there are build-scripts and instructions distributed with the source code, enabling users to build the CoolProp wrapper library specific to their environment.
Wrapper of CoolProp for MathCAD 15
==================================
copyright Scott Polak and Ian Bell, 2013
To Use
======
* Copy the CoolPropMathcadWrapper.dll file to C:\\Program Files (x86)\\Mathcad\\Mathcad 15\\userefi or equivalent for your version
* Open the CoolPropFluidProperties.xmcd file in MathCAD, fields should populate
To Build
========
* You will need to have Visual Studio 2008 installed (Express version is fine). Alternatively newer versions of Microsoft Visual Studio C++ should be fine, you'll just have to update the path to the vcvarsall.bat in the BuildDLL.bat file
* Run the BuildDLL.bat file, it will generate the CoolPropMathcadWrapper.dll
* Follow the above instructions
Links:
1. CoolProp Website.
2. CoolProp for PTC Mathcad.
3. Download CoolProp-4.2.2-windows_superpack.zip ( 46.4 MB ).
CoolPropFluidProperties.sm (44 KiB) downloaded 497 time(s).
I'd like to include this in the portable distribution but so far I fail to do so. Putting coolprop.dll into the userefi directory does not seem to do the job.
efi.txt says
22.06.2014 00:28:26 [LoadLibraries] begin:
22.06.2014 00:28:26 [LoadLibraries] D:\FHB\Software\SMath\2014 06 21 SMath and Maxima\extensions\plugins\91a20d24-c30b-4774-9b1b-4d502a80420f\1.0.4977.35617\userefi\CoolProp.dll loaded.
22.06.2014 00:28:26 [CreateUserFunction] Psi - [DIGAMMA.DLL] [ z ] Digamma function for complex z
...
All functions in your example file are undefined.
Thanks for any hint.
To Use
======
* Copy the CoolPropMathcadWrapper.dll file to \\userefi or equivalent for your version
* Open the CoolPropFluidProperties.xmcd file in MathCAD, fields should populate
22.06.2014 10:18:04 [LoadLibraries] begin:
22.06.2014 10:18:04 [CreateUserFunction] FluidProp1 - [CoolPropMathcadWrapper.dll] [ Fluid, Property Name ] returns a fluid-specific parameter, where the parameter is not dependent on the fluid state
22.06.2014 10:18:04 [CreateUserFunction] FluidProp - [CoolPropMathcadWrapper.dll] [ Output Name, Input Name 1, Input Property 1, Input Name 2, Input Property 2, Fluid Name ] returns a fluid-specific parameter, where the parameter is dependent on the fluid state
22.06.2014 10:18:04 [CreateUserFunction] FluidPropI - [CoolPropMathcadWrapper.dll] [ Output Name, Input Name 1, Input Property 1, Input Name 2, Input Property 2, Fluid Name ] returns a fluid-specific parameter, where the parameter is dependent on the fluid state, using integer math for faster computation
22.06.2014 10:18:04 [CreateUserFunction] HAProp - [CoolPropMathcadWrapper.dll] [ Output Name, Input Name 1, Input Property 1, Input Name 2, Input Property 2, Input Name 3, Input Property 3 ] returns a parameter of humid air, where the parameter is dependent on the fluid state and humidity
22.06.2014 10:18:04 [CreateUserFunction] FluidPropsParams - [CoolPropMathcadWrapper.dll] [ string, name of the parameter to retrieve ] returns the value of the requested CoolProps parameter
22.06.2014 10:18:04 [LoadLibraries] C:\Users\User\AppData\Roaming\SMath\extensions\plugins\91a20d24-c30b-4774-9b1b-4d502a80420f\1.0.4977.35617\userefi\CoolPropMathcadWrapper.dll loaded.
22.06.2014 10:18:04 [CreateUserFunction] Psi - [DIGAMMA.DLL] [ z ] Digamma function for complex z
22.06.2014 10:18:04 [LoadLibraries] C:\Users\User\AppData\Roaming\SMath\extensions\plugins\91a20d24-c30b-4774-9b1b-4d502a80420f\1.0.4977.35617\userefi\DIGAMMA.DLL loaded.
22.06.2014 10:18:04 [CreateUserFunction] kronecker - [KRONECKR.DLL] [ M,N ] Kronecker product of a square matrix M and a square matrix N
22.06.2014 10:18:04 [LoadLibraries] C:\Users\User\AppData\Roaming\SMath\extensions\plugins\91a20d24-c30b-4774-9b1b-4d502a80420f\1.0.4977.35617\userefi\KRONECKR.DLL loaded.
22.06.2014 10:18:04 [LoadLibraries] end.
Wrote
All functions in your example file are undefined.
Thanks for any hint.
I used the wrong dll (from excel and dll subfolder).
Now the library seems to work. Just strSplit() is undefined.
Maxima has a function split(string, delimiter), however, due to a translation bug only the default delimiter (space) works. Therefore, the kommas have to be replaced by spaces first.
I tried to follow the instuctions on my linux system :
- Portable SMath and Maxima is installed successfully
- The CoolPropMathcadWrapper.dll was already in the userefi directory
- Efi plugin installed
However so far the CoolProp functions are not recognized.
Maybe its not possible to use CoolProp with SMath on Linux? As MathCAD doesn't run under Linux the following line given by Uni makes me think so:
* Open the CoolPropFluidProperties.xmcd file in MathCAD, fields should populate
If anybody managed to run it under linux I would be very interested.
Thanks,
Robert
WroteHello and thanks for the infos already given here.
I tried to follow the instuctions on my linux system :
- Portable SMath and Maxima is installed successfully
Do I get it right, you really got to work the Maxima plugin under linux? Could you please explain, how that was done?
Well, yes I am running the portable version (2014 08 24 SMath and Maxima) under Linux (Linux Mint 16 Petra). I so far did basic static calculations, that works but I don't know if the Maxima plugin is used... It couldn't have been easier to install it, I just followed the instructions. Sorry that I cant tell more but please just write me if you want more info or a kind of test.
Regards,
Robert
Wrote
Well, yes I am running the portable version (2014 08 24 SMath and Maxima) under Linux (Linux Mint 16 Petra). I so far did basic static calculations, that works but I don't know if the Maxima plugin is used... It couldn't have been easier to install it, I just followed the instructions. Sorry that I cant tell more but please just write me if you want more info or a kind of test.
There are some examples in the interactive handbook. Open the handbook via [?] button in the toolbar. Navigate to Mathematics> Symbolic Math with Maxima
If you get a pop-up window "Start Maxima" with a progress bar (not more than 20sec) and no errors in the math regions, then Maxima is running.
A quick test would be to type Maxima TAB a+b and evaluate that symbolically (-> button in the arithmetics palette).
Yet I do not expect Maxima to run, as it has never been tested under Linux in the development. Under linux, Maxima can hardly be run by starting maxima.bat, as done by the plugin. There might be a chance in wine, but I haven't heard of any success.
I tried what you suggested, and yes, I did't manage to run Maxima on my linux system although I can use SMath. It seems to me that there is something with the file system, because :
- When I declare the Maxima installation path, the program aborts
- In the /userefi directory there is no efi.txt file
My solution is simply to install Windows so that I can use SMath for my calculations.
Thanks for your hints and for that great program,
Robert
-
New Posts
-
No New Posts