Skip to content

mirokymac/propAPIne

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

propAPIne

A restful warpper for COOLPROP thermodynamic library.

Combinate with built-in APP SCRIPT to use NIST.REFPROP like functions in GOOGLE Sheet.

Thanks @ian bell for bring COOLPROP to us.

Deployment

Basic deployment

  1. Install Python3 on your hosting machine.

  2. Install require packages:

pip install -y CoolProp flask flask-restful

  1. Clone this respository:

git clone https://github.com/mirokymac/propAPIne.git

  1. Get into the Server directory to run app.py:

cd ./propAPIne/server && python3 app.py

  1. Expose port 22001 to client

  2. Using restful API client to connext to HOST:22001

Docker deployment

  1. Clone this respository:

git clone https://github.com/mirokymac/propAPIne.git

  1. Build docker image of the server and copy the docker-ID:

cd ./propAPIne/server_docker && docker build .

  1. Run docker:

cd .. && docker run -p 22001:22001 {docker-ID}

  1. Expose port 22001 to client

  2. Using restful API client to connext to HOST:22001

Enable REFPROP support

Thanks @ian bell again for CoolProp-REFPROP_backend and REFPROP-cmake

  1. Clone this respository: cd ~ && git clone https://github.com/mirokymac/propAPIne.git

  2. Copy FORTRAN directory to ./propAPIne/refprop_builder_docker.

  3. Make a directory build in ./propAPIne/refprop_builder_docker.

  4. Build REFPROP by: cd ~/propAPIne/refprop_builder_docker && docker build .

then copy the docker-ID: docker run -v $PWD/FORTRAN:/root/REFPROP-cmake/fortran -v $PWD/build:/root/REFPROP-cmake/build {docker-ID}

  1. copy build/librefprop.so to refprop\ of your "server" directory;

  2. copy fuilds and mixtures directories from NIST_REFPROP to refprop\.

  3. Restart your server.

** For docker, you need to link the refprop directory to your workdir.

About

Yet another RestfulAPI of COOLPROP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published