REFPROP函数说明
更新时间:2023-09-03 17:36:01 阅读量: 教育文库 文档下载
制冷剂性质计算, 热物性质计算,REFPROP介绍
The subroutines are contained in a number of files, which are placed in the
"FORTRAN" directory. The following files should be compiled and linked with
your own main program:
core_anc.for core_bwr.for core_cpp.for core_de.for core_ecs.for
core_feq.for core_mlt.for core_ph0.for core_pr.for core_stn.for
core_qui.for
flash2.for flsh_sub.for idealgas.for mix_aga8.for mix_hmx.for
prop_sub.for realgas.for sat_sub.for setup.for setup2.for
trns_ecs.for trns_tcx.for trns_vis.for trnsp.for utility.for
These 26 files were compiled with the Lahey compiler using a command similar
to this:
lf95 core_anc.for -c -nco -nom -dll -win -ml msvb
and linked with the following:
lf95 pass_ftn.obj setup.obj core_anc.obj core_bwr.obj core_cpp.obj core_de.obj core_ecs.obj core_feq.obj core_mlt.obj core_ph0.obj core_qui.obj core_stn.obj core_pr.obj flash2.obj flsh_sub.obj idealgas.obj mix_aga8.obj mix_hmx.obj prop_sub.obj realgas.obj sat_sub.obj setup2.obj trns_ecs.obj trns_tcx.obj trns_vis.obj trnsp.obj utility.obj -nco -nom -dll -win -ml msvb -out refprop.dll
There is one additional file that comes with REFPROP. This file, called
pass_ftn.for, is used only when creating the DLL.
Several example files showing how to call the routines are located in your
REFPROP\Examples directory. EXAMPLE.FOR shows the common routines that you might need. EX-MIX.FOR shows how to load a mixture .MIX file containing
information for specified blends of refrigerants (and air). The file
EX-PPF.FOR shows how to use the pseudo-pure fluid files.
In version 8.0, any fluids that are used must have a ".fld" extension, e.g.,
R134a.fld, or a ".ppf" extension, e.g., air.ppf. In 8.1 and later versions, the
.fld extension is no longer needed and assumed if missing. The file HMX.bnc
(containing mixture parameters) must also be present. It is suggested (but not
required) that these be put into a subdirectory called "fluids" under the
directory containing the subroutines and application program.
The subroutine SETUP must be called to initialize the pure fluid or mixture
components. The call to SETUP will allow the choice of one of three standard
reference states for entropy and enthalpy and will automatically load the
"NIST-recommended" models for the components as well as mixing rules. The
routine SETMOD allows the specification of other models. To define another
制冷剂性质计算, 热物性质计算,REFPROP介绍
reference state, or to apply one of the standard states to a mixture of a
specified composition, the subroutine SETREF may be used. These additional
routines should be called only if the fluids and/or models (or reference state)
are changed. The sequence is:
call SETMOD (optional)
call SETUP (REQUIRED) [or call SETMIX]
call SETKTV (optional)
call SETREF (optional)
Subroutine SETUP0 calls subroutine SETUP using the same techniques as those
used by the graphical interface and the Excel spreadsheet. Subroutine
SETMIX reads the *.MIX files and makes the appropriate call to subroutine
SETUP. Subroutine SETPATH sets the path where the *.fld files can be
found. Subroutine PUREFLD allows the user to calculate the properties of a
pure fluid when a mixture has been loaded and the fluid is one of the
constituents in the mixture.
Units. The subroutines use the following units for all inputs and outputs:
temperature K
pressure, fugacity kPa
density mol/L
composition mole fraction
quality mole basis (moles vapor/total moles)
enthalpy, internal energy J/mol
Gibbs, Helmholtz free energy J/mol
entropy, heat capacity J/(mol.K)
speed of sound m/s
Joule-Thompson coefficient K/kPa
d(p)/d(rho) kPa.L/mol
d2(p)/d(rho)2 kPa.(L/mol)^2
viscosity microPa.s (10^-6 Pa.s)
thermal conductivity W/(m.K)
dipole moment debye
surface tension N/m
Note: The only exceptions to the above are the conversion utilities
XMASS and XMOLE. The interface allows a wide variety of units,
but not the subroutines.
Naming conventions. The variable type of subroutine arguments can
generally be inferred from the first letter of the variable name:
制冷剂性质计算, 热物性质计算,REFPROP介绍
a-g and o-z: double precision
h: double precision (i.e. enthalpy) or character
i-k and m,n: integer
l: logical (within subroutines only, no logicals in
arguments) also used as integer for exponent of FEQ model
The property subroutines are written in ANSI standard Fortran 77 and are
compatible with Fortran 90. We are striving to make these as standard and
portable as possible, but every compiler has its own sensitive points.
Please report any compiler or linker errors or warnings.
Potential pitfalls:
The fluid data files are read using logical unit 12. Use of this unit
in your program may crash the program and should be avoided.
The following is a description of the high-level routines that would be
used in stand-alone applications. These routines will give you access
to all features in a model-independent fashion. (There are corresponding
low-level routines for some of these which call specific models. Please
do not incorporate the low-level routines into your applications--if
you do, you may find that future versions may not work the same.)
INITIALIZATION SUBROUTINES
subroutine SETUP (nc,hfiles,hfmix,hrf,ierr,herr)
c
c define models and initialize arrays
c
c A call to this routine is required.
c
c inputs:
c nc--number of components (1 for pure fluid) [integer]
c hfiles--array of file names specifying fluid/mixture components
c [character*255 variable] for each of the nc components;
c e.g., :fluids:r134a.fld (Mac) or fluids\r134a.fld (DOS) or
c [full_path]/fluids/r134a.fld (UNIX)
c hfmix--mixture coefficients [character*255]
c file name containing coefficients for mixture model,
制冷剂性质计算, 热物性质计算,REFPROP介绍
c if applicable
c e.g., fluids\hmx.bnc
c hrf--reference state for thermodynamic calculations [character*3]
c 'DEF': default reference state as specified in fluid file
c is applied to each pure component
c 'NBP': h,s = 0 at pure component normal boiling point(s)
c 'ASH': h,s = 0 for sat liquid at -40 C (ASHRAE convention)
c 'IIR': h = 200, s = 1.0 for sat liq at 0 C (IIR convention)
c other choices are possible, but these require a separate
c call to SETREF
c outputs:
c ierr--error flag: 0 = successful
c 101 = error in opening file
c 102 = error in file or premature end of file
c -103 = unknown model encountered in file
c 104 = error in setup of model
c 105 = specified model not found
c 111 = error in opening mixture file
c 112 = mixture file of wrong type
c 114 = nc<>nc from setmod
c herr--error string (character*255 variable if ierr<>0)
c [fluid parameters, etc. returned via various common blocks]
subroutine SETUP0 (i,hfld,hfm,hrf,ierr,herr)
c
c call the SETUP routine with the same inputs as SETUP except for
c the hfld variable. This subroutine is generally used in calls
c to the REFPROP DLL since the call cannot handle a string array.
c The hfld variable is a string of length 10000. For a pure fluid,
c it simply contains the name of the fluid file (with a path if needed).
c For a mixture, it contains the names of the constituents in the
c mixture separated by a |. For the air mixture, this would be
c something like (depends on the need for paths):
c hfld='fluids\nitrogen.fld|fluids\argon.fld|fluids\oxygen.fld|'
subroutine SETFLD (icomp,hfile,ierr,herr)
c
c open a fluid file and read model coefficients (or get from block data)
制冷剂性质计算, 热物性质计算,REFPROP介绍
c
c inputs:
c icomp--pointer specifying component number
c zero and negative values are used for ECS reference fluid(s)
c hfile--array of file names specifying fluid/mixture components
c [character*255 variable] for each of the components;
c --or--
c when hf(i) is of the form:
c BDATA:nn-nn-nn
c use coefficients stored in block data for fluid with CAS
c number specified by nn-nn-nn;
c e.g. to use stored formulation for R134a,
c hf(i) = 'BDATA:811-97-2'
c outputs:
c ierr--error flag: 0 = successful
c 101 = error in opening file
c 102 = error in file or premature end of file
c -103 = unknown model encountered in file
c 104 = error in setup of model
c 105 = specified model not found
c 106 = cp0 equation not found
c herr--error string (character*255 variable if ierr<>0)
c [fluid parameters, etc. returned via various common blocks]
subroutine SETMOD (nc,htype,hmix,hcomp,ierr,herr)
c
c set model(s) other than the NIST-recommended ('NBS') ones
c
c This subroutine must be called before SETUP; it need not be called
c at all if the default (NIST-recommended) models are desired.
c
c inputs:
c nc--number of components (1 for pure fluid) [integer]
c htype--flag indicating which models are to be set [character*3]
c 'EOS': equation of state for thermodynamic properties
c 'ETA': viscosity
c 'TCX': thermal conductivity
c 'STN': surface tension
c 'NBS': reset all of the above model types and all
c subsidiary component models to 'NBS';
c values of hmix and hcomp are ignored
制冷剂性质计算, 热物性质计算,REFPROP介绍
c hmix--mixture model to use for the property specified in htype [character*3];
c ignored if number of components = 1
c some allowable choices for hmix:
c 'NBS': use NIST recommendation for specified fluid/mixture
c 'HMX': mixture Helmholtz model for thermodynamic properties
c 'ECS': extended corresponding states for viscosity or therm. cond.
c 'STX': surface tension mixture model
c hcomp--component model(s) to use for property specified in htype [array (1..nc) of character*3]
c 'NBS': NIST recommendation for specified fluid/mixture
c some allowable choices for an equation of state:
c 'FEQ': Helmholtz free energy model
c 'BWR': pure fluid modified Benedict-Webb-Rubin (MBWR)
c 'ECS': pure fluid thermo extended corresponding states
c some allowable choices for viscosity:
c 'ECS': extended corresponding states (all fluids)
c 'VS1': the 'composite' model for R134a, R152a, NH3, etc.
c 'VS2': Younglove-Ely model for hydrocarbons
c 'VS4': Generalized friction theory of Quinones-Cisneros and Deiters c some allowable choices for thermal conductivity:
c 'ECS': extended corresponding states (all fluids)
c 'TC1': the 'composite' model for R134a, R152a, etc.
c 'TC2': Younglove-Ely model for hydrocarbons
c some allowable choices for surface tension:
c 'ST1': surface tension as f(tau); tau = 1 - T/Tc
c
c outputs:
c ierr--error flag: 0 = successful
c 113 = nc outside of bounds
c herr--error string (character*255 variable if ierr<>0)
c [fluid parameters, etc. returned via various common blocks]
subroutine GERG04 (nc,iflag,ierr,herr)
c
c set the pure model(s) to those used by the GERG 2004 formulation.
c
c This subroutine must be called before SETUP; it need not be called
c at all if the default (NIST-recommended) models are desired.
c
c inputs:
c nc--number of components (1 for pure fluid)
制冷剂性质计算, 热物性质计算,REFPROP介绍
c iflag--set to 1 to load the GERG 2004 equations, set to 0 for defaults
c outputs:
c ierr--error flag: 0 = successful
c herr--error string returned from SETMOD
subroutine SETREF (hrf,ixflag,x0,h0,s0,t0,p0,ierr,herr)
c
c set reference state enthalpy and entropy
c
c This subroutine must be called after SETUP; it need not be called at
c all if the reference state specified in the call to SETUP is to be
c used.
c
c inputs:
c hrf--reference state for thermodynamic calculations [character*3]
c 'NBP': h,s = 0 at normal boiling point(s)
c 'ASH': h,s = 0 for sat liquid at -40 C (ASHRAE convention)
c 'IIR': h = 200, s = 1.0 for sat liq at 0 C (IIR convention)
c 'DEF': default reference state as specified in fluid file
c is applied to each component (ixflag = 1 is used)
c 'OTH': other, as specified by h0, s0, t0, p0 (real gas state)
c 'OT0': other, as specified by h0, s0, t0, p0 (ideal gas state)
c '???': change hrf to the current reference state and exit.
c ixflag--composition flag: 1 = ref state applied to pure components
c 2 = ref state applied to mixture x0
c following input has meaning only if ixflag = 2
c x0--composition for which h0, s0 apply; array(1:nc) [mol frac]
c this is useful for mixtures of a predefined composition,
c e.g. refrigerant blends such as R410A
c following inputs have meaning only if hrf = 'OTH'
c h0--reference state enthalpy at t0,p0 {x0} [J/mol]
c s0--reference state entropy at t0,p0 {x0} [J/mol-K]
c t0--reference state temperature [K]
c t0 = -1 indicates saturated liquid at normal boiling point
c (bubble point for a mixture)
c p0--reference state pressure [kPa]
c p0 = -1 indicates saturated liquid at t0 {and x0}
c p0 = -2 indicates saturated vapor at t0 {and x0}
c outputs:
c ierr--error flag: 0 = successful
c 22 = Tmin > Tref for IIR reference state
制冷剂性质计算, 热物性质计算,REFPROP介绍
c 23 = Tcrit < Tref for IIR reference state
c 24 = Tmin > Tref for ASHRAE reference state
c 25 = Tcrit < Tref for ASHRAE reference state
c 26 = Tmin > Tnbp for NBP reference state
c 27 = Tref, Pref for OTH ref state outside limits
c -28 = can't apply 'DEF' to mixture;
c will apply to pure components
c -29 = unknown reference state specified;
c will use 'DEF'
c herr--error string (character*255 variable if ierr<>0)
c [fluid parameters, etc. returned via various common blocks]
subroutine SETMIX (hmxnme,hfmix,hrf,ncc,hfiles,x,ierr,herr)
c
c open a mixture file (e.g., R410A.mix) and read constituents and
c mole fractions
c
c inputs:
c hmxnme--mixture file name to be read in [character*255]
c hfmix--mixture coefficients [character*255]
c file name containing coefficients for mixture model
c hrf--reference state for thermodynamic calculations [character*3]
c (see info in subroutine setup for specifics)
c outputs:
c ncc--number of fluids in mixture
c hfiles--array of file names specifying mixture components
c that were used to call setup. [character*255 variable]
c x--array of mole fractions for the specified mixture
c ierr--error flag: 0 = successful
c 101 = error in opening file
c -102 = mixture file contains mixing parameters
c -103 = composition not equal to one
c herr--error string (character*255 variable if ierr<>0)
subroutine SETPATH (hpth)
c
c set the path where the fluid files are located
c
制冷剂性质计算, 热物性质计算,REFPROP介绍
c inputs:
c hpth--location of the fluid files [character*255 variable]
c The path does not need to contain the ending "\" and it can
c point directly to the location where the DLL is stored if a
c fluids subdirectory (with the corresponding fluid files) is
c located there.
c example: hpth='C:\Program Files\Refprop'
subroutine PUREFLD (icomp)
c
c Change the standard mixture setup so that the properties of one fluid
c can be calculated as if SETUP had been called for a pure fluid.
c Calling this routine will disable all mixture calculations.
c To reset the mixture setup, call this routine with icomp=0.
c
c inputs:
c icomp--fluid number in a mixture to use as a pure fluid
subroutine GETMOD (icomp,htype,hcode,hcite)
c
c retrieve citation information for the property models used
c
c inputs:
c icomp--pointer specifying component number
c zero and negative values are used for ECS reference fluid(s)
c htype--flag indicating which model is to be retrieved [character*3]
c 'EOS': equation of state for thermodynamic properties
c 'CP0': ideal part of EOS (e.g. ideal-gas heat capacity)
c 'ETA': viscosity
c 'VSK': viscosity critical enhancement
c 'TCX': thermal conductivity
c 'TKK': thermal conductivity critical enhancement
c 'STN': surface tension
c 'DE ': dielectric constant
c 'MLT': melting line (freezing line, actually)
c 'SBL': sublimation line
c 'PS ': vapor pressure equation
c 'DL ': saturated liquid density equation
制冷剂性质计算, 热物性质计算,REFPROP介绍
c 'DV ': saturated vapor density equation
c outputs:
c hcode--component model used for property specified in htype
c
c some possibilities for thermodynamic properties:
c 'FEQ': Helmholtz free energy model
c 'BWR': pure fluid modified Benedict-Webb-Rubin (MBWR)
c 'ECS': pure fluid thermo extended corresponding states
c
c some possibilities for viscosity:
c 'ECS': extended corresponding states (all fluids)
c 'VS1': the 'composite' model for R134a, R152a, NH3, etc.
c 'VS2': Younglove-Ely model for hydrocarbons
c 'VS4': generalized friction theory of Quinones-Cisneros and Dieters c
c some possibilities for thermal conductivity:
c 'ECS': extended corresponding states (all fluids)
c 'TC1': the 'composite' model for R134a, R152a, etc.
c 'TC2': Younglove-Ely model for hydrocarbons
c
c some possibilities for surface tension:
c 'ST1': surface tension as f(tau); tau = 1 - T/Tc
c
c hcite--component model used for property specified in htype;
c the first 3 characters repeat the model designation of hcode
c and the remaining are the citation for the source
subroutine SETKTV (icomp,jcomp,hmodij,fij,hfmix,ierr,herr)
c
c set mixture model and/or parameters
c
c This subroutine must be called after SETUP, but before any call to
c SETREF; it need not be called at all if the default mixture
c parameters (those read in by SETUP) are to be used.
c
c inputs:
c icomp--component i
c jcomp--component j
c hmodij--mixing rule for the binary pair i,j [character*3]
c e.g. 'LJ1' (Lemmon-Jacobsen model)
c 'LM1' (modified Lemmon-Jacobsen model) or
制冷剂性质计算, 热物性质计算,REFPROP介绍
c 'LIN' (linear mixing rules)
c 'RST' indicates reset all pairs to values from
c original call to SETUP (i.e. those read from file)
c [all other inputs are ignored]
c fij--binary mixture parameters [array of dimension nmxpar;
c currently nmxpar is set to 6]
c the parameters will vary depending on hmodij;
c for example, for the Lemmon-Jacobsen model (LJ1):
c fij(1) = zeta
c fij(2) = xi
c fij(3) = Fpq
c fij(4) = beta
c fij(5) = gamma
c fij(6) = 'not used'
c hfmix--file name [character*255] containing generalized parameters
c for the binary mixture model; this will usually be the same
c as the corresponding input to SETUP (e.g.,':fluids:hmx.bnc')
c outputs:
c ierr--error flag: 0 = successful
c 111 = error in opening mixture file
c 112 = mixture file of wrong type
c -113 = illegal i,j specification
c (i = j or i > nc or j > nc)
c herr--error string (character*255 variable if ierr<>0)
c [mixture parameters returned via various common blocks]
subroutine GETKTV (icomp,jcomp,hmodij,fij,hfmix,hfij,hbinp,hmxrul) c
c retrieve mixture model and parameter info for a specified binary
c
c This subroutine should not be called until after a call to SETUP.
c
c inputs:
c icomp--component i
c jcomp--component j
c outputs:
c hmodij--mixing rule for the binary pair i,j (e.g. LJ1 or LIN)
c [character*3]
c fij--binary mixture parameters [array of dimension nmxpar;
c currently nmxpar is set to 6]; the parameters will vary
c depending on hmodij;
制冷剂性质计算, 热物性质计算,REFPROP介绍
c hfmix--file name [character*255] containing parameters for the
c binary mixture model
c hfij--description of the binary mixture parameters [character*8
c array of dimension nmxpar]
c for example, for the Lemmon-Jacobsen model (LJ1):
c fij(1) = zeta
c fij(2) = xi
c fij(3) = Fpq
c fij(4) = beta
c fij(5) = gamma
c fij(6) = 'not used'
c hbinp--documentation for the binary parameters [character*255]
c terminated with ASCII null character
c hmxrul--description of the mixing rule [character*255]
subroutine GETFIJ (hmodij,fij,hfij,hmxrul)
c
c retrieve parameter info for a specified mixing rule
c
c This subroutine should not be called until after a call to SETUP.
c
c inputs:
c hmodij--mixing rule for the binary pair i,j (e.g. LJ1 or LIN)
c [character*3]
c outputs:
c fij--binary mixture parameters [array of dimension nmxpar;
c currently nmxpar is set to 6]; the parameters will vary
c depending on hmodij;
c hfij--description of the binary mixture parameters [character*8
c array of dimension nmxpar]
c hmxrul--description of the mixing rule [character*255]
SATURATION-STATE SUBROUTINES
subroutine SATT (t,x,kph,p,rhol,rhov,xliq,xvap,ierr,herr)
c
制冷剂性质计算, 热物性质计算,REFPROP介绍
c iterate for saturated liquid and vapor states given temperature
c and the composition of one phase
c
c inputs:
c t--temperature [K]
c if t is negative, then use other variables as
c initial guesses at abs(t)
c x--composition [array of mol frac] (phase specified by kph)
c kph--phase flag: 1 = input x is liquid composition (bubble point)
c 2 = input x is vapor composition (dew point)
c 3 = input x is liquid composition (freezing point)
c 4 = input x is vapor composition (sublimation point) c outputs:
c p--pressure [kPa]
c rhol--molar density [mol/L] of saturated liquid
c rhov--molar density [mol/L] of saturated vapor
c For a pseudo pure fluid, the density of the equilibrium phase
c is not returned. Call SATT twice, once with kph=1 to get
c pliq and rhol, and once with kph=2 to get pvap and rhov.
c xliq--liquid phase composition [array of mol frac]
c xvap--vapor phase composition [array of mol frac]
c ierr--error flag: 0 = successful
c 1 = T < Tmin
c 8 = x out of range
c 9 = T and x out of range
c 120 = CRITP did not converge
c 121 = T > Tcrit
c 122 = TPRHO-liquid did not converge (pure fluid) c 123 = TPRHO-vapor did not converge (pure fluid) c 124 = pure fluid iteration did not converge
c following 3 error codes are advisory--iteration will either
c converge on later guess or error out (ierr = 128)
c -125 = TPRHO did not converge for parent ph (mix) c -126 = TPRHO did not converge for incipient (mix) c -127 = composition iteration did not converge
c 128 = mixture iteration did not converge
c herr--error string (character*255 variable if ierr<>0)
subroutine SATP (p,x,kph,t,rhol,rhov,xliq,xvap,ierr,herr)
c
c iterate for saturated liquid and vapor states given pressure
制冷剂性质计算, 热物性质计算,REFPROP介绍
c and the composition of one phase
c
c inputs:
c p--pressure [kPa]
c x--composition [array of mol frac] (phase specified by kph)
c kph--phase flag: 1 = input x is liquid composition
c 2 = input x is vapor composition
c 3 = input x is liquid composition (freezing point) c 4 = input x is vapor composition (sublimation point) c
c outputs:
c t--temperature [K]
c rhol--molar density [mol/L] of saturated liquid
c rhov--molar density [mol/L] of saturated vapor
c For a pseudo pure fluid, the density of the equilibrium phase
c is not returned. Call SATP twice, once with kph=1 to get
c tliq and rhol, and once with kph=2 to get tvap and rhov.
c xliq--liquid phase composition [array of mol frac]
c xvap--vapor phase composition [array of mol frac]
c ierr--error flag: 0 = successful
c 2 = P < Ptp
c 4 = P < 0
c 8 = x out of range
c 12 = P and x out of range
c 140 = CRITP did not converge
c 141 = P > Pcrit
c 142 = TPRHO-liquid did not converge (pure fluid) c 143 = TPRHO-vapor did not converge (pure fluid) c 144 = pure fluid iteration did not converge
c following 3 error codes are advisory--iteration will either
c converge on later guess or error out (ierr = 148)
c -144 = Raoult's law (mixture initial guess) did
c not converge
c -145 = TPRHO did not converge for parent ph (mix) c -146 = TPRHO did not converge for incipient (mix)
c -147 = composition iteration did not converge
c 148 = mixture iteration did not converge
c herr--error string if ierr<>0 (character*255)
subroutine SATD (rho,x,kph,kr,t,p,rhol,rhov,xliq,xvap,ierr,herr)
c
制冷剂性质计算, 热物性质计算,REFPROP介绍
c iterate for temperature and pressure given a density along the
c saturation boundary and the composition
c
c inputs:
c rho--molar density [mol/L]
c x--composition [array of mol frac]
c kph--flag specifying desired root for multi-valued inputs
c has meaning only for water at temperatures close to its triple point c -1 = return middle root (between 0 and 4 C)
c 1 = return highest temperature root (above 4 C)
c 3 = return lowest temperature root (along freezing line)
c outputs:
c t--temperature [K]
c p--pressure [kPa]
c rhol--molar density [mol/L] of saturated liquid
c rhov--molar density [mol/L] of saturated vapor
c xliq--liquid phase composition [array of mol frac]
c xvap--vapor phase composition [array of mol frac]
c kr--phase flag: 1 = input state is liquid
c 2 = input state is vapor in equilibrium with liq
c 3 = input state is liquid in equilibrium with solid
c 4 = input state is vapor in equilibrium with solid
c ierr--error flag: 0 = successful
c 2 = D > Dmax
c 8 = x out of range
c 10 = D and x out of range
c 160 = CRITP did not converge
c 161 = SATD did not converge
c herr--error string (character*255 variable if ierr<>0)
c
c N.B. kr = 3,4 presently working only for pure components
c
c either (rhol,xliq) or (rhov,xvap) will correspond to the input state
c with the other pair corresponding to the other phase in equilibrium
c with the input state
subroutine SATH (h,x,kph,nroot,k1,t1,p1,d1,k2,t2,p2,d2,ierr,herr)
c
c iterate for temperature, pressure, and density given enthalpy along
c the saturation boundary and the composition
c
制冷剂性质计算, 热物性质计算,REFPROP介绍
c h--molar enthalpy [J/mol]
c x--composition [array of mol frac]
c kph--flag specifying desired root
c 0 = return all roots along the liquid-vapor line
c 1 = return only liquid VLE root
c 2 = return only vapor VLE roots
c 3 = return liquid SLE root (melting line)
c 4 = return vapor SVE root (sublimation line)
c outputs:
c nroot--number of roots. Set to one for kph=1,3,4 if ierr=0
c k1--phase of first root (1-liquid, 2-vapor, 3-melt, 4-subl)
c t1--temperature of first root [K]
c p1--pressure of first root [kPa]
c d1--molar density of first root [mol/L]
c k2--phase of second root (1-liquid, 2-vapor, 3-melt, 4-subl)
c t2--temperature of second root [K]
c p2--pressure of second root [kPa]
c d2--molar density of second root [mol/L]
c ierr--error flag: 0 = successful
c 2 = h < hmin
c 4 = h > hmax
c 8 = h > htrp (for subl input)
c 160 = CRITP did not converge
c 161 = SATH did not converge for one root
c 162 = SATH did not converge for both roots
c herr--error string (character*255 variable if ierr<>0)
c
c The second root is always set as the root in the vapor at temperatures
c below the maximum enthalpy on the vapor saturation line. If kph is
c set to 2, and only one root is found in the vapor (this occurs when h<hcrit)
c the state point will be placed in k2,t2,p2,d2. If kph=0 and this situation
c occurred, the first root (k1,t1,p1,d1) would be in the liquid (k1=1, k2=2).
c
c N.B. kph = 3,4 presently working only for pure components
subroutine SATE (e,x,kph,nroot,k1,t1,p1,d1,k2,t2,p2,d2,ierr,herr)
c
c iterate for temperature, pressure, and density given energy along
c the saturation boundary and the composition
c
制冷剂性质计算, 热物性质计算,REFPROP介绍
c e--molar energy [J/mol]
c x--composition [array of mol frac]
c kph--flag specifying desired root
c 0 = return all roots along the liquid-vapor line
c 1 = return only liquid VLE root
c 2 = return only vapor VLE roots
c 3 = return liquid SLE root (melting line)
c 4 = return vapor SVE root (sublimation line)
c outputs:
c see SATH for description of outputs
subroutine SATS (s,x,kph,nroot,k1,t1,p1,d1,k2,t2,p2,d2,
& k3,t3,p3,d3,ierr,herr)
c
c iterate for temperature, pressure, and density given an entropy along
c the saturation boundary and the composition
c
c inputs:
c s--molar entropy [J/mol-K]
c x--composition [array of mol frac]
c kph--flag specifying desired root
c 0 = return all roots along the liquid-vapor line
c 1 = return only liquid VLE root
c 2 = return only vapor VLE roots
c 3 = return liquid SLE root (melting line)
c 4 = return vapor SVE root (sublimation line)
c outputs:
c nroot--number of roots. Set to one for kph=1,3,4 if ierr=0
c k1--phase of first root (1-liquid, 2-vapor, 3-melt, 4-subl)
c t1--temperature of first root [K]
c p1--pressure of first root [kPa]
c dl--molar density of first root [mol/L]
c k2--phase of second root (1-liquid, 2-vapor, 3-melt, 4-subl)
c t2--temperature of second root [K]
c p2--pressure of second root [kPa]
c d2--molar density of second root [mol/L]
c k3--phase of third root (1-liquid, 2-vapor, 3-melt, 4-subl)
c t3--temperature of third root [K]
c p3--pressure of third root [kPa]
c d3--molar density of third root [mol/L]
制冷剂性质计算, 热物性质计算,REFPROP介绍
c ierr--error flag: 0 = successful
c 2 = s < smin
c 4 = s > smax
c 8 = s > strp (for subl input)
c 160 = CRITP did not converge
c 161 = SATS did not converge for one root
c 162 = SATS did not converge for two roots
c 163 = SATS did not converge for all roots
c herr--error string (character*255 variable if ierr<>0)
c
c The second root is always set as the root in the vapor at temperatures
c below the maximum entropy on the vapor saturation line. If kph is
c set to 2, and only one root is found in the vapor (this occurs when s<scrit)
c the state point will be placed in k2,t2,p2,d2. If kph=0 and this situation
c occurred, the first root (k1,t1,p1,d1) would be in the liquid (k1=1, k2=2).
c
c The third root is the root with the lowest temperature. For fluids
c with multiple roots: When only one root is found in the vapor phase
c (this happens only at very low temperatures past the region where three
c roots are located), the value of the root is still placed in
c k3,t3,p3,d3. For fluids that never have more than one root (when there
c is no maximum entropy along the saturated vapor line), the value of the
c root is always placed in k1,t1,p1,d1.
c
c N.B. kph = 3,4 presently working only for pure components
subroutine CSATK (icomp,t,kph,p,rho,csat,ierr,herr)
c
c compute the heat capacity along the saturation line as a function of
c temperature for a given component
c
c csat can be calculated two different ways:
c Csat = Cp - T(DvDT)(DPDTsat)
c Csat = Cp - beta/rho*hvap/(vliq - vvap)
c where beta is the volume expansivity
c
c inputs:
c icomp--component number in mixture (1..nc); 1 for pure fluid
c t--temperature [K]
c kph--phase flag: 1 = liquid calculation
c 2 = vapor calculation
制冷剂性质计算, 热物性质计算,REFPROP介绍
c outputs:
c p--saturation pressure [kPa]
c rho--saturation molar density [mol/L]
c csat--saturation heat capacity [J/mol-K]
subroutine DPTSATK (icomp,t,kph,p,rho,csat,dpt,ierr,herr)
c
c compute the heat capacity and dP/dT along the saturation line as a
c function of temperature for a given component. See also subroutine CSATK. c
c inputs:
c icomp--component number in mixture (1..nc); 1 for pure fluid
c t--temperature [K]
c kph--phase flag: 1 = liquid calculation
c 2 = vapor calculation
c outputs:
c p--saturation pressure [kPa]
c rho--saturation molar density [mol/L]
c csat--saturation heat capacity [J/mol-K] (same as that called from CSATK) c dpt--dP/dT along the saturation line [kPa/K]
c (this is not dP/dT "at" the saturation line for the single phase
c state, but the change in saturated vapor pressure as the
c saturation temperature changes.)
subroutine CV2PK (icomp,t,rho,cv2p,csat,ierr,herr)
c
c compute the isochoric heat capacity in the two phase (liquid+vapor)
c region
c
c inputs:
c icomp--component number in mixture (1..nc); 1 for pure fluid
c t--temperature [K]
c rho--density [mol/l] if known
c If rho=0, then a saturated liquid state is assumed.
c
c outputs:
c cv2p--isochoric two-phase heat capacity [J/mol-K]
c csat--saturation heat capacity [J/mol-K]
正在阅读:
REFPROP函数说明09-03
visual c#.NET程序设计教程第二版罗福强课后习题答案06-21
2016年垃圾发电行业现状及发展趋势分析05-24
四年级下册数学复习资料206-19
管理信息系统----沃尔玛案例分析05-05
MFC中IPADDRESS控件的使用04-27
幼儿园中班语言《家在哪里》试讲稿02-23
- exercise2
- 铅锌矿详查地质设计 - 图文
- 厨余垃圾、餐厨垃圾堆肥系统设计方案
- 陈明珠开题报告
- 化工原理精选例题
- 政府形象宣传册营销案例
- 小学一至三年级语文阅读专项练习题
- 2014.民诉 期末考试 复习题
- 巅峰智业 - 做好顶层设计对建设城市的重要意义
- (三起)冀教版三年级英语上册Unit4 Lesson24练习题及答案
- 2017年实心轮胎现状及发展趋势分析(目录)
- 基于GIS的农用地定级技术研究定稿
- 2017-2022年中国医疗保健市场调查与市场前景预测报告(目录) - 图文
- 作业
- OFDM技术仿真(MATLAB代码) - 图文
- Android工程师笔试题及答案
- 生命密码联合密码
- 空间地上权若干法律问题探究
- 江苏学业水平测试《机械基础》模拟试题
- 选课走班实施方案
- 函数
- REFPROP
- 说明
- 《基本笔画横钩、横折钩的写法》教学设计(李爱萍)
- 2014-2018年中国旅游景区行业竞争格局及投资前景预测报告
- 中考化学知识点汇总
- 20061120_土地一级开发的风险及控制@开发模式
- 公务员考试第四阶段答案92分
- 网络安全技术人员培训(基础)
- 户口本模板
- 【物理试卷】山西省沁县中学2017-2018学年高一物理上学期期中试卷.doc
- 略述《伤寒杂病论》中闻诊的运用
- 征服者移动电源S-PM1029
- 《教育科研方法试题》考试试卷
- 职业高级中学建设项目立项可行性报告项目可行性研究分析报告
- (江苏专版)18年高考英语二轮复习增分篇专题巧突破专题三阅读理解专题限时检测(十六)阅读理解细节理解
- 优秀教师名师事迹材料
- 数模转换电路设计与实验
- 临床药学知识汇总(精华版)
- 超右脑快速英语单词形象记忆法(小学英语213个单词右脑记忆)
- 深圳调干入户计划生育调查表(2013版)
- 高中数学必修三课时作业:第一章 章末检测 Word版含答案
- 上教版牛津英语四下4B四会句子汇总