Skip to content
This repository has been archived by the owner on Mar 29, 2019. It is now read-only.

Commit

Permalink
Tested Makefile and restored example paths
Browse files Browse the repository at this point in the history
  • Loading branch information
jowr committed Apr 25, 2014
1 parent 8177193 commit b36afc9
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 66 deletions.
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ SE =sed
MAJORVERSION=9
MINORVERSION=1
THENAME =refprop
USERNAME =`whoami`
USERNAME =$(shell whoami)

###########################################################
# Setting the directories for library, header and
Expand All @@ -40,7 +40,7 @@ else
LIBINST =/home/$(USERNAME)/lib
HEADINST =/home/$(USERNAME)/include
FILINST =/home/$(USERNAME)/refprop
endef
endif

LIBS =-l$(THENAME)# -lPocoFoundation
# Disable optimisation for now, this should be removed again
Expand Down Expand Up @@ -147,9 +147,12 @@ install-linux : header library install-fluids
ifeq ($(USERNAME),root)
$(LD)
else
# This code exports the path for the current session
env var("export LD_LIBRARY_PATH=$(LIBINST)")
endef
@echo "------------------ IMPORTANT NOTICE ------------------"
@echo "You are not root:"
# This code exports the path for the next command:
export LD_LIBRARY_PATH=$(LIBINST)
# remeber to preceed all your commands with it to use the locally installed library.
endif

.PHONY : install-mac
install-mac : header library install-fluids
Expand Down
123 changes: 62 additions & 61 deletions src/ex_mix.for
Original file line number Diff line number Diff line change
@@ -1,61 +1,62 @@
c Example program showing how to setup a mixture using the information
c contained in a .mix file (located in the ...\Refprop\Mixtures directory).

program EXAMPLE
implicit double precision (a-h,o-z)
implicit integer (i-k,m,n)
parameter (ncmax=20) !max number of components in mixture
dimension x(ncmax),xliq(ncmax),xvap(ncmax)
character hrf*3
character*255 hf(ncmax),hfmix,hflnme,herr

c...If the fluid files are located in a directory that the code cannot
c.....find, make a call to SETPATH
call SETPATH('/usr/local/refprop/')

! i=3;
! hflnme='nitrogen.fld|argon.fld|oxygen.fld'
! hfmix='hmx.bnc'
! hrf='DEF'
! herr='Ok'
! x(1)=.7812; !Air composition
! x(2)=.0092;
! x(3)=.2096;
!
! !//...Call SETUP to initialize the program
! CALL SETUP0(i,hflnme,hfmix,hrf,ierr,herr);
!
! t=300.
! p=1.
!
!c...Mixture properties use the exact same routines as those described
!c...in EXAMPLE.FOR
! CALL TPRHO(t,p,x,j,k,d,ierr,herr)
! write (*,1000) t,p,d



hflnme='R410A.mix'
hfmix='hmx.bnc'
hrf='DEF'
t = 300.
p = 1.

c...The SETMIX subroutine returns the number of fluids [ncc], fluid
c...names [hf()], and the composition of the mixture [x()].
call SETMIX (hflnme,hfmix,hrf,ncc,hf,x,ierr,herr)
if (ierr.ne.0) write (*,*) herr
if (ierr.gt.0) stop

c...Calculate saturated liquid properties
call SATT (t,x,1,p,dl,dv,xliq,xvap,ierr,herr)
if (ierr.ne.0) write (*,*) herr
write (*,1000) t,p,dl,dv!,xliq(1),xvap(1)

c...Calculate saturated vapor properties
call SATT (t,x,2,p,dl,dv,xliq,xvap,ierr,herr)
if (ierr.ne.0) write (*,*) herr
write (*,1000) t,p,dl,dv!,xliq(1),xvap(1)

1000 format (15f11.4)
end
c Example program showing how to setup a mixture using the information
c contained in a .mix file (located in the ...\Refprop\Mixtures directory).

program EXAMPLE
implicit double precision (a-h,o-z)
implicit integer (i-k,m,n)
parameter (ncmax=20) !max number of components in mixture
dimension x(ncmax),xliq(ncmax),xvap(ncmax)
character hrf*3
character*255 hf(ncmax),hfmix,hflnme,herr

c...If the fluid files are located in a directory that the code cannot
c.....find, make a call to SETPATH
c call SETPATH('/scratch/USERNAME/refprop/')
call SETPATH('/opt/refprop/')

! i=3;
! hflnme='nitrogen.fld|argon.fld|oxygen.fld'
! hfmix='hmx.bnc'
! hrf='DEF'
! herr='Ok'
! x(1)=.7812; !Air composition
! x(2)=.0092;
! x(3)=.2096;
!
! !//...Call SETUP to initialize the program
! CALL SETUP0(i,hflnme,hfmix,hrf,ierr,herr);
!
! t=300.
! p=1.
!
!c...Mixture properties use the exact same routines as those described
!c...in EXAMPLE.FOR
! CALL TPRHO(t,p,x,j,k,d,ierr,herr)
! write (*,1000) t,p,d



hflnme='R410A.mix'
hfmix='hmx.bnc'
hrf='DEF'
t = 300.
p = 1.

c...The SETMIX subroutine returns the number of fluids [ncc], fluid
c...names [hf()], and the composition of the mixture [x()].
call SETMIX (hflnme,hfmix,hrf,ncc,hf,x,ierr,herr)
if (ierr.ne.0) write (*,*) herr
if (ierr.gt.0) stop

c...Calculate saturated liquid properties
call SATT (t,x,1,p,dl,dv,xliq,xvap,ierr,herr)
if (ierr.ne.0) write (*,*) herr
write (*,1000) t,p,dl,dv!,xliq(1),xvap(1)

c...Calculate saturated vapor properties
call SATT (t,x,2,p,dl,dv,xliq,xvap,ierr,herr)
if (ierr.ne.0) write (*,*) herr
write (*,1000) t,p,dl,dv!,xliq(1),xvap(1)

1000 format (15f11.4)
end

0 comments on commit b36afc9

Please sign in to comment.