Remove old octave files

This commit is contained in:
Ian Bell
2015-11-12 16:05:44 -05:00
parent d308920a12
commit 13f0692feb
2 changed files with 0 additions and 155 deletions

View File

@@ -1,90 +0,0 @@
% Example of CoolProp for Octave
% Ian Bell, 2013
CoolProp
disp(['CoolProp version: ', CoolProp.get_global_param_string('version')])
disp(['CoolProp gitrevision: ', CoolProp.get_global_param_string('gitrevision')])
disp(['CoolProp fluids: ', CoolProp.get_global_param_string('FluidsList')])
disp(' ')
disp('************ USING EOS *************')
disp(' ')
disp('FLUID STATE INDEPENDENT INPUTS')
disp(['Critical Density Propane: ', num2str(CoolProp.Props1('Propane','rhocrit')), ' kg/m^3'])
disp(['TWO PHASE INPUTS (Pressure)'])
disp(['Density of saturated liquid Propane at 101.325 kPa: ', num2str(CoolProp.Props('D','P',101.325,'Q',0,'Propane')), ' kg/m^3'])
disp(['Density of saturated vapor R290 at 101.325 kPa: ', num2str(CoolProp.Props('D','P',101.325,'Q',1,'R290')), ' kg/m^3'])
disp(['TWO PHASE INPUTS (Temperature)'])
disp(['Density of saturated liquid Propane at 300 K: ', num2str(CoolProp.Props('D','T',300,'Q',0,'Propane')), ' kg/m^3'])
disp(['Density of saturated vapor R290 at 300 K: ', num2str(CoolProp.Props('D','T',300,'Q',1,'R290')), ' kg/m^3'])
disp(['SINGLE PHASE CYCLE (propane)'])
p = CoolProp.Props('P','T',300,'D',1,'Propane');
h = CoolProp.Props('H','T',300,'D',1,'Propane');
disp(['T,D -> P,H ', num2str(300),',',num2str(1), ' --> ',num2str(p),',',num2str(h)])
T = CoolProp.Props('T','P',p,'H',h,'Propane');
D = CoolProp.Props('D','P',p,'H',h,'Propane');
disp(['P,H -> T,D', num2str(p),',',num2str(h),'-->',num2str(T),',',num2str(D)])
disp([' '])
disp(['************ USING TTSE ***************'])
disp([' '])
CoolProp.enable_TTSE_LUT('Propane');
disp(['TWO PHASE INPUTS (Pressure)'])
disp(['Density of saturated liquid Propane at 101.325 kPa: ', num2str(CoolProp.Props('D','P',101.325,'Q',0,'Propane')), ' kg/m^3'])
disp(['Density of saturated vapor R290 at 101.325 kPa: ', num2str(CoolProp.Props('D','P',101.325,'Q',1,'R290')), ' kg/m^3'])
disp(['TWO PHASE INPUTS (Temperature)'])
disp(['Density of saturated liquid Propane at 300 K: ', num2str(CoolProp.Props('D','T',300,'Q',0,'Propane')), ' kg/m^3'])
disp(['Density of saturated vapor R290 at 300 K: ', num2str(CoolProp.Props('D','T',300,'Q',1,'R290')), ' kg/m^3'])
disp(['SINGLE PHASE CYCLE (propane)'])
p = CoolProp.Props('P','T',300,'D',1,'Propane');
h = CoolProp.Props('H','T',300,'D',1,'Propane');
disp(['T,D -> P,H ', num2str(300),',',num2str(1), ' --> ',num2str(p),',',num2str(h)])
T = CoolProp.Props('T','P',p,'H',h,'Propane');
D = CoolProp.Props('D','P',p,'H',h,'Propane');
disp(['P,H -> T,D ', num2str(p),',',num2str(h),' --> ',num2str(T),',',num2str(D)])
CoolProp.disable_TTSE_LUT('Propane');
try
disp(' ')
disp('************ USING REFPROP ***************')
disp(' ')
disp('FLUID STATE INDEPENDENT INPUTS')
disp(['Critical Density Propane:', num2str(CoolProp.Props('REFPROP-Propane','rhocrit')), 'kg/m^3'])
disp(['TWO PHASE INPUTS (Pressure)'])
disp(['Density of saturated liquid Propane at 101.325 kPa: ', num2str(CoolProp.Props('D','P',101.325,'Q',0,'REFPROP-Propane')), ' kg/m^3'])
disp(['Density of saturated vapor R290 at 101.325 kPa: ', num2str(CoolProp.Props('D','P',101.325,'Q',1,'REFPROP-Propane')), ' kg/m^3'])
disp(['TWO PHASE INPUTS (Temperature)'])
disp(['Density of saturated liquid Propane at 300 K: ', num2str(CoolProp.Props('D','T',300,'Q',0,'REFPROP-Propane')), ' kg/m^3'])
disp(['Density of saturated vapor R290 at 300 K: ', num2str(CoolProp.Props('D','T',300,'Q',1,'REFPROP-Propane')), ' kg/m^3'])
disp(['SINGLE PHASE CYCLE (propane)'])
p = CoolProp.Props('P','T',300,'D',1,'REFPROP-Propane');
h = CoolProp.Props('H','T',300,'D',1,'REFPROP-Propane');
disp(['T,D -> P,H ', num2str(300),',',num2str(1), ' --> ',num2str(p),',',num2str(h)])
T = CoolProp.Props('T','P',p,'H',h,'REFPROP-Propane');
D = CoolProp.Props('D','P',p,'H',h,'REFPROP-Propane');
disp(['P,H -> T,D ', num2str(p),',',num2str(h),' --> ',num2str(T),',',num2str(D)])
catch
disp(' ')
disp('************ CANT USE REFPROP ************')
disp(' ')
end
disp([' '])
disp('************ CHANGE UNIT SYSTEM (default is kSI) *************')
disp(' ')
CoolProp.set_standard_unit_system(CoolProp.UNIT_SYSTEM_SI)
disp(['Vapor pressure of water at 373.15 K in SI units (Pa):',num2str(CoolProp.Props('P','T',373.15,'Q',0,'Water'))]);
CoolProp.set_standard_unit_system(CoolProp.UNIT_SYSTEM_KSI)
disp(['Vapor pressure of water at 373.15 K in kSI units (kPa):',num2str(CoolProp.Props('P','T',373.15,'Q',0,'Water'))]);
disp(' ')
disp('************ BRINES AND SECONDARY WORKING FLUIDS *************')
disp(' ')
disp(['Density of 50% (mass) ethylene glycol/water at 300 K, 101.325 kPa: ', num2str(CoolProp.Props('D','T',300,'P',101.325,'EG-50%')), 'kg/m^3'])
disp(['Viscosity of Therminol D12 at 350 K, 101.325 kPa: ', num2str(CoolProp.Props('V', 'T', 350, 'P', 101.325, 'TD12')), 'Pa-s'])
disp(' ')
disp('************ HUMID AIR PROPERTIES *************')
disp(' ')
disp(['Humidity ratio of 50% rel. hum. air at 300 K, 101.325 kPa: ', num2str(CoolProp.HAProps('W','T',300,'P',101.325,'R',0.5)), ' kg_w/kg_da'])
disp(['Relative humidity from last calculation: ', num2str(CoolProp.HAProps('R','T',300,'P',101.325,'W',HAProps('W','T',300,'P',101.325,'R',0.5))), '(fractional)'])

View File

@@ -1,65 +0,0 @@
A wrapper of CoolProp for the Octave programming language (an open-source version of MATLAB)
This CoolProp.oct module is built using SWIG, and is built for octave for windows built with Visual Studio.
Installation
============
Separate versions of the .oct file are available for Octave 3.6.1 and 3.6.2.
Put the .oct file for the version you have in somewhere in the octave path, or use the ``addpath`` function to add the folder that contains CoolProp.oct to the Octave path
On Linux systems you can put .oct file in
"/usr/share/octave/?octave.version.number?/m" folder. You will need superuser
privileges to do this.
If you place .oct file somewhere outside octave path, you have to use
"addpath" function at begining of your code.
Example: adding the folder that contains CoolProp.oct file to the Octave path:
"addpath('/home/?user_name?/Some_folder/CoolProp')"
Developer Notes:
===============
A. 3.6.1 needs to use VS 2008 to build; 3.6.2 needs to use VS 2010
B. In the win32 distro of 3.6.2, the hard-coded path in OCTAVE/bin/include/math.h around line 73 might need to be changed to
/* Include VC++ original math.h */
#include <c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/math.h>
depending on where your VS is installed
Building on Linux (Ubuntu in this case)
---------------------------------------
1. You will need to run
sudo apt-get update
sudo apt-get install octave liboctave-dev swig
to install the necesary dependencies. The install of octave might not be necessary but it cant hurt
2. Check out the full source for coolprop from github
git clone https://github.com/ibell/coolprop
3. Change into the coolprop-code/wrappers/Octave folder
cd coolprop/wrappers/Octave
4. Call
octave _OctaveBuilder_Linux.m
5. Call
octave sample_code.m
to run the sample
Building on Raspberry PI
------------------------
1. You will need to run
sudo aptitude update
sudo aptitude install octave liboctave-dev swig subversion
2. Download all the sources from subversion using
git clone https://github.com/ibell/coolprop
3. Change into the folder
cd coolprop/wrappers/Octave
4. Run the build script
octave _OctaveBuilder_Linux.m
5. Call
octave sample_code.m
to run the sample