This repository has been archived by the owner on Mar 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tested Makefile and restored example paths
- Loading branch information
jowr
committed
Apr 25, 2014
1 parent
8177193
commit b36afc9
Showing
2 changed files
with
70 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |