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),f(ncmax) character hrf*3, herr*255 character*255 hf(ncmax),hfmix c Load 7 component "mixture", where only the first four components are actually c part of the mixture, and air, water, and ammonia are added on at the end c to allow calculations of the pure fluid properties for those fluids. nc=7 hf(1)='R22.FLD' !part of R405A hf(2)='R152a.FLD' !part of R405A hf(3)='R142b.FLD' !part of R405A hf(4)='RC318.FLD' !part of R405A hf(5)='AIR.PPF' hf(6)='WATER.FLD' hf(7)='AMMONIA.FLD' hrf='DEF' hfmix='hmx.bnc' call SETUP (nc,hf,hfmix,hrf,ierr,herr) c The call to setup with this example will produce a 117 error message. c Since this example is not actually mixing water or ammonia with the other c properties, it can be ignored. write (*,*) ierr c Call the subroutine SETNC to tell the program that only the first four c components are in the mixture call SETNC(4) x(1)=.582397185883849 x(2)=.118598940913682 x(3)=.0612463586573 x(4)=.237757514545169 x(5)=0 x(6)=0 x(7)=0 t=220 call SATT (t,x,1,p,dl,dv,xliq,xvap,ierr,herr) write (*,1) t,p,dl,dv write (*,1) (xvap(i),i=1,4) c Calculate properties of component #5, air (as a pseudo-pure fluid) call PUREFLD(5) t=120 call SATT (t,x,1,p,dl,dv,xliq,xvap,ierr,herr) write (*,1) t,p,dl,dv c Calculate properties of component #6, water call PUREFLD(6) t=320 call SATT (t,x,1,p,dl,dv,xliq,xvap,ierr,herr) write (*,1) t,p,dl,dv c Calculate properties of component #7, ammonia call PUREFLD(7) t=400 call SATT (t,x,1,p,dl,dv,xliq,xvap,ierr,herr) write (*,1) t,p,dl,dv c Reset the components so that the refrigerant mixture is again the default call PUREFLD(0) t=220 call SATT (t,x,1,p,dl,dv,xliq,xvap,ierr,herr) write (*,1) t,p,dl,dv write (*,1) (xvap(i),i=1,4) 1 format (10f16.10) 1000 format (5f15.8,i3) end