mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-23 03:00:17 -04:00
Merge branch 'develop'
This commit is contained in:
10
Web/conf.py
10
Web/conf.py
@@ -11,8 +11,8 @@
|
||||
#
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import sys, os
|
||||
|
||||
import sys, os, datetime
|
||||
|
||||
#~ # If your extensions are in another directory, add it here. If the directory
|
||||
#~ # is relative to the documentation root, use os.path.abspath to make it
|
||||
@@ -25,7 +25,7 @@ try:
|
||||
except ImportError:
|
||||
|
||||
print('Unable to import sphinxcontrib.doxylink; try to run "pip install sphinxcontrib-doxylink"')
|
||||
|
||||
|
||||
Release = tags.has('Release') or tags.has('Release')
|
||||
|
||||
if Release:
|
||||
@@ -90,8 +90,9 @@ source_encoding = 'utf-8'
|
||||
master_doc = 'contents'
|
||||
|
||||
# General information about the project.
|
||||
d = datetime.datetime.today()
|
||||
project = u'CoolProp'
|
||||
copyright = u'2012, Ian Bell'
|
||||
copyright = u'2010-{0}, Ian H. Bell and the CoolProp Team'.format(d.year)
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
@@ -105,6 +106,7 @@ version = ver.rsplit('.',1)[0]
|
||||
release = ver
|
||||
|
||||
extlinks = {'sfdownloads': ('http://sourceforge.net/projects/coolprop/files/CoolProp/'+release+'/%s',''),
|
||||
'sfnightly': ('http://sourceforge.net/projects/coolprop/files/CoolProp/nightly/%s',''),
|
||||
'bbbinaries': ('http://www.coolprop.dreamhosters.com:8010/binaries/%s',''),
|
||||
'bbsphinx': ('http://www.coolprop.dreamhosters.com:8010/sphinx/%s','')}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ C# Wrapper
|
||||
|
||||
Pre-compiled Binaries
|
||||
=====================
|
||||
Pre-compiled release binaries can be downloaded from :sfdownloads:`Csharp`. Development binaries coming from the buildbot server can be found at :bbbinaries:`Csharp`.
|
||||
Pre-compiled release binaries can be downloaded from :sfdownloads:`Csharp`. Development binaries coming from the buildbot server can be found at :sfnightly:`Csharp`.
|
||||
|
||||
To Use
|
||||
------
|
||||
@@ -24,7 +24,7 @@ At the command prompt, run::
|
||||
|
||||
where you might need to update the path to visual studio depending on your version installed. Use `-platform:x86` to tell C# that your DLL is 32-bit if you are on 32-bit, or `-platform:x64` if you are on 64-bit.
|
||||
|
||||
Alternatively, you can add all the .cs files to a visual studio project.
|
||||
Alternatively, you can add all the .cs files to a visual studio project.
|
||||
|
||||
Linux/OSX
|
||||
^^^^^^^^^
|
||||
|
||||
@@ -6,12 +6,12 @@ Delphi Wrapper
|
||||
|
||||
Delphi `(information) <http://www.embarcadero.com/products/delphi>`_ is a programming environment based on the Pascal language. It is used for doing GUI development and other general programming. There is an open-source equivalent of Delphi called `Lazarus <http://www.lazarus.freepascal.org/>`_ .
|
||||
|
||||
A very simple example of linking Lazarus and CoolProp can be found obtained by downloading the following 3 files:
|
||||
A very simple example of linking Lazarus and CoolProp can be found obtained by downloading the following 3 files:
|
||||
|
||||
* :download:`CoolPropDelphiExample.lpi`
|
||||
* :download:`CoolPropDelphiExample.lpr`
|
||||
* :download:`CoolPropDelphiExample.lps`
|
||||
|
||||
You will need to download the release shared library for your platform from :sfdownloads:`sourceforge <shared_library>` or the development version of the shared library from :bbbinaries:`the buildbot server <shared_library>`.
|
||||
You will need to download the release shared library for your platform from :sfdownloads:`sourceforge <shared_library>` or the development version of the shared library from :sfnightly:`the nightly snapshots <shared_library>`.
|
||||
|
||||
Open Lazarus and then open the project file you downloaded. Build and run. Place the downloaded shared library for CoolProp in the same folder with generated executable.
|
||||
@@ -11,7 +11,7 @@ Users
|
||||
|
||||
Install
|
||||
-------
|
||||
Pre-compiled binaries can be downloaded from :sfdownloads:`EES` - follow the instructions there. Of you can download an installer from the development server at :bbbinaries:`EES`.
|
||||
Pre-compiled binaries can be downloaded from :sfdownloads:`EES` - follow the instructions there. Of you can download an installer from the development preview at :sfnightly:`EES`.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
@@ -7,7 +7,7 @@ Excel Wrapper
|
||||
|
||||
Pre-compiled Binaries for windows
|
||||
=================================
|
||||
Pre-compiled release binaries can be downloaded from :sfdownloads:`MicrosoftExcel`. Development binaries coming from the buildbot server can be found at :bbbinaries:`MicrosoftExcel`.
|
||||
Pre-compiled release binaries can be downloaded from :sfdownloads:`MicrosoftExcel`. Development binaries coming from the buildbot server can be found at :sfnightly:`MicrosoftExcel`.
|
||||
|
||||
Download all the files. The basic protocol is:
|
||||
|
||||
@@ -30,11 +30,11 @@ Pre-compiled Binaries for OSX
|
||||
|
||||
Part 1:
|
||||
-------
|
||||
Download pre-compiled release binaries for OSX from :sfdownloads:`shared_library/Darwin/32bit__cdecl_calling_convention/`. Development binaries coming from the buildbot server can be found at :bbbinaries:`shared_library/Darwin/32bit__cdecl_calling_convention/`. Place the downloaded file called libCoolProp.dylib in the ${HOME}/lib folder (make this folder if needed).
|
||||
Download pre-compiled release binaries for OSX from :sfdownloads:`shared_library/Darwin/32bit__cdecl_calling_convention/`. Development binaries coming from the buildbot server can be found at :sfnightly:`shared_library/Darwin/32bit__cdecl_calling_convention/`. Place the downloaded file called libCoolProp.dylib in the ${HOME}/lib folder (make this folder if needed).
|
||||
|
||||
Part 2:
|
||||
-------
|
||||
Download the xlam from :sfdownloads:`MicrosoftExcel` or the development version from :bbbinaries:`MicrosoftExcel`.
|
||||
Download the xlam from :sfdownloads:`MicrosoftExcel` or the development version from :sfnightly:`MicrosoftExcel`.
|
||||
|
||||
1. Open Excel 2011 for Mac
|
||||
2. Go to the menu Tools-->Add-Ins
|
||||
|
||||
@@ -27,7 +27,7 @@ On windows, the most reliable mixed compilation seems to be using the mingw-prov
|
||||
>gcc --version
|
||||
gcc (GCC) 4.8.1
|
||||
Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
|
||||
|
||||
On OSX, the default compiler that comes with XCode is clang, gcc and g++ at the command prompt are just aliases to clang. See for instance::
|
||||
|
||||
$ gcc --version
|
||||
@@ -35,13 +35,13 @@ On OSX, the default compiler that comes with XCode is clang, gcc and g++ at the
|
||||
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
|
||||
Target: x86_64-apple-darwin13.3.0
|
||||
Thread model: posix
|
||||
|
||||
|
||||
The most reliable mixed compilation on linux seems to be with the true-gcc/g++ toolchain rather than clang+gfortran. To install gcc/g++, install gcc/g++ using homebrew with something like::
|
||||
|
||||
brew install gcc-4.9
|
||||
|
||||
|
||||
where you can change ``4.9`` to the most up to date version. Search `braumeister <http://braumeister.org/formula/gcc>`_ for the most recipe for gcc. Looks like ``gcc`` also works.
|
||||
|
||||
|
||||
.. _FORTRAN95:
|
||||
|
||||
FORTRAN 95/2003 using ISO_C_BINDING
|
||||
@@ -65,14 +65,14 @@ B) On Windows, the call to CMake should be done using the MinGW generator, but o
|
||||
mkdir gccstatic && cd gccstatic
|
||||
cmake ../.. -G "MinGW Makefiles" -DCOOLPROP_EXTERNC_STATIC_LIBRARY=ON -DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
cmake --build .
|
||||
|
||||
|
||||
C) On OSX, cmake must use the true, real, gcc/g++ compiler (not clang). Thus you must so something like this to make sure that it finds the right (true) gcc/g++ (see above)::
|
||||
|
||||
mkdir build && cd build
|
||||
mkdir gccstatic && cd gccstatic
|
||||
cmake ../.. -DCOOLPROP_EXTERNC_STATIC_LIBRARY=ON -DCMAKE_C_COMPILER="/usr/local/bin/gcc-4.9" -DCMAKE_CXX_COMPILER="/usr/local/bin/g++-4.9" -DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
cmake --build .
|
||||
|
||||
|
||||
If you are using a different version of gcc, change the version number for g++ and gcc
|
||||
|
||||
This will generate the file libCoolProp.a which is a GCC static library that can be linked with GCC/GFORTRAN code. Copy this .a file into the directory with the coolprop FORTRAN example ``cool_fortran_bind.f90``:
|
||||
@@ -83,7 +83,7 @@ This will generate the file libCoolProp.a which is a GCC static library that can
|
||||
program simple
|
||||
|
||||
USE cpinterface
|
||||
|
||||
|
||||
implicit none
|
||||
|
||||
!Initialize the variables used in the example
|
||||
@@ -97,13 +97,13 @@ This will generate the file libCoolProp.a which is a GCC static library that can
|
||||
n1 = "T"//CHAR(0) ! String with of the input Property #1
|
||||
n2 = "Q"//CHAR(0) ! String with of the input Property #2
|
||||
fluid = "Propane"//CHAR(0) ! String with the fluid name
|
||||
|
||||
|
||||
dens1 = PropsSI(out1, n1, T, n2, Q, fluid)
|
||||
|
||||
Print *, dens1
|
||||
|
||||
end program simple
|
||||
|
||||
|
||||
with the interface file ``cpinterface.f90``:
|
||||
|
||||
.. code-block:: fortran
|
||||
@@ -119,7 +119,7 @@ with the interface file ``cpinterface.f90``:
|
||||
character(c_char) :: name2(*)
|
||||
real(C_DOUBLE), VALUE :: prop2
|
||||
character(kind=c_char) :: fluidname(*)
|
||||
|
||||
|
||||
END FUNCTION PropsSI
|
||||
END INTERFACE
|
||||
END MODULE CPINTERFACE
|
||||
@@ -129,7 +129,7 @@ In order to link all the files together, do::
|
||||
gfortran -c -Wall cpinterface.f90 cool_fortran_bind.f90
|
||||
gcc -o main *.o libCoolProp.a -lstdc++ -ldl -lgfortran
|
||||
main
|
||||
|
||||
|
||||
On windows, you can leave off the ``-ldl``.
|
||||
|
||||
On OSX, you must do the linking stage with true gcc so that it finds the right standard library. Or alternatively, provide the full path to the libstdc++ static library and link with gfortran with something like::
|
||||
@@ -148,7 +148,7 @@ FORTRAN77
|
||||
Pre-Compiled Binaries
|
||||
---------------------
|
||||
|
||||
* Download the appropriate shared library for your architecture from from :sfdownloads:`shared_library`, or the development versions from the buildbot server at :bbbinaries:`shared_library`. Or you can built it yourself given the instructions at :ref:`shared_library`.
|
||||
* Download the appropriate shared library for your architecture from from :sfdownloads:`shared_library`, or the development versions from the buildbot server at :sfnightly:`shared_library`. Or you can built it yourself given the instructions at :ref:`shared_library`.
|
||||
|
||||
Run
|
||||
---
|
||||
@@ -177,16 +177,16 @@ Use the sample file ``example.for`` given by:
|
||||
call propssi(Output, Name1, Prop1, Name2, Prop2, Ref, outVal)
|
||||
write(*,*) "Result was: ", outVal/1e5, " bar"
|
||||
write(*,*) "-----------------------------------------------"
|
||||
|
||||
|
||||
end program
|
||||
|
||||
Place the shared library and the sample file in the same directory.
|
||||
Place the shared library and the sample file in the same directory.
|
||||
|
||||
On linux, build and run the example.for file with::
|
||||
|
||||
gfortran -g -o example example.for -L. -lCoolProp
|
||||
LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH example
|
||||
|
||||
|
||||
On windows, the current folder is always searched for DLL, so you can just do::
|
||||
|
||||
gfortran -g -o example example.for -L. -lCoolProp
|
||||
|
||||
@@ -6,7 +6,7 @@ Java Wrapper
|
||||
|
||||
Pre-compiled Binaries
|
||||
=====================
|
||||
Pre-compiled binaries can be downloaded from :sfdownloads:`Java`, which come from :bbbinaries:`the continuous development buildbot server <Java>`.
|
||||
Pre-compiled binaries can be downloaded from :sfdownloads:`Java`, which come from :sfnightly:`the nightly snapshots <Java>`.
|
||||
|
||||
Usage
|
||||
-----
|
||||
@@ -21,7 +21,7 @@ User-Compiled Binaries
|
||||
Common Requirements
|
||||
-------------------
|
||||
Compilation of the Java wrapper requires a few :ref:`common wrapper pre-requisites <wrapper_common_prereqs>`
|
||||
|
||||
|
||||
Linux & OSX
|
||||
-----------
|
||||
|
||||
@@ -30,9 +30,9 @@ Linux & OSX
|
||||
2. Expand the zip file you downloaded
|
||||
|
||||
3. Add the ``bin`` folder of the JDK that you installed. For instance, add this::
|
||||
|
||||
export /path/to/java/SDK/bin:$PATH
|
||||
|
||||
|
||||
export /path/to/java/SDK/bin:$PATH
|
||||
|
||||
to ``~/.profile`` where the path ``/path/to/java/SDK/bin`` points to the absolute path for the ``bin`` folder of your Java installation.
|
||||
|
||||
Windows
|
||||
@@ -58,15 +58,15 @@ Once the dependencies are installed, you can run the builder and tests using::
|
||||
make install
|
||||
# Run the integration tests
|
||||
ctest --extra-verbose
|
||||
|
||||
|
||||
If you want to change the package that CoolProp resides in, you can do so by changing the cmake call to read::
|
||||
|
||||
cmake .. -DCOOLPROP_JAVA_MODULE=ON -DBUILD_TESTING=ON -DCOOLPROP_SWIG_OPTIONS="-package package.name"
|
||||
|
||||
|
||||
where ``package.name`` is replaced with the desired name
|
||||
|
||||
|
||||
Windows (32-bit and 64-bit)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
You need to just slightly modify the building procedure::
|
||||
|
||||
@@ -86,5 +86,5 @@ You need to just slightly modify the building procedure::
|
||||
If you want to change the package that CoolProp resides in, you can do so by changing the cmake call to read::
|
||||
|
||||
cmake .. -DCOOLPROP_JAVA_MODULE=ON -DBUILD_TESTING=ON -DCOOLPROP_SWIG_OPTIONS="-package package.name"
|
||||
|
||||
|
||||
where ``package.name`` is replaced with the desired name
|
||||
@@ -8,7 +8,7 @@ Javascript Wrapper
|
||||
Pre-Compiled Binaries
|
||||
=====================
|
||||
|
||||
* Download the precompiled binaries from :sfdownloads:`Javascript`, or the development versions from the buildbot server at :bbbinaries:`Javascript`
|
||||
* Download the precompiled binaries from :sfdownloads:`Javascript`, or the development versions from the buildbot server at :sfnightly:`Javascript`
|
||||
|
||||
* Load your js file into your website, following the structure of `the example here <https://github.com/CoolProp/CoolProp/blob/master/wrappers/Javascript/index.html>`_, which is also included at the above download link
|
||||
|
||||
@@ -20,15 +20,15 @@ Linux
|
||||
We are following the instructions from `emscripten.org <http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html>`_ - download the portable emscripten SDK `emsdk` for linux.
|
||||
|
||||
1. First download node.js, clang++ and llvm using::
|
||||
|
||||
|
||||
sudo apt-get install nodejs clang++ llvm
|
||||
|
||||
|
||||
2. Expand the SDK zip file linked above
|
||||
|
||||
3. At the console in the folder that contains the file emsdk run the commands::
|
||||
|
||||
emsdk update # This will fetch the list of things to download
|
||||
|
||||
|
||||
emsdk install latest # This will download and install the full toolchain
|
||||
|
||||
4. Go enjoy a nice walk or a cup of coffee - it will be a while
|
||||
@@ -36,7 +36,7 @@ We are following the instructions from `emscripten.org <http://kripken.github.io
|
||||
5. Activate the SDK just compiled::
|
||||
|
||||
emsdk activate latest # This will make the file ~/.emscripten with the paths to most of the binaries compiled in SDK
|
||||
|
||||
|
||||
6. Modify the file ``~/.emscripten`` to make NODE_JS path equal to ``which nodejs`` if it doesn't already
|
||||
|
||||
7. Make an environmental variable (in ~/.profile) ``export EMSCRIPTEN=/path/to/emsdk`` that points to the folder that contains ``emc++``, ``emcc``, etc.
|
||||
@@ -44,11 +44,11 @@ We are following the instructions from `emscripten.org <http://kripken.github.io
|
||||
8. Check out coolprop::
|
||||
|
||||
git clone https://github.com/CoolProp/CoolProp --recursive
|
||||
|
||||
|
||||
9. Folder creating::
|
||||
|
||||
mkdir -p build && cd build
|
||||
|
||||
|
||||
10. Build the Javascript module::
|
||||
|
||||
cmake .. -DCOOLPROP_JAVASCRIPT_MODULE=ON -DCMAKE_TOOLCHAIN_FILE=${EMSCRIPTEN}/cmake/Platform/Emscripten.cmake
|
||||
|
||||
@@ -13,14 +13,14 @@ Pre-compiled Binaries for windows
|
||||
Shared library
|
||||
--------------
|
||||
|
||||
You will need to download the release shared library for windows from :sfdownloads:`sourceforge <shared_library/Windows>` or the development version of the shared library from :bbbinaries:`the buildbot server <shared_library/Windows>`. If you are on 32-bit windows, download the __cdecl version. For 64-bit, there is only one calling convention.
|
||||
You will need to download the release shared library for windows from :sfdownloads:`sourceforge <shared_library/Windows>` or the development version of the shared library from :sfnightly:`the buildbot server <shared_library/Windows>`. If you are on 32-bit windows, download the __cdecl version. For 64-bit, there is only one calling convention.
|
||||
|
||||
Place the downloaded shared library next to your library
|
||||
|
||||
Available libraries
|
||||
-------------------
|
||||
|
||||
:download:`CoolProp.vi` :
|
||||
:download:`CoolProp.vi` :
|
||||
Basic Library to get the properties from CoolProp.dll
|
||||
|
||||
:download:`CoolProp.llb` :
|
||||
@@ -59,14 +59,14 @@ Add this line to /etc/apt/sources.list to add the repository::
|
||||
|
||||
Add the maintainer key for the repository::
|
||||
|
||||
sudo wget http://debian.repo.frc.s3.amazonaws.com/rbmj.gpg.key
|
||||
sudo wget http://debian.repo.frc.s3.amazonaws.com/rbmj.gpg.key
|
||||
sudo apt-key add rbmj.gpg.key
|
||||
|
||||
Run the following commands::
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install gcc-powerpc-wrs-vxworks
|
||||
|
||||
|
||||
Set the WIND_BASE environmental variable (or add to ~/.profile)::
|
||||
|
||||
export WIND_BASE=/usr/powerpc-wrs-vxworks/wind_base
|
||||
@@ -143,6 +143,6 @@ These are the instructions to build from source manually. Note that some lines b
|
||||
--disable-symvers \
|
||||
CFLAGS_FOR_TARGET='-mstrict-align -mlongcall -g -O2' \
|
||||
CXXFLAGS_FOR_TARGET='-mstrict-align -mlongcall -g -O2'
|
||||
|
||||
|
||||
$ make -j4
|
||||
# make install
|
||||
|
||||
@@ -8,7 +8,7 @@ LibreOffice Wrapper
|
||||
Windows using DLL (shared library)
|
||||
----------------------------------
|
||||
|
||||
A very simple example can be found here: :download:`TestLibreOffice.ods`. You will need to download the release 32-bit __stdcall shared library for windows from :sfdownloads:`sourceforge <shared_library/Windows/32bit__stdcall_calling_convention>` or from :bbbinaries:`the development server <shared_library/Windows/32bit__stdcall_calling_convention>`. Place the downloaded DLL in c:\\CoolProp
|
||||
A very simple example can be found here: :download:`TestLibreOffice.ods`. You will need to download the release 32-bit __stdcall shared library for windows from :sfdownloads:`sourceforge <shared_library/Windows/32bit__stdcall_calling_convention>` or from :sfnightly:`the development snapshots <shared_library/Windows/32bit__stdcall_calling_convention>`. Place the downloaded DLL in c:\\CoolProp
|
||||
|
||||
Linux using python
|
||||
------------------
|
||||
@@ -17,20 +17,20 @@ Linux using python
|
||||
|
||||
2. At the command prompt do something like::
|
||||
|
||||
# Make a folder for the script to reside in
|
||||
mkdir -p ~/.config/libreoffice/4/user/Scripts/python/
|
||||
# Copy the dowloaded .py file to the folder you made (adjust download path as necessary)
|
||||
cp ~/Downloads/coolprop.py ~/.config/libreoffice/4/user/Scripts/python/
|
||||
# Make a folder for the script to reside in
|
||||
mkdir -p ~/.config/libreoffice/4/user/Scripts/python/
|
||||
# Copy the dowloaded .py file to the folder you made (adjust download path as necessary)
|
||||
cp ~/Downloads/coolprop.py ~/.config/libreoffice/4/user/Scripts/python/
|
||||
|
||||
# Install python script provider (uses python 3)
|
||||
sudo apt-get install libreoffice-script-provider-python
|
||||
# pyton scripting in LibreOffice uses python3, make sure we populate the right python site-packages folder
|
||||
sudo apt-get install python3-pip
|
||||
sudo pip3 install Cython
|
||||
# Compile CoolProp v5+ manually
|
||||
# you need to have numpy and matplotlib already - you can do sudo apt-get install python3-matplotlib
|
||||
git clone http://github.com/CoolProp/CoolProp --recursive
|
||||
cd CoolProp/wrappers/Python
|
||||
sudo python3 setup.py install
|
||||
# Install python script provider (uses python 3)
|
||||
sudo apt-get install libreoffice-script-provider-python
|
||||
# pyton scripting in LibreOffice uses python3, make sure we populate the right python site-packages folder
|
||||
sudo apt-get install python3-pip
|
||||
sudo pip3 install Cython
|
||||
# Compile CoolProp v5+ manually
|
||||
# you need to have numpy and matplotlib already - you can do sudo apt-get install python3-matplotlib
|
||||
git clone http://github.com/CoolProp/CoolProp --recursive
|
||||
cd CoolProp/wrappers/Python
|
||||
sudo python3 setup.py install
|
||||
|
||||
3. Open example in LibreOffice
|
||||
@@ -6,7 +6,7 @@ MATLAB Wrapper
|
||||
|
||||
Pre-compiled Binaries
|
||||
=====================
|
||||
Release versions of the MATLAB wrapper can be downloaded from :sfdownloads:`MATLAB` for your architecture, or from the development buildbot server at :bbbinaries:`MATLAB`. Whichever one you pick, make sure all the files come from the same place.
|
||||
Release versions of the MATLAB wrapper can be downloaded from :sfdownloads:`MATLAB` for your architecture, or from the development snapshots at :sfnightly:`MATLAB`. Whichever one you pick, make sure all the files come from the same place.
|
||||
|
||||
Download the +CoolProp.7z file and extract it using the `7-zip <http://www.7-zip.org/download.html>`_ program. Make sure that when you expand it, there are no +CoolProp intermediate folders generated. Place the mex file that is appropriate to the version of MATLAB in the directory that contains the directory +CoolProp. You can determine what version of matlab you have by running the command ``computer('arch')`` at the MATLAB command prompt. Depending on the output, you will need to download one of the following mex files:
|
||||
|
||||
@@ -26,7 +26,7 @@ When you are finished, you should have a folder layout like::
|
||||
|- AbstractState.m
|
||||
|- DmassHmass_INPUTS.m
|
||||
|- ...
|
||||
|
||||
|
||||
Then you need to add the main that contains the +CoolProp folder to the path in MATLAB
|
||||
|
||||
Example: adding the folder main that contains CoolProp files to the MATLAB path::
|
||||
@@ -65,13 +65,13 @@ On linux and OSX, you can simply run the script dev/scripts/build_swig_matlab.py
|
||||
For windows, its pretty much the same story, except that swig has to be cross-compiled from a linux (debian-based OS are good) host. Install all the mingw packages in Synaptic, and then run the build script like::
|
||||
|
||||
python build_swig_matlab.py --windows
|
||||
|
||||
|
||||
which should hopefully yield the binaries in dev/scripts/swig-matlab/swig-matlab-bin.
|
||||
|
||||
Common Requirements
|
||||
-------------------
|
||||
Compilation of the MATLAB wrapper requires a few :ref:`common wrapper pre-requisites <wrapper_common_prereqs>`
|
||||
|
||||
|
||||
Linux
|
||||
-----
|
||||
|
||||
@@ -112,7 +112,7 @@ Once the dependencies are installed, you can run the builder and tests using::
|
||||
SWIG_LIB=swig-matlab-bin/share/swig/3.0.3 make install
|
||||
|
||||
Windows (32-bit and 64-bit)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
You need to just slightly modify the building procedure::
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
Maple Wrapper
|
||||
*************
|
||||
|
||||
A very simple example can be found here: :download:`sample_file.mw`. You will need to download the release 64-bit shared library for windows from :sfdownloads:`sourceforge <shared_library/Windows/64bit>` or the development version of the shared library from :bbbinaries:`the buildbot server <shared_library/Windows/64bit>`.
|
||||
A very simple example can be found here: :download:`sample_file.mw`. You will need to download the release 64-bit shared library for windows from :sfdownloads:`sourceforge <shared_library/Windows/64bit>` or the development version of the shared library from :sfnightly:`the snapshot server <shared_library/Windows/64bit>`.
|
||||
|
||||
Place the downloaded DLL in c:\\CoolProp and rename to CoolProp_x64.dll
|
||||
|
||||
On other platforms, the protocol should be more or less the same. Download a DLL appropriate to the version of Maple you are using from :sfdownloads:`sourceforge <shared_library>` or the development version from :bbbinaries:`buildbot server <shared_library>`. You will probably need to change the path to the shared library in the Maple file, but aside from that, it should work fine. File an issue at `github issues <https://github.com/CoolProp/CoolProp/issues>`_ if that is not the case.
|
||||
On other platforms, the protocol should be more or less the same. Download a DLL appropriate to the version of Maple you are using from :sfdownloads:`sourceforge <shared_library>` or the development version from :sfnightly:`the nightly snapshots <shared_library>`. You will probably need to change the path to the shared library in the Maple file, but aside from that, it should work fine. File an issue at `github issues <https://github.com/CoolProp/CoolProp/issues>`_ if that is not the case.
|
||||
|
||||
A more in-depth example has been put together by the Maple Enginers: :download:`Analysis of a Refrigeration Cycle with CoolProp.mw`
|
||||
@@ -6,7 +6,7 @@ Octave Wrapper
|
||||
|
||||
Pre-compiled Binaries
|
||||
=====================
|
||||
Pre-compiled release binaries can be downloaded from :sfdownloads:`Octave`. Development binaries coming from the buildbot server can be found at :bbbinaries:`Octave`. Download the oct file appropriate to your system.
|
||||
Pre-compiled release binaries can be downloaded from :sfdownloads:`Octave`. Development binaries coming from the buildbot server can be found at :sfnightly:`Octave`. Download the oct file appropriate to your system.
|
||||
|
||||
On Linux systems you can put the generated .oct file in
|
||||
``/usr/share/octave/?octave.version.number?/m`` folder. You will need superuser
|
||||
@@ -18,7 +18,7 @@ If you place .oct file somewhere outside octave path, you have to use
|
||||
Example: adding the folder that contains CoolProp.oct file to the Octave path::
|
||||
|
||||
addpath('/home/?user_name?/Some_folder/CoolProp')
|
||||
|
||||
|
||||
User-Compiled Binaries
|
||||
======================
|
||||
|
||||
@@ -30,7 +30,7 @@ Octave Requirements
|
||||
-------------------
|
||||
* SWIG
|
||||
* Octave (and development headers)
|
||||
|
||||
|
||||
Linux
|
||||
-----
|
||||
|
||||
@@ -75,7 +75,7 @@ Once the dependencies are installed, you can run the builder and tests using::
|
||||
On windows, you need to just slightly modify the building procedure::
|
||||
|
||||
# The folder containing the folders bin, mingw, include, etc. (or set a system variable in your windows installation)
|
||||
set OCTAVE_ROOT=c:\path\to\octave\root
|
||||
set OCTAVE_ROOT=c:\path\to\octave\root
|
||||
# Add the bin folder of your octave install to the system path
|
||||
set PATH=c:\path\to\octave\bin;%PATH%
|
||||
# Check out the sources for CoolProp
|
||||
|
||||
@@ -7,20 +7,20 @@ PHP Wrapper
|
||||
Pre-Compiled Binaries
|
||||
=====================
|
||||
|
||||
* Download the shared library for your architecture from :sfdownloads:`PHP`, or from the development buildbot server at :bbbinaries:`PHP`. Also download the CoolProp.php platform-independent file. Or build it yourself (see below)
|
||||
* Download the shared library for your architecture from :sfdownloads:`PHP`, or from the development buildbot server at :sfnightly:`PHP`. Also download the CoolProp.php platform-independent file. Or build it yourself (see below)
|
||||
|
||||
* Copy the libCoolProp.so file into the extension-dir for php::
|
||||
|
||||
sudo cp libCoolProp.so `php-config --extension-dir`
|
||||
|
||||
|
||||
This copies the shared library into a location that PHP can load. sudo is needed to make the copy. Alternatively, in the following step you will need to use the full path to the extension, which is just a bit more annoying.
|
||||
|
||||
|
||||
Put the CoolProp.php with the rest of your sources. This is the interface file between your PHP code and the CoolProp module.
|
||||
|
||||
* Modify the PHP.ini file that PHP will load to add::
|
||||
|
||||
extension = "CoolProp.so"
|
||||
|
||||
extension = "CoolProp.so"
|
||||
|
||||
after ``[PHP]``. If you didn't copy libCoolProp.so into the folder given by ```php-config --extension-dir``` you will need to use the absolute path
|
||||
|
||||
* You can determine the php.ini file that you should be modifying by creating a file on the server with the contents
|
||||
@@ -30,7 +30,7 @@ Pre-Compiled Binaries
|
||||
<?php
|
||||
phpinfo();
|
||||
?>
|
||||
|
||||
|
||||
Modify the file given by ``Loaded Configuration File``.
|
||||
|
||||
* To enable some useful debugging at runtime (turn off for deployment), you can add
|
||||
@@ -46,10 +46,10 @@ Pre-Compiled Binaries
|
||||
* This stub file shows how to call the module
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
|
||||
<?php
|
||||
require "CoolProp.php";
|
||||
|
||||
|
||||
$p = 101325;
|
||||
$Q = 1.0;
|
||||
$T = PropsSI("T","P",$p,"Q",$Q,"Water");
|
||||
@@ -75,11 +75,11 @@ Linux
|
||||
1. Check out coolprop::
|
||||
|
||||
git clone https://github.com/CoolProp/CoolProp --recursive
|
||||
|
||||
|
||||
2. Folder creating::
|
||||
|
||||
mkdir -p CoolProp/build && cd CoolProp/build
|
||||
|
||||
|
||||
3. Build the php module::
|
||||
|
||||
cmake .. -DCOOLPROP_PHP_MODULE=ON
|
||||
@@ -87,7 +87,7 @@ Linux
|
||||
4. Build (verbosely so we can see if there are any problems)::
|
||||
|
||||
make VERBOSE=1
|
||||
|
||||
|
||||
This will generate the file libCoolProp.so and the php module CoolProp.php
|
||||
|
||||
|
||||
5. See the above instructions in the Pre-Compiled Binaries section for installation instructions
|
||||
@@ -7,14 +7,15 @@ Python Wrapper
|
||||
Automatic installation
|
||||
======================
|
||||
|
||||
Using the ``pip`` installation program, you can install CoolProp v5 from the development server using::
|
||||
|
||||
pip install --find-links http://www.coolprop.dreamhosters.com:8010/binaries/Python/ -U --force-reinstall CoolProp
|
||||
|
||||
Or the official release can be obtained from the pypi server using::
|
||||
Using the ``pip`` installation program, you can install the official release can be obtained from the pypi server using::
|
||||
|
||||
pip install CoolProp
|
||||
|
||||
or the latest version from the development server using::
|
||||
|
||||
pip install --find-links http://www.coolprop.dreamhosters.com:8010/binaries/Python/ -U --force-reinstall CoolProp
|
||||
|
||||
|
||||
Manual installation
|
||||
===================
|
||||
|
||||
@@ -33,9 +34,9 @@ Then, follow the commands::
|
||||
# Start the installation
|
||||
sudo python setup.py install
|
||||
|
||||
If you would like to install CoolProp just for a given version of Python (for
|
||||
example if ``python`` links to ``python3.4`` and you also have a ``python2.7``
|
||||
executable), simply use this version of python to execute the ``setup.py``
|
||||
If you would like to install CoolProp just for a given version of Python (for
|
||||
example if ``python`` links to ``python3.4`` and you also have a ``python2.7``
|
||||
executable), simply use this version of python to execute the ``setup.py``
|
||||
script::
|
||||
|
||||
sudo python2.7 setup.py install
|
||||
@@ -43,7 +44,7 @@ script::
|
||||
Local installation
|
||||
------------------
|
||||
|
||||
If you prefer not to be sudoer when compiling coolprop on Linux/MacOS, you can
|
||||
If you prefer not to be sudoer when compiling coolprop on Linux/MacOS, you can
|
||||
also install it locally using the ``--user`` switch::
|
||||
|
||||
# Check out the sources for CoolProp
|
||||
@@ -52,19 +53,19 @@ also install it locally using the ``--user`` switch::
|
||||
cd CoolProp/wrappers/Python
|
||||
# Start the installation
|
||||
python setup.py install --user
|
||||
|
||||
|
||||
For Pyzo users
|
||||
--------------
|
||||
|
||||
Suppose the directory containing pyzo is on your Desktop in
|
||||
``~/Desktop/pyzo2014a/``. Then you can install CoolProp to be used within pyzo
|
||||
Suppose the directory containing pyzo is on your Desktop in
|
||||
``~/Desktop/pyzo2014a/``. Then you can install CoolProp to be used within pyzo
|
||||
by following the same lines as above::
|
||||
|
||||
# Check out the sources for CoolProp
|
||||
git clone https://github.com/CoolProp/CoolProp --recursive
|
||||
# Move into the folder you just created
|
||||
cd CoolProp/wrappers/Python
|
||||
# Start the installation (~/Desktop/pyzo2014a/ to be changed according to
|
||||
# Start the installation (~/Desktop/pyzo2014a/ to be changed according to
|
||||
# your effective installation)
|
||||
sudo ~/Desktop/pyzo2014a/bin/python setup.py install
|
||||
|
||||
@@ -78,8 +79,8 @@ Once installed, you can use CoolProp for various things:
|
||||
import CoolProp.CoolProp as CP
|
||||
fluid = 'Water'
|
||||
pressure_at_critical_point = CP.PropsSI(fluid,'pcrit')
|
||||
# Massic volume (in m^3/kg) is the inverse of density
|
||||
# (or volumic mass in kg/m^3). Let's compute the massic volume of liquid
|
||||
# Massic volume (in m^3/kg) is the inverse of density
|
||||
# (or volumic mass in kg/m^3). Let's compute the massic volume of liquid
|
||||
# at 1bar (1e5 Pa) of pressure
|
||||
vL = 1/CP.PropsSI('D','P',1e5,'Q',0,fluid)
|
||||
# Same for saturated vapor
|
||||
@@ -91,11 +92,11 @@ Once installed, you can use CoolProp for various things:
|
||||
ph_plot = CPP.PropsPlot('Water','Ph')
|
||||
ph_plot.savefig('enthalpy_pressure_graph_for_Water.png')
|
||||
|
||||
* Solve `thermodynamics exercices`_
|
||||
* Solve `thermodynamics exercices`_
|
||||
|
||||
* Make you own `more complex graphs`_ if you feel the graphing interface is lacking something
|
||||
|
||||
* Make even more complex graphs using `3D stuff`_
|
||||
* Make even more complex graphs using `3D stuff`_
|
||||
|
||||
.. _thermodynamics exercices: https://github.com/jjfPCSI1/py4phys/blob/master/lib/T6_resolution_cycle_diesel.py
|
||||
.. _more complex graphs: https://github.com/jjfPCSI1/py4phys/blob/master/lib/T6_diagramme_Ph_coolprop.py
|
||||
|
||||
@@ -19,7 +19,7 @@ There are a few things that need to be considered when determining what shared l
|
||||
Pre-Compiled Binaries
|
||||
======================
|
||||
|
||||
Download the appropriate shared library for your architecture from from :sfdownloads:`shared_library`, or the development versions from the buildbot server at :bbbinaries:`shared_library`.
|
||||
Download the appropriate shared library for your architecture from from :sfdownloads:`shared_library`, or the development versions from the buildbot server at :sfnightly:`shared_library`.
|
||||
|
||||
User-Compiled Binaries
|
||||
======================
|
||||
@@ -30,7 +30,7 @@ Compilation of a shared library requires a few :ref:`common wrapper pre-requisit
|
||||
|
||||
Windows
|
||||
-------
|
||||
On windows, the greatest amount of complexity is experienced.
|
||||
On windows, the greatest amount of complexity is experienced.
|
||||
|
||||
Your compiler options are:
|
||||
|
||||
@@ -55,41 +55,41 @@ You can select the compiler in the call to cmake below.
|
||||
cd CoolProp
|
||||
# Make a build folder
|
||||
mkdir build && cd build
|
||||
|
||||
2. Generate the build file. Here is where it gets complicated.
|
||||
|
||||
2. Generate the build file. Here is where it gets complicated.
|
||||
|
||||
A. If you use MinGW, these are your options:
|
||||
|
||||
For 64-bit DLL::
|
||||
|
||||
cmake .. -DCOOLPROP_64BIT_SHARED_LIBRARY=ON -G "MinGW Makefiles"
|
||||
|
||||
|
||||
For 32-bit __stdcall DLL::
|
||||
|
||||
|
||||
cmake .. -DCOOLPROP_32BIT_STDCALL_SHARED_LIBRARY=ON -G "MinGW Makefiles"
|
||||
|
||||
|
||||
For 32-bit __cdecl DLL::
|
||||
|
||||
|
||||
cmake .. -DCOOLPROP_32BIT_CDECL_SHARED_LIBRARY=ON -G "MinGW Makefiles"
|
||||
|
||||
|
||||
B. If you use Visual Studio, you will need to replace the visual studio version with the version that you are using. Running the command ``cmake`` at the command prompt will tell you what generators are supported
|
||||
|
||||
|
||||
For 64-bit DLL (Watch out for the 64-bit flag with Win64)::
|
||||
|
||||
cmake .. -DCOOLPROP_64BIT_SHARED_LIBRARY=ON -G "Visual Studio 10 2010 Win64"
|
||||
|
||||
|
||||
For 32-bit __stdcall DLL::
|
||||
|
||||
|
||||
cmake .. -DCOOLPROP_32BIT_STDCALL_SHARED_LIBRARY=ON -G "Visual Studio 10 2010"
|
||||
|
||||
|
||||
For 32-bit __cdecl DLL::
|
||||
|
||||
|
||||
cmake .. -DCOOLPROP_32BIT_CDECL_SHARED_LIBRARY=ON -G "Visual Studio 10 2010"
|
||||
|
||||
|
||||
3. Do the build::
|
||||
|
||||
cmake --build . --config Release
|
||||
|
||||
|
||||
If you are using MinGW, you can leave off the ``--config Release``, the default build configuration is release
|
||||
|
||||
Linux & OSX
|
||||
@@ -109,7 +109,7 @@ For 32-bit compilation::
|
||||
cmake .. -DCOOLPROP_32BIT_STDCALL_SHARED_LIBRARY=ON
|
||||
# Build
|
||||
cmake --build .
|
||||
|
||||
|
||||
For 64-bit compilation::
|
||||
|
||||
# Check out the sources for CoolProp
|
||||
|
||||
@@ -10,7 +10,7 @@ When writing your own C++ code, it is advised to compile CoolProp to a static li
|
||||
|
||||
Pre-compiled Binaries
|
||||
=====================
|
||||
Pre-compiled release binaries can be downloaded from :sfdownloads:`static_library`. Development binaries coming from the buildbot server can be found at :bbbinaries:`static_library`. These static libraries are only useful if the compiler used to make the static library agrees with the static library that will be used to build your other code. So best to follow the below instructions to build your own static library.
|
||||
Pre-compiled release binaries can be downloaded from :sfdownloads:`static_library`. Development binaries coming from the buildbot server can be found at :sfnightly:`static_library`. These static libraries are only useful if the compiler used to make the static library agrees with the static library that will be used to build your other code. So best to follow the below instructions to build your own static library.
|
||||
|
||||
User-Compiled Binaries
|
||||
======================
|
||||
|
||||
@@ -51,9 +51,11 @@ if [ "$DRYRUN" != "false" ]; then
|
||||
RSYNC_DRY_RUN=--dry-run
|
||||
else
|
||||
if [ "$CPVERSION" = "nightly" ]; then
|
||||
RSYNC_OPTS="-a --no-perms -z --stats --delete"
|
||||
rm -rf "$BINFOLDER/docs"
|
||||
CPVERSION="$CPVERSION"/$(date +%F)
|
||||
CPVERSION="$CPVERSION"/ #$(date +%F)
|
||||
else
|
||||
RSYNC_OPTS="-a --no-perms -z --stats"
|
||||
echo " "
|
||||
echo $SEPARATOR
|
||||
echo "Zipping up the docs and moving them into the $BINFOLDER folder for staging"
|
||||
@@ -70,7 +72,6 @@ fi
|
||||
echo " "
|
||||
echo $SEPARATOR
|
||||
echo "Copying the binaries to SourceForge"
|
||||
RSYNC_OPTS="-a --no-perms -z --stats"
|
||||
rsync $RSYNC_DRY_RUN $RSYNC_OPTS "$BINFOLDER/" frs.sf.net-$SFUSER:/home/frs/project/coolprop/CoolProp/$CPVERSION
|
||||
if [ ${CPVERSION:0:7} != "nightly" ]; then
|
||||
echo " "
|
||||
|
||||
@@ -1,18 +1,34 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
#rsync -aP jorritw@frs.sourceforge.net:/home/frs/project/coolprop/ /home/jorrit/tmp/sourceforge/
|
||||
# Scan the tree and change the folder date to the date
|
||||
# of the oldest file in it
|
||||
#for DIR in /home/jorrit/tmp/sourceforge/CoolProp/*/; do
|
||||
for DIR in ../coolprop/CoolProp/*/; do
|
||||
NEWEST=$(find "$DIR" ! -type d -printf "%T@ %p\n" | sort -n | tail -n1)
|
||||
FDATE=${NEWEST:0:10}
|
||||
FNAME=${NEWEST:22}
|
||||
echo "$DIR: $(date -d @$FDATE +%F) of $FNAME"
|
||||
touch -r "$FNAME" "$DIR"*
|
||||
# Process all directories in the same way
|
||||
function processDirectory {
|
||||
local DIR="$1"
|
||||
local EXT="$2"
|
||||
mv "$DIR" "$DIR-$EXT"
|
||||
mkdir "$DIR"
|
||||
mv "$DIR-$EXT"/* "$DIR"
|
||||
rm -r "$DIR-$EXT"
|
||||
local NEWEST=$(find "$DIR" ! -type d -printf "%T@ %p\n" | sort -n | tail -n1)
|
||||
local FDATE=${NEWEST:0:10}
|
||||
local FNAME=${NEWEST:22}
|
||||
echo "$DIR - $EXT: $(date -d @$FDATE +%F) of $FNAME"
|
||||
touch -r "$FNAME" "$DIR"
|
||||
return 0
|
||||
}
|
||||
#
|
||||
BASEDIR="/home/frs/project/coolprop/CoolProp"
|
||||
# Start with the nightly builds, they are to remain at the bottom
|
||||
DIRLIST=( "$BASEDIR/nightly/" )
|
||||
for DIR in $BASEDIR/[0-9]*/; do
|
||||
DIRLIST+=( "$DIR" )
|
||||
done
|
||||
# #
|
||||
# #rsync -a -f"+ */" -f"- *" /home/jorrit/tmp/sourceforge/ jorritw@frs.sourceforge.net:/home/frs/project/coolprop/
|
||||
# rsync -t /home/jorrit/tmp/sourceforge/ jorritw@frs.sourceforge.net:/home/frs/project/coolprop/
|
||||
#rsync -rtcv -f"+ */" -f"- *" /home/jorrit/tmp/sourceforge/ jorritw@frs.sourceforge.net:/home/frs/project/coolprop/
|
||||
#
|
||||
EXT=$(date +%F)
|
||||
#
|
||||
for DIR in "${DIRLIST[@]}"; do
|
||||
sleep 1
|
||||
DIR=${DIR:0:${#DIR}-1}
|
||||
processDirectory "$DIR" "$EXT"
|
||||
done
|
||||
#
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user