REFPROP函数说明

REFPROP函数说明
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

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:

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 an

d initializ

e 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.fl

d (Mac) or fluids\r134a.fld (DOS) or

c [full_path]/fluids/r134a.fl

d (UNIX)

c hfmix--mixture coefficients [character*255]

c file name containing coefficients for mixture model,

c if applicable

c e.g., fluids\hmx.bnc

c hrf--reference state for thermodynamic calculations [character*3]

c 'DEF': default reference state as specifie

d in fluid file

c is applie

d to each pur

e component

c 'NBP': h,s = 0 at pure component normal boiling point(s)

c 'ASH': h,s = 0 for sat liqui

d 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 en

d of file

c -103 = unknown model encountere

d in file

c 104 = error in setup of model

c 105 = specifie

d 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 [flui

d 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 hfl

d variable. This subroutin

e is generally used in calls

c to the REFPROP DLL since the call cannot handle a string array.

c The hfl

d variabl

e is a string o

f length 10000. For a pure fluid,

c it simply contains the name of the flui

d fil

e (with a path i

f needed).

c For a mixture, it contains the names of the constituents in the

c mixture separate

d by a |. For th

e air mixture, this would be

c something like (depends on the nee

d for paths):

c hfld='fluids\nitrogen.fld|fluids\argon.fld|fluids\oxygen.fld|'

subroutine SETFLD (icomp,hfile,ierr,herr)

c

c open a flui

d fil

e and read model coefficients (or get from block data)

c

c inputs:

c icomp--pointer specifying component number

c zero an

d negativ

e values are used for ECS reference fluid(s) c hfile--array o

f file names specifyin

g 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 store

d in block data for fluid with CAS

c number specifie

d by nn-nn-nn;

c e.g. to use store

d 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 en

d of file

c -103 = unknown model encountere

d in file

c 104 = error in setup of model

c 105 = specifie

d model not found

c 106 = cp0 equation not found

c herr--error string (character*255 variable if ierr<>0)

c [flui

d parameters, etc. returned via various common blocks]

subroutine SETMOD (nc,htype,hmix,hcomp,ierr,herr)

c

c set model(s) other than the NIST-recommende

d ('NBS') ones

c

c This subroutine must be calle

d befor

e 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 an

d all

c subsidiary component models to 'NBS';

c values of hmix an

d hcomp ar

e ignored

c hmix--mixture model to use for the property specifie

d in htyp

e [character*3];

c ignore

d if number of components = 1

c some allowable choices for hmix:

c 'NBS': use NIST recommendation for specifie

d fluid/mixture

c 'HMX': mixture Helmholtz model for thermodynamic properties

c 'ECS': extende

d corresponding states for viscosity or therm. cond.

c 'STX': surface tension mixture model

c hcomp--component model(s) to use for property specifie

d in htyp

e [array (1..nc) o

f character*3]

c 'NBS': NIST recommendation for specifie

d fluid/mixture

c some allowable choices for an equation of state:

c 'FEQ': Helmholtz free energy model

c 'BWR': pure flui

d modified Benedict-Webb-Rubin (MBWR)

c 'ECS': pure flui

d thermo extended corresponding states

c some allowable choices for viscosity:

c 'ECS': extende

d corresponding states (all fluids)

c 'VS1': the 'composite' model for R134a, R152a, NH3, etc.

c 'VS2': Younglove-Ely model for hydrocarbons

c 'VS4': Generalize

d friction theory of Quinones-Cisneros and Deiters

c some allowable choices for thermal conductivity:

c 'ECS': extende

d 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 [flui

d parameters, etc. returned via various common blocks]

subroutine GERG04 (nc,iflag,ierr,herr)

c

c set the pure model(s) to those use

d by th

e GERG 2004 formulation.

c

c This subroutine must be calle

d befor

e 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)

c iflag--set to 1 to loa

d th

e GERG 2004 equations, set to 0 for defaults

c outputs:

c ierr--error flag: 0 = successful

c herr--error string returne

d from SETMOD

subroutine SETREF (hrf,ixflag,x0,h0,s0,t0,p0,ierr,herr)

c

c set reference state enthalpy an

d entropy

c

c This subroutine must be calle

d after SETUP; it need not b

e called at

c all if the reference state specifie

d in th

e 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 liqui

d 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 specifie

d in fluid file

c is applie

d to each component (ixflag = 1 is used)

c 'OTH': other, as specifie

d by h0, s0, t0, p0 (real gas state)

c 'OT0': other, as specifie

d by h0, s0, t0, p0 (ideal gas state) c '???': chang

e hr

f to the current reference state and exit.

c ixflag--composition flag: 1 = ref state applie

d to pur

e components

c 2 = ref state applie

d to mixtur

e 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 predefine

d 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 saturate

d liquid at normal boiling point

c (bubble point for a mixture)

c p0--reference state pressure [kPa]

c p0 = -1 indicates saturate

d liquid at t0 {and x0}

c p0 = -2 indicates saturate

d vapor at t0 {and x0}

c outputs:

c ierr--error flag: 0 = successful

c 22 = Tmin > Tref for IIR reference state

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 [flui

d 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) an

d read constituents and

c mole fractions

c

c inputs:

c hmxnme--mixture file name to be rea

d 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 use

d to call setup. [character*255 variable]

c x--array of mole fractions for the specifie

d 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 flui

d files ar

e located

c

c inputs:

c hpth--location of the flui

d files [character*255 variable]

c The path does not nee

d to contain th

e ending "\" and it can c point directly to the location where the DLL is stored i

f a

c fluids subdirectory (with the corresponding flui

d files) is

c locate

d there.

c example: hpth='C:\Program Files\Refprop'

subroutine PUREFLD (icomp)

c

c Change the standar

d mixtur

e setup so that the properties o

f one fluid

c can be calculate

d as if SETUP had been called for a pur

e 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--flui

d number in a mixtur

e 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 an

d negativ

e 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 ': saturate

d liquid density equation

c 'DV ': saturate

d vapor density equation

c outputs:

c hcode--component model use

d for property specified in htype

c

c some possibilities for thermodynamic properties:

c 'FEQ': Helmholtz free energy model

c 'BWR': pure flui

d modified Benedict-Webb-Rubin (MBWR)

c 'ECS': pure flui

d thermo extended corresponding states

c

c some possibilities for viscosity:

c 'ECS': extende

d corresponding states (all fluids)

c 'VS1': the 'composite' model for R134a, R152a, NH3, etc.

c 'VS2': Younglove-Ely model for hydrocarbons

c 'VS4': generalize

d friction theory of Quinones-Cisneros and Dieters c

c some possibilities for thermal conductivity:

c 'ECS': extende

d 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 use

d for property specified in htype;

c the first 3 characters repeat the model designation of hcode

c an

d th

e 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 calle

d after SETUP, but befor

e any call to

c SETREF; it nee

d not b

e called at all i

f the default mixture

c parameters (those rea

d in by SETUP) ar

e 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' (modifie

d Lemmon-Jacobsen model) or

c 'LIN' (linear mixing rules)

c 'RST' indicates reset all pairs to values from

c original call to SETUP (i.e. those rea

d 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 generalize

d 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 returne

d via various common blocks]

subroutine GETKTV (icomp,jcomp,hmodij,fij,hfmix,hfij,hbinp,hmxrul) c

c retrieve mixture model an

d parameter info for a specified binary

c

c This subroutine shoul

d not b

e 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;

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 terminate

d 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 specifie

d mixing rule

c

c This subroutine shoul

d not b

e 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

c iterate for saturate

d liquid and vapor states given temperature

c an

d th

e composition o

f 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 specifie

d by kph)

c kph--phase flag: 1 = input x is liqui

d composition (bubbl

e point)

c 2 = input x is vapor composition (dew point)

c 3 = input x is liqui

d 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 saturate

d liquid

c rhov--molar density [mol/L] of saturate

d 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 an

d rhol, and onc

e with kph=2 to get pvap and rhov.

c xliq--liqui

d phas

e composition [array o

f 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 an

d x out of range

c 120 = CRITP di

d not converge

c 121 = T > Tcrit

c 122 = TPRHO-liqui

d did not converg

e (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 di

d not converg

e for parent ph (mix) c -126 = TPRHO did not converge for incipient (mix) c -127 = composition iteration did not converge

c 128 = mixture iteration di

d 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 saturate

d liquid and vapor states given pressure

c an

d th

e composition o

f one phase

c

c inputs:

c p--pressure [kPa]

c x--composition [array of mol frac] (phase specifie

d by kph)

c kph--phase flag: 1 = input x is liqui

d composition

c 2 = input x is vapor composition

c 3 = input x is liqui

d 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 saturate

d liquid

c rhov--molar density [mol/L] of saturate

d 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 an

d rhol, and onc

e with kph=2 to get tvap and rhov.

c xliq--liqui

d phas

e composition [array o

f 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 an

d x out of range

c 140 = CRITP di

d not converge

c 141 = P > Pcrit

c 142 = TPRHO-liqui

d did not converg

e (pure fluid)

c 143 = TPRHO-vapor di

d not converg

e (pure fluid)

c 144 = pure flui

d 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 di

d not converg

e for parent ph (mix)

c -146 = TPRHO di

d not converg

e for incipient (mix)

c -147 = composition iteration di

d not converge

c 148 = mixture iteration di

d 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

c iterate for temperature an

d pressur

e given a density along the

c saturation boundary an

d th

e composition

c

c inputs:

c rho--molar density [mol/L]

c x--composition [array of mol frac]

c kph--flag specifying desire

d 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 an

d 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 saturate

d liquid

c rhov--molar density [mol/L] of saturate

d vapor

c xliq--liqui

d phas

e composition [array o

f 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 liqui

d 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 an

d x out of range

c 160 = CRITP di

d not converge

c 161 = SATD di

d 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 correspon

d to th

e 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, an

d density given enthalpy along

c the saturation boundary an

d th

e composition

c

c h--molar enthalpy [J/mol]

c x--composition [array of mol frac]

c kph--flag specifying desire

d root

c 0 = return all roots along the liquid-vapor line

c 1 = return only liqui

d VLE root

c 2 = return only vapor VLE roots

c 3 = return liqui

d 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 secon

d root (1-liquid, 2-vapor, 3-melt, 4-subl)

c t2--temperature of secon

d root [K]

c p2--pressure of secon

d root [kPa]

c d2--molar density of secon

d 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 di

d not converge

c 161 = SATH di

d not converg

e for one root

c 162 = SATH di

d not converg

e for both roots

c herr--error string (character*255 variable if ierr<>0)

c

c The secon

d root is always set as th

e root in the vapor at temperatures

c below the maximum enthalpy on the vapor saturation line. If kph is

c set to 2, an

d only on

e root is found in the vapor (this occurs when h

f 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, an

d density given energy along

c the saturation boundary an

d th

e composition

c

c e--molar energy [J/mol]

c x--composition [array of mol frac]

c kph--flag specifying desire

d root

c 0 = return all roots along the liquid-vapor line

c 1 = return only liqui

d VLE root

c 2 = return only vapor VLE roots

c 3 = return liqui

d 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, an

d density given an entropy along c th

e 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 desire

d root

c 0 = return all roots along the liquid-vapor line

c 1 = return only liqui

d VLE root

c 2 = return only vapor VLE roots

c 3 = return liqui

d 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 secon

d root (1-liquid, 2-vapor, 3-melt, 4-subl)

c t2--temperature of secon

d root [K]

c p2--pressure of secon

d root [kPa]

c d2--molar density of secon

d root [mol/L]

c k3--phase of thir

d root (1-liquid, 2-vapor, 3-melt, 4-subl)

c t3--temperature of thir

d root [K]

c p3--pressure of thir

d root [kPa]

c d3--molar density of thir

d root [mol/L]

c ierr--error flag: 0 = successful

c 2 = s < smin

c 4 = s > smax

c 8 = s > strp (for subl input)

c 160 = CRITP di

d not converge

c 161 = SATS di

d not converg

e for one root

c 162 = SATS di

d not converg

e for two roots

c 163 = SATS di

d not converg

e for all roots

c herr--error string (character*255 variable if ierr<>0)

c

c The secon

d root is always set as th

e root in the vapor at temperatures

c below the maximum entropy on the vapor saturation line. If kph is

c set to 2, an

d only on

e root is found in the vapor (this occurs when s

f 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 thir

d root is th

e root with the lowest temperature. For fluids

c with multiple roots: When only one root is foun

d in th

e 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 place

d in

c k3,t3,p3,d3. For fluids that never have more than one root (when there c is no maximum entropy along the saturate

d vapor line), th

e value o

f 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 calculate

d 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 = liqui

d 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]

subroutine DPTSATK (icomp,t,kph,p,rho,csat,dpt,ierr,herr)

c

c compute the heat capacity an

d dP/dT along th

e 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 = liqui

d 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 calle

d from CSATK) c dpt--dP/dT along th

e saturation line [kPa/K]

c (this is not dP/dT "at" the saturation line for the single phase

c state, but the change in saturate

d vapor pressur

e 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 saturate

d liquid stat

e is assumed.

c

c outputs:

c cv2p--isochoric two-phase heat capacity [J/mol-K]

c csat--saturation heat capacity [J/mol-K]

c (Although there is already a csat routine in REFPROP,

c it is also returne

d here. However, th

e calculation

c spee

d is slower than csat.)

Two similar routines are provided for calculating surface tension.

SURTEN is more efficient if the liquid and vapor density and composition

are known (e.g., from a previous call to SATT). If these are not known,

then SURFT may be used.

subroutine SURFT (t,rhol,xl,sigma,ierr,herr)

c

c compute surface tension

c

c inputs:

c t--temperature [K]

c xl--composition of liqui

d phas

e [array o

f mol frac]

c outputs:

c rhol--molar density of liqui

d phas

e [mol/L]

c if rho > 0 use as input value

c < 0 call SATT to fin

d density

c sigma--surface tension [N/m]

c ierr--error flag: 0 = successful

c 1 = T < Tmin

c 8 = x out of range

c 9 = T an

d x out of range

c 120 = CRITP di

d not converge

c 121 = T > Tcrit

c 122 = TPRHO-liqui

d did not converg

e in SATT c 123 = TPRHO-vapor did not converge in SATT c 124 = SATT pure fluid iteration did not converge c 128 = SATT mixture iteration did not converge c herr--error string i

f ierr<>0 (character*255)

subroutine SURTEN (t,rhol,rhov,xl,xv,sigma,ierr,herr)

c

c compute surface tension

c

c inputs:

MT明泰_读卡器_API接口函数库使用说明书

API接口函数库使用说明 部文件:V1.0.20 发布时间:2015-04-29

版本更新记录

目录 API接口函数库使用说明 (1) 1. 文档概述 (6) 1.1. 文档围 (6) 1.2. 面向对象 (6) 1.3. 参考资料 (6) 2. 函数库介绍 (6) 2.1. 功能 (6) 2.2. 性能 (7) 3. 运行环境 (7) 3.1. 硬设备 (7) 3.2. 软件的运行平台 (7) 3.3. 函数调用方法 (8) 3.3.1. Delphi调用32位动态库的方法 (8) 3.3.2. VB调用32位动态库的方法 (9) 3.3.3. VC调用32位动态库的方法 (11) 4. API介绍 (11) 4.1. 函数调用流程 (11) 4.1.1. 非接触式存储卡API调用流程 (11) 4.1.2. 非接触式CPU卡片API调用流程 (12) 4.1.3. 接触式CPU卡片API调用流程 (12) 4.1.4. 接触式存储卡片API调用流程 (12) 4.1.5. API调用流程 (12) 4.1.6. 函数操作结果信息表 (16) 4.2. 设备操作函数组 (19) 4.2.1 打开读写器device_open (19) 4.2.2 关闭读写器device_close (19) 4.2.3 判断设备通讯类型device_gettype (19) 4.2.4 设置通讯波特率device_setbaud (20) 4.2.5 获取读写器版本信息device_version (20)

4.2.6 读写器蜂鸣device_beep (21) 4.2.7 LED灯控制 device_ledctrl (21) 4.2.8 获取读写器生产序列号 device_readsnr (22) 4.2.9 获取设备状态 get_device_status (22) 4.2.10 读取读卡器的EEPROM (23) 4.2.11更新读卡器的EEPROM (23) 4.2.12 复位串口配置信息 ReSetupComm (24) 4.2.13 读卡器软复位 device_reset (24) 4.2.14 获取设备状态扩展 get_device_statusEx (25) 4.2.15 获取非接触式CPU卡卡片状态 dev_cardstate (25) 4.2.16 获取接触式CPU卡到位状态 ICC_GetStatus (26) 4.2.17 读EMID号Dev_GetEMID (26) 4.3 接触式卡片操作函数 (27) 4.3.1 判断接触式卡片状态sam_slt_getstate (27) 4.3.2 接触式卡片上电复位sam_slt_reset (28) 4.3.3 接触式卡设置复位波特率sam_slt_reset_baud (28) 4.3.4 接触式卡片下电sam_slt_powerdown (29) 4.4. 非接触 CPU 卡函数 (29) 4.4.1 激活非接触式卡open_card (29) 4.4.2 设置非接触式卡片为halt状态 rf_halt (30) 4.4.3 应用层传输命令card_APDU (31) 4.5 非接触式存储卡操作函数 (31) 4.5.1 激活非接触式存储卡rf_card (31) 4.5.2 非接触式存储卡认证扇区 rf_authentication (33) 4.5.3 非接触式存储卡读数据rf_read (33) 4.5.4 非接触式存储卡写数据rf_write (34) 4.5.5 非接触式存储卡读值块rf_readval (34) 4.5.6 非接触式存储卡写值块rf_initval (35) 4.5.7 非接触式存储卡加值rf_increment (35) 4.5.8 非接触式存储卡减值rf_decrement (36) 4.5.9 非接触式存储卡值传送 rf_transfer (36) 4.6 二代操作函数 (37) 4.6.1 卡操作指令-读卡IDCard_Read (37) 4.6.2 卡操作指令-读卡IDCard_ReadCard (39) 4.6.3卡操作指令根据索引获取数据IDCard_GetCardInfo (40) 4.6.4 获取二代证模块ID IDCard_GetModeID (40) 4.6.5 读卡模块扩展一IDCard_ReadCard_Extra (41) 4.6.6 设置二代证照片存储路径 IDCard_SetPhotoPath (41) 4.6.7 设置二代证照片名字 IDCard_SetPhotoName (42) 4.6.8 读二代证信息扩展二 IDCard_ReadCard_Ex (42) 4.6.9 删除所有二代证照片文件delete_all_photofile (44) 4.6.10 获取卡ID号IDCard_Read_IDNUM (44) 4.6.11 获取卡IDCard_Name (45) 4.6.12 获取卡性别IDCard_Sex (45)

电机常用计算公式和说明

电机电流计算: 对于交流电三相四线供电而言,线电压是380,相电压是220,线电压是根号3相电压 对于电动机而言一个绕组的电压就是相电压,导线的电压是线电压(指A相 B相 C相之间的电压,一个绕组的电流就是相电流,导线的电流是线电流 当电机星接时:线电流=相电流;线电压=根号3相电压。三个绕组的尾线相连接,电势为零,所以绕组的电压是220伏 当电机角接时:线电流=根号3相电流;线电压=相电压。绕组是直接接380的,导线的电流是两个绕组电流的矢量之和 功率计算公式 p=根号三UI乘功率因数是对的 用一个钳式电流表卡在A B C任意一个线上测到都是线电流 极对数与扭矩的关系 n=60f/p n: 电机转速 60: 60秒 f: 我国电流采用50Hz p: 电机极对数 1对极对数电机转速:3000转/分;2对极对数电机转速:60×50/2=1500转/分在输出功率不变的情况下,电机的极对数越多,电机的转速就越低,但它的扭矩就越大。所以在选用电机时,考虑负载需要多大的起动扭距。 异步电机的转速n=(60f/p)×(1-s),主要与频率和极数有关。 直流电机的转速与极数无关,他的转速主要与电枢的电压、磁通量、及电机的结构有关。n=(电机电压-电枢电流*电枢电阻)/(电机结构常数*磁通)。 扭矩公式 T=9550*P输出功率/N转速 导线电阻计算公式: 铜线的电阻率ρ=0.0172, R=ρ×L/S (L=导线长度,单位:米,S=导线截面,单位:m㎡) 磁通量的计算公式: B为磁感应强度,S为面积。已知高斯磁场定律为:Φ=BS 磁场强度的计算公式:H = N × I / Le 式中:H为磁场强度,单位为A/m;N为励磁线圈的匝数;I为励磁电流(测量值),单位位A;Le为测试样品的有效磁路长度,单位为m。 磁感应强度计算公式:B = Φ/ (N × Ae)B=F/IL u磁导率 pi=3.14 B=uI/2R 式中:B为磁感应强度,单位为Wb/m^2;Φ为感应磁通(测量值),单位为Wb;N为感应线圈的匝数;Ae为测试样品的有效截面积,单位为m^2。 感应电动势 1)E=nΔΦ/Δt(普适公式){法拉第电磁感应定律,E:感应电动势(V),n:感应线圈匝数,ΔΦ/Δt:磁通量的变化率} 磁通量变化率=磁通量变化量/时间磁通量变化量=变化后的磁通量-变化前的磁通量 2)E=BLV垂(切割磁感线运动){L:有效长度(m)} 3)Em=nBSω(交流发电机最大的感应电动势){Em:感应电动势峰值} 4)E=BL2ω/2(导体一端固定以ω旋转切割){ω:角速度(rad/s),V:速度(m/s)}

接口使用说明文档

中国移动短信网关 SP端接口使用手册 China Mobile Shot Message Gateway Interface for SP Manual 作者:沈岗 日期:2004年1月 版本:V1.2

一、CMSMIF.CMPPApp 简要说明: 该类采用CMPP协议(V2.0)实现了SP端与移动短信网关的连接处理。 本类中,采用长连接方式与ISMG通讯。通信双方以客户-服务器方式建立TCP连接,用于双方信息的相互提交。当信道上没有数据传输时,通信双方应每隔时间C发送链路检测包以维持此连接,当链路检测包发出超过时间T后未收到响应,立即再发送链路检测包,再连续发送N-1次后仍未得到响应则断开此连接。参数C、T、N可通过属性配置。 消息发送时采用并发方式,即发送一条消息不等待网关回复确认,继续向网关发送短信,这样发送消息速度非常快,完全取决于网关的处理速度及网络速度。为避免消息丢失,同时采用了滑动窗口流量控制,窗口大小可通过属性设置。 消息接收、网络断开等采用事件触发方式,不需应用程序轮询,在此接口基础之上编程方便。 类中运用了多线程技术,如一条线程处理发送网络包,而另一条线程处理从网关上接收网络包,其他还有一些线程处理检测包、网络连接情况监测等,使程序思路明确、执行效率很高、运行非常稳定。 (一)属性 1.ActiveInterval 说明:检测包发送时间间隔,单位:毫秒。默认值为120000,即120秒。为上 述类说明中的C参数。 2.MaxNetworkPackSize 说明:与ISMG通讯时最大网络包大小,单位:字节。默认值为512Byte。 3.MaxRetryTimes 说明:网络超时最大重发次数,单位:次。默认值为3次。为类说明中的N。 4.OverTime 说明:网络包发送超时时间,单位:毫秒,超过此值还未收到回复则重发。默认值 为60000,即60秒。为类说明中的T。 5.QueueLength 说明:网络队列大小,单位:个,默认值为20。为类说明中的滑动窗口大小, 以控制发送流量。 (二)方法 1.ConnectToIsmg 方法说明: 连接到远程短信网关ISMG上,只有连接到远程短信网关上,才可进行短信收发操作。 在本操作中,自动初始化本地Socket,以连接到指定IP服务器的指定端口上。 声明原型:int ConnectToIsmg(string ServerIP,int Port,string SP_ID,string Secret,string SN) 参数说明: ServerIP:远程短信网关服务器的IP地址,如211.138.200.51 Port:远程短信网关服务器的端口号,如7890 SP_ID:企业服务代码

IE安全漏洞及防范措施

IE安全漏洞及防范措施 摘要 谈到联网的计算机,就能想到它百纳海川的资讯,可以在网络的世界里找到自己想了解到的,自己想探索到的新知识,但是要想了解到这些资讯我们需要借助到一个工具,这就是我们每一个人都熟悉的----IE浏览器。技术的进步,离不开知识的传播。时代的需求就是我们的责任,我们要抓住信息时代的脉搏,在Internet飞速发展的今天,互联网成为人们快速获取、发布和传递信息的重要渠道,从而倍受人们的重视。互联网上信息的查找又要通过浏览器的浏览来实现,所以希望通过对IE浏览器的安全漏洞和防范措施的探讨让大家对网络及网络资源搜索的认识以及浏览器的各个功能。 关键词:IE浏览器/漏洞/措施

IE Security vulnerabilities and preventive measures ABSTRACT The PC is popular and the brilliant Computer-Culture is developing rapidly by drived of the Financial globalization,Assimilation of information and the Industrial knowledge-ization.Studying computer knowledge is becoming a consciousness action for many back-hoping people in the Boundary of the century.There are many progresses in the information industry,the time of the network and so on.We can see that more person's work and life are never left by a computer.It isn't left the spread of knowledge by technological progress.The demanding of the time is our responsibility.In the days of the internet developing fastly,we should catch the pulse of it,make the internet become a basilic channel that make people getting,issuancing and passing the news at a rapid rate.And then made the internet receives people's emphasis increasingly.One looking for the information by the browser's browsing,so I hope everyone should increasing Browser vulnerabilities and preventive measures and all kinds of functions of the browser by my paper. Keyword: Internet Explorer /vulnerabilities/measure

小学数学公式大全(计算公式)

小学数学公式大全(计算公式) 数量关系式: 1、每份数×份数=总数总数÷每份数=份 数总数÷份数=每份数 2、 1倍数×倍数=几倍数几倍数÷1倍数=倍数几倍数÷倍数=1倍数 3、速度×时间=路程路程÷速度=时 间路程÷时间=速度 4、单价×数量=总价总价÷单价=数 量总价÷数量=单价 5、工作效率×工作时间=工作总量工作总量÷工作效率=工作时间工作总量÷工作时间=工作效率 6、加数+加数=和和-一个加数=另一个加数 7、被减数-减数=差被减数-差=减数差+减数=被减数 8、因数×因数=积积÷一个因数=另一个因数 9、被除数÷除数=商被除数÷商=除数商×除数=被除数 ****************************************************** 和差问题的公式

(和+差)÷2=大数 (和-差)÷2=小数 和倍问题 和÷(倍数-1)=小数 小数×倍数=大数 (或者和-小数=大数) 差倍问题 差÷(倍数-1)=小数 小数×倍数=大数 (或小数+差=大数) ****************************************************** 植树问题: 1 非封闭线路上的植树问题主要可分为以下三种情形: ⑴如果在非封闭线路的两端都要植树,那么: 株数=段数+1=全长÷株距-1 全长=株距×(株数-1) 株距=全长÷(株数-1)

⑵如果在非封闭线路的一端要植树,另一端不要植树,那么: 株数=段数=全长÷株距 全长=株距×株数 株距=全长÷株数 ⑶如果在非封闭线路的两端都不要植树,那么: 株数=段数-1=全长÷株距-1 全长=株距×(株数+1) 株距=全长÷(株数+1) 2 封闭线路上的植树问题的数量关系如下 株数=段数=全长÷株距 全长=株距×株数 株距=全长÷株数 ****************************************************** 盈亏问题 (盈+亏)÷两次分配量之差=参加分配的份数 (大盈-小盈)÷两次分配量之差=参加分配的份数 (大亏-小亏)÷两次分配量之差=参加分配的份数 ****************************************************** 相遇问题 相遇路程=速度和×相遇时间 相遇时间=相遇路程÷速度和

输入法接口函数说明

输入法编程(转贴)(快看) IME输入法编程 第一章Windows9x系统下汉字输入法的基本原理 Windows系统下汉字输入法实际上是将输入的标准ascii字符串按照一定的编码规则转换为汉字或汉字串,进入到目的地。由于应用程序各不相同,用户不可能自己去设计转换程序,因此,汉字输入自然而然落到WINDOWS系统管理中。 一、输入法与系统的关系 键盘事件应用程序 || Windows的USER.EXE | 输入法管理器 | 输入法 系统的键盘事件有windows的user.exe软件接收后,user.exe在将键盘事件传导输入法管理器(Input Method Manager,简称IMM)中,管理器再将键盘事件传到输入法中,输入法根据用户编码字典,翻译键盘事件为对应的汉字(或汉字串),然后再反传到user.exe 中,user.exe再将翻译后的键盘事件传给当前正运行的应用程序,从而完成汉字的输入。 二、汉字输入法的组成 微软Windows9x系统中汉字输入法的名称是"Input Method Editor " ,简称IME,输入法的程序名称为:*.ime,数据文件名称为*.MB,即通常说的输入法编码表(字典). 实际上IME文件是一个动态连接库程序(DLL),它与dll文件没有区别,只是名称不同而已。 一般汉字输入法都由三个窗口组成: 状态窗口(Status Windows)-显示当前的输入法状态(中文还是英文等站环信息); 编码输入窗口(Composition Windows)-显示当前击键情况; 汉字选择窗口(Candidates Windows)-列出当前编码的全部汉字(串),供用户选择或查询。 上述三个窗口由基本的用户接口(User Interface )函数管理着。 现在我们用Dumpbin.exe打开微软提供的拼音输入法(WINDOWS\SYSTEM\WINPY.IME)看看它有什么组成(这里一WINDOWS98为例,并假定windows系统安装在c:盘下):

Mrbayes中文使用说明

< >内为需要输入的内容,但不包括括号。所有命令都需要在MrBayes >的提示下才能输入。 文件格式: 文件输入,输入格式为Nexus file(ASCII,a simple text file,如图): 或者还有其他信息: interleave=yes 代表数据矩阵为交叉序列interleaved sequences nexus文件可由MacClade或者Mesquite生成。但Mrbayes并不支持the full Nexus standard。 同时,Mrbayes象其它许多系统软件一样允许模糊特点,如:如果一个特点有两个状态2、3,可以表示为:(23),(2,3),{23}或者{2,3}。但除了DNA{A, C, G, T, R, Y, M, K,S, W, H, B, V, D, N}、RNA{A, C, G, U, R, Y, M, K, S, W, H, B, V, D, N}、Protein {A, R, N, D, C, Q, E, G, H, I, L, K, M, F, P, S, T, W, Y, V, X}、二进制数据{0, 1}、标准数据(形态学数据){0, 1, 2, 3, 4, 5, 6, 5, 7, 8, 9}外,并不支持其他数据或者符号形式。 执行文件: execute 或缩写exe ,注意:文件必须在程序所在的文件夹(或者指明文件具体路径),文件名中不能含有空格,如果执行成功,执行窗口会自动输出文件的简单信息。 选定模型: 通常至少需要两个命令,lset和prset,lset用于定义模型的结构,prset用于定义模型参数的先验概率分布。在进行分析之前可以执行showmodel命令检查当前矩阵模型的设置。或者执行help lset检查默认设置(如图): 略 Nucmodel用于指定DNA模型的一般类型。我们通常选取标准的核苷酸替代模型nucleotide substitution model,即默认选项4by4。另外,Doublet选项用于paired stem regions of ribosomal DNA的分析,Codon选项用于DNA sequence in terms of its codons的分析。 替代模型的一般结构一般由Nst设置决定。默认状态下,所有的置换比率相同,对应于F81模型(JC model)。一般我们选用GTR模型,即nst=6。 Code设置只有在DNA模型设置为codon的情况下才使用。Ploidy设置也与我们无关。 Rates通常设置为invgamma (gamma-shaped rate variation with a proportion of invariable sites),Ngammacat(the number of discrete categories used to approximate the gamma distribution)一般采用默认选项4。通常这个设置已经足够,增加该选项设置的数量可能会增加似然计算的精确性,但所花时间也成比例增加,大多数情况下,由增加该数值对结果的影响可以忽略不计。 余下的选项中,只有Covarion和Parsmodel与单核苷酸模型相关,而我们既不会采用parsimony model,也不会采用the covariotide model,故保留默认状态。 在对矩阵作了以上修改后,重新输入help lset命令,可以查看变化后的设置。 设置先验参数prior: 现在可以为模型设置先验参数了。模型有6种类型的参数:the topology, the branch lengths, the four stationary frequencies of the nucleotides, the six different nucleotide substitution rates, the proportion of invariable sites, and

术语说明和计算公式

术语解释 1、林荫停车场 停车位间种植有乔木或通过其他永久式绿化方式进行遮荫,满足绿化遮荫面积大于等于停车场面积30%的停车场。 2、受损弃置地 因生产活动或自然灾害等原因造成自然地形和植被受到破坏,并且废弃或不能使用的宕口、露天开采用地、窑坑、塌陷地等。3、节约型绿地 依据自然和社会资源循环与合理利用的原则进行规划设计和建设管理,具有较高的资源使用效率和较少的资源消耗的绿地。 4、生物防治 利用有益生物或其他生物,以及其他生物的分泌物和提取物来抑制或消灭有害生物的一种防治方法。 5、城市热岛效应 因城市环境造成城市市区中的气温明显高于外围郊区的现象。 6、本地木本植物 原有天然分布或长期生长于本地、适应本地自然条件并融入本地自然生态系统、对本地区原生生物物种和生物环境不产生威胁的木本植物。 7、生物多样性保护

对生态系统、生物物种和遗传的多样性的保护。 8、 城市湿地资源 纳入城市蓝线范围内、具有生态功能的天然或人工、长久或暂时性的沼泽地、泥炭地或水域地带,以及低潮时水深不超过6m 的水域。 计算公式说明 1、 公众对城市园林绿化的满意率应按下式计算: %1008(%)?= (人) 查被抽查公众的总人数城市园林绿化满意度调的公众人数(人) )大于等于查满意度总分(城市园林绿化满意度调满意率公众对城市园林绿化的M 2、 建成区绿化覆盖率应按下式计算: %100km km (%)2 2?=) 建成区面积() 投影面积(建成区所有植被的垂直建成区绿化覆盖率 3、 建成区绿地率应按下式计算: %100km km (%)2 2?= ) 建成区面积() 积(建成区各类城市绿地面建成区绿地率 4、 城市人均公园绿地面积应按下式计算: 量(人) 建成区内的城区人口数)公园绿地面积(人城市人均公园绿地面积22 m )/m (= 5、 建成区绿化覆盖面积中乔、灌木所占比率应按下式计算: %100) hm ( ) hm (面乔灌木(%)占比率绿化覆盖面积中乔2 2?=投影面积建成区所有植被的垂直积的垂直投影建成区灌木所建成区

CAN应用接口函数

CAN应用接口函数库使用手册V1.0

目录 1.接口卡设备类型定义 (3) 2.错误码定义 (4) 3.函数库中的数据结构定义 (5) 3.1.VCI_BOARD_INFO (5) 3.2.VCI_CAN_OBJ (6) 3.3.VCI_CAN_STATUS (7) 3.4.VCI_ERR_INFO (8) 3.5.VCI_INIT_CONFIG (9) 3.6.VCI_RxAcptMask (10) 3.7.VCI_RxAcptFilter (11) 4.接口库函数说明 (12) 4.1.FD_OpenDevice (12) 4.2.FD_CloseDevice (13) 4.3.FD_InitCan (14) 4.4.FD_ReadBoardInfo (15) 4.5.FD_GetReceiveNum (16) 4.6.FD_ClearBuffer (17) 4.7.FD_StartCAN (18) 4.8.FD_ResetCAN (19) 4.9.FD_Transmit (20) 4.10.FD_Receive (21) 4.11.FD_RxAcptMaskInit (22) 4.12.FD_DisableRxAcptFilter (23) 4.13.FD_RxAcptFilterInit (24) 4.13.FD_SetOperationMode (25) 5.接口库函数使用方法 (26) 5.1.VC调用动态库的方法 (26) 5.2.VB调用动态库的方法 (26)

1.接口卡设备类型定义 各个接口卡的类型定义如下: 设备名称设备类型号备注 USBCAN11第一代USBCAN USBCAN22第二代USBCAN CAN2323待开发PCICAN4待开发

spyglass中文使用说明

望远镜用户指南

概览............................................... (5) 关于本指南 望远镜 概观 按钮 手势 最多显示头---(HUD)的 工具和手段 入门................................................ (17) 版本和功能 硬件和软件兼容性说明............................................. (17) 启用定位服务 设置最多望远镜 开始标记和跟踪对象............................................. . (22) ViewVinder ................................................. . (23) 设置颜色 设置最多的HUD 快速切换 HUD的操作模式 缩放 指南针................................................. (28) 校准

增强现实和三维罗盘............................................. .. (29) 寻找目标对象 设置最多罗盘 罗盘定位模式............................................... .. (32) 罗经................................................. .. (34) 开始使用罗经............................................... .. (34) 确定启动轴承............................................... .. (35) 漂移和调整 全球定位系统................................................. . (37) 设置最多的GPS 获取GPS数据 设置单位 查找................................................. .. (39) 概观 按钮 快速目标标记 添加目标 管理目标 寻找和跟踪 在地图上观测地点的目标............................................. .. (47) 跟踪................................................. .. (48) 设置跟踪

计算公式及解释

客户来审核了,检查以我们提供的PPAP,发现我们计算的CPK值小于PPK值,我跟他回复说CPK要求大于1.33,而PPK要求大于1.67,所以这样看应该是要求PPK大于CPK,但是他不认可,说是看到同一组数据计算出来的,说应该是CPK值大于PPK值。查了相关资料也说是PPK大于CPK.到底该是怎么样啊! 何谓工程能力? 所谓工程能力是指在某种产品的生产中,是否能够均一地生产优质产品, 这是产品质量管理的一个重要部分。 生产工程生产均一产品的能力叫做工程能力。 利用±3σ来作为表示这种能力的数值。 利用±3σ作为工程能力值的原因 如果某种产品的质量特征是正态分布的话,以平均数为中心,在±3σ范围 内包含有99.73%的产品,因此,将工程能力值设定为±3σ就几乎包括了所有产品。 工程能力指数存在一定的管理规格时,工程能力值与管理规格的比值叫做工程能力指数。 作为工程能力指数,我们学习了Cp和Cpk。 Cp和Cpk Cp表现了短期内最佳的Process状态,因此称为“短期工程能力指数”。 Cpk另一个工程能力指数Cpk则考虑到随着时间的流逝,每次抽取测定的data的样本时,中间值都有些差异,在这种情况下计算工程能力,叫做“长期工程能力指数”。 工程能力指数的计算--存在两边规格的时候 这是在假定给定data的平均数与基准Spec的中间值相同的情况下计算的。 工程能力指数的计算--只有一边规格的时候 6σ水平的工程能力指数 产品的质量规格在±6之间,最糟糕的情况下,不合格产品率的上限、下限也各自不超过3.4ppm。6σ水平的工程能力指数的目标值是Cp=2.0,Cpk=1.5。 最佳答案 CPK:Complex Process Capability index 的缩写,是现代企业用于表示制成能力的指标。CPK值越大表示品质越佳。 CPK=min((X-LSL/3s),(USL-X/3s)) Cpk——过程能力指数 CPK= Min[ (USL- Mu)/3s, (Mu - LSL)/3s] Cpk应用讲议 1. Cpk的中文定义为:制程能力指数,是某个工程或制程水准的量化反应,也是工程评估的一类指标。 2. 同Cpk息息相关的两个参数:Ca , Cp. Ca: 制程准确度。Cp: 制程精密度。 3. Cpk, Ca, Cp三者的关系:Cpk = Cp * ( 1 - |Ca|),Cpk是Ca及Cp两者的中和反应,Ca反应的是位置关系(集中趋势),Cp反应的是散布关系(离散趋势) 4. 当选择制程站别用Cpk来作管控时,应以成本做考量的首要因素,还有是其品质特性对后制程的影响度。 5. 计算取样数据至少应有20~25组数据,方具有一定代表性。 6. 计算Cpk除收集取样数据外,还应知晓该品质特性的规格上下限(USL,LSL),才可顺利计算其值。 7. 首先可用Excel的“STDEV”函数自动计算所取样数据的标准差(σ),再计算出规格公差(T),

API函数手册

POSTEK PPLⅠAPI函数手册 G Series 条码标签打印机 Version 2.00 深圳市博思得通信发展有限公司 二○○四年

API函数库文件说明 名称:CDFPSK.dll 中文版本编号:1.X.X.X 英文版本编号:2.X.X.X 版权所有:?2004深圳市博思得通信发展有限公司。保留所有权利。 用途 本API函数库为深圳市博思得通信发展有限公司条码标签打印机的用户提供一组命令,为他们编写基于Windows9X,NT,2000,XP等操作系统的应用程序提供便利。 本API函数库仅支持本公司产品。 缩略语对照 PPLⅠ:深圳市博思得通信发展有限公司的第一套打印机编程语言(Printer Porgram Language Ⅰ)。 API:应用程序编程接口(Application Program Interface)。 Dots:像素(pixel)是一种计算机科学技术尺寸单位,原指电视图像成像的最小单位,在打印机领域表示打印机的最小打印成像单位:1dot等于一英寸除以打印机的最大分辨率。 - 对于203DPI的打印机来说, 1dot = 25.4mm/203 = 0.125mm(1dot = 1000 / 203 = 5mil); - 对于300DPI的打印机来说, 1dot = 25.4mm/300 = 0.085mm(1dot = 1000 / 300 = 3mil)。 TrueType Font:是基于Windows操作系统使用,可装卸的字体。 - 已经安装的TrueType Font,都可以被本函数使用。 使用前须知 字符串 * 字符串以双引号(“)作为起始和结束标记; *

DLL函数接口说明

typedef void __stdcall (*fun_AddResult)(char pDataStr[10][255],double pDataDouble[100]); extern "C" void __declspec(dllimport) __stdcall SetBackColor(TColor pBkColor); extern "C" void __declspec(dllimport) __stdcall FanSelect( void *pSeriesNames,//系列名称YLDStr * (typedef struct{char Data[255];} YLDStr;) const int pSeriesNameCount,//系列名称个数,-1时表示全部选择 void *pSubSeriesNames,//系列名称YLDStr * (typedef struct{char Data[255];} YLDStr;) const int pSubSeriesNameCount,//子系列名称个数,-1时表示全部选择 const double &pFlow, //风量 const int &pFlowUnitType, //风量单位类型0-m^3/h 1-m^3/s 2-l/s 3-cfm const double &pPres, //风压 const int &pPresUnitType, //风压单位类型0-Pa 1-mmH2O 2-kgf/cm^2 3-inH2O const int &pPresType, //风压类型0-全压1-静压 const int &pOutFanType,//出风方式0-管道出风1-自由出风 const double &pAirDensity,//空气密度 const double &pMotorSafeCoff,//电机容量安全系数(%) const bool &pUserSetMotorSafeCoff,//用户设定了电机容量安全系数 double &rFlow_STDUnit,//标准单位下的风量 fun_AddResult pAddResult//函数指针,用于回传数据 ); extern "C" void __declspec(dllimport) __stdcall Belt_Selection( const char *pSeriesName, const char *pSubTypeName, const char *pModelName, const int &pSped_DataType,//电机转速类型0-标准数据1-用户数据默认为0(界面选择) const int &pHz_DataType,//频率选择0-50HZ 1-60HZ(界面选择) const int &pRotation,//出风旋转角度R0,R90,R180,R270(参考常量定义) const double &pFanSped,//风机转速(第一步计算得到) const double &pMotorPow,//电机功率(第一步计算得到) const double &pFlow_STDUnit,//标准单位下的风量 const double &pTPres,//全压(第一步计算得到) const double &pSPres,//静压(第一步计算得到) const double &pFTEff,//全压内效率(第一步计算得到) const double &pSdbA,//噪声(第一步计算得到) const int &pV olt,//用户选择的电压(参考电压常量声明V380 V400) , bool pPole[4],//用户选择的极数2,4,6,8 bool pBeltType[4],//用户选择的皮带类型SPZ SPA SPB SPC const bool &pBeSetFanSped,//用户设定了风机转速 const double &pFanSpedRt_User,//用户设定的风机转速差 const bool &pBeSetBeltMoveSped,//用户设定最大皮带运动速度 const double &pBeltMoveSped_User,//用户设定的最大皮带运动速度

测井解释计算常用公式

测井解释计算常用公式目录 1. 地层泥质含量(Vsh)计算公式................................................ .. (1) 2. 地层孔隙度(υ)计算公式....................................... (4) 3. 地层含水饱和度(Sw)计算.......................................................... (7) 4. 钻井液电阻率的计算公式...................................................... . (12) 5. 地层水电阻率计算方法 (13) 6. 确定a、b、m、n参数 (21) 7. 确定烃参数 (24) 8. 声波测井孔隙度压实校正系数Cp的确定方法 (25) 9. 束缚水饱和度(Swb)计算 (26) 10.粒度中值(Md)的计算方法 (28) 11.渗透率的计算方法 (29) 12. 相对渗透率计算方法 (35) 13. 产水率(Fw) (35) 14. 驱油效率(DOF) (36) 15. 计算每米产油指数(PI) (36) 16. 中子寿命测井的计算公式 (36) 17. 碳氧比(C/O)测井计算公式 (38) 18.油层物理计算公式 (44) 19.地层水的苏林分类法 (48) 20. 毛管压力曲线的换算 (48) 21. 地层压力 (50) 22. 气测录井的图解法 (51) 附录:石油行业单位换算 (53)

测井解释计算常用公式 1. 地层泥质含量(Vsh )计算公式 1.1 利用自然伽马(GR )测井资料 1.1.1 常用公式 min max min GR GR GR GR SH --= (1) 式中,SH -自然伽马相对值; GR -目的层自然伽马测井值; GRmin -纯岩性地层的自然伽马测井值; GRmax -纯泥岩地层的自然伽马测井值。 1 2 12--= ?GCUR SH GCUR sh V (2) 式中,Vsh -泥质含量,小数; GCUR -与地层年代有关的经验系数,新地层取3.7,老地层取2。 1.1.2 自然伽马进行地层密度和泥质密度校正的公式 o sh o b sh B GR B GR V -?-?= max ρρ (3) 式中,ρb 、ρsh -分别为储层密度值、泥质密度值; Bo -纯地层自然伽马本底数; GR -目的层自然伽马测井值; GRmax -纯泥岩的自然伽马值。 1.1.3 对自然伽马考虑了泥质的粉砂成分的统计方法 C SI SI B A GR V b sh +-?-?= 1ρ (4) 式中,SI -泥质的粉砂指数; SI =(ΦNclay -ΦNsh )/ΦNclay (5) (ΦNclay 、ΦNsh 分别为ΦN -ΦD 交会图上粘土点、泥岩点的中子孔隙度) A 、B 、C -经验系数。 1.2 利用自然电位(SP )测井资料

C语言函数说明与返回值

C语言函数说明与返回值 在学习C语言函数以前,我们需要了解什么是模块化程序设计方法。 人们在求解一个复杂问题时,通常采用的是逐步分解、分而治之的方法,也就是把一个大问题分解成若干个比较容易求解的小问题,然后分别求解。程序员在设计一个复杂的应用程序时,往往也是把整个程序划分为若干功能较为单一的程序模块,然后分别予以实现,最后再把所有的程序模块像搭积木一样装配起来,这种在程序设计中分而治之的策略,被称为模块化程序设计方法。 在C语言中,函数是程序的基本组成单位,因此可以很方便地用函数作为程序模块来实现C语言程序。 利用函数,不仅可以实现程序的模块化,程序设计得简单和直观,提高了程序的易读性和可维护性,而且还可以把程序中普通用到的一些计算或操作编成通用的函数,以供随时调用,这样可以大大地减轻程序员的代码工作量。 函数是C语言的基本构件,是所有程序活动的舞台。函数的一般形式是: type-specifier function_name(parameter list) parameter declarations { body of the function } 类型说明符定义了函数中return语句返回值的类型,该返回值可以是任何有效类型。如果没有类型说明符出现,函数返回一个整型值。参数表是一个用逗号分隔的变量表,当函数被调用时这些变量接收调用参数的值。一个函数可以没有参数,这时函数表是空的。但即使没有参数,括号仍然是必须要有的。参数说明段定义了其中参数的类型。

当一个函数没有明确说明类型时, C语言的编译程序自动将整型( i n t)作为这个函数的缺省类型,缺省类型适用于很大一部分函数。当有必要返回其它类型数据时,需要分两步处理: 首先,必须给函数以明确的类型说明符;其次,函数类型的说明必须处于对它的首次调用之前。只有这样,C编译程序才能为返回非整型的值的函数生成正确代码。 4.1.1 函数的类型说明 可将函数说明为返回任何一种合法的C语言数据类型。 类型说明符告诉编译程序它返回什么类型的数据。这个信息对于程序能否正确运行关系极大,因为不同的数据有不同的长度和内部表示。 返回非整型数据的函数被使用之前,必须把它的类型向程序的其余部分说明。若不这样做,C语言的编译程序就认为函数是返回整型数据的函数,调用点又在函数类型说明之前,编译程序就会对调用生成错误代码。为了防止上述问题的出现,必须使用一个特别的说明语句,通知编译程序这个函数返回什么值。下例示出了这种方法。 第一个函数的类型说明sum()函数返回浮点类型的数据。这个说明使编译程序能够对sum( ) 的调用产生正确代码。 函数类型说明语句的一般形式是: type_specifier function_name (; ) 即使函数使用形参,也不要将其写入说明句。若未使用类型说明语句,函数返回的数据类型可能与调用者所要求的不一致,其结果是难以预料的。如果两者同处于一个文件中,编译程序可以发现该错误并停止编译。如果不在同一个文件中,编译程序无法发现这种错误。类型检查仅在编译中进行,链接和运行时均不检查。因此,必须十分细心以确保绝不发生上

相关文档
最新文档