The Danfoss Commercial Compressors calculation DLL is a small software package which calculates
compressor performance data for Danfoss scroll compressors and Maneurop reciprocating
compressors. The DLL can be considered as a black-box or a subroutine and has to be linked to a
client software application in order to be operational.
The client software application can access the DLL to get compressor performance data at user defined
conditions.
Note: In the rest of this text Danfoss Commercial Compressors is abbreviated to Danfoss CC.
Features / functionality
Although the Danfoss CC calculation DLL performs capacity calculations it shall not be confused with
an ordinary calculation program. There are several particularities:
The DLL is not an independent program. It must be linked to a client program for input and output.
The DLL does not have its own user interface.
The DLL does performance calculations but it does not list technical data such as electrical data,
dimensions etc.
The DLL includes the Danfoss CC compressor offering but not condensing units, nor Secop
reciprocating compressors manufactured for Danfoss.
The DLL can calculate performance outside the normal application envelope within certains limits.
The DLL is for experienced users only
Legal aspects
The legal text as printed at the bottom of this document also applies to the DLL itself. In particular we
emphasize the contents of paragraph 4.5 (Return codes) of this document for a correct interpretation
of the calculation results.
The DLL is sent to you on a basis of mutual trust between you and Danfoss. You are not allowed to
transfer the DLL or any of the components shipped together with it to any other third party.
In case you received the DLL from any other party than Danfoss, Danfoss cannot accept responsability
for the calculation results.
Function definitions
Initialises the DLL and specifies the path where the database is located.
Function:
DFS_GetRefrigerant & DFS_GetRefrigerantH
Instructions
Function:
DFS_GetFamily & DFS_GetFamilyH
Function:
DFS_GetPower & DFS_GetPowerH
Function:
DFS_GetModel
Instructions
Function:
DFS_GetModelData
Function:
DFS_Rating
Function: DFS_Rating (Key, Model, Refrigerant, Frequency, Te, Tc, Sc, Sh1, Sh2, Cap, Pow, Cur,
Mas, Cop, Tdis, Heat, HCop) ReturnCode
Gives compressor performance data corresponding to input conditions.
Input parameters
Key: 0 or key
When Key = 0; Function uses input parameters Model, Refrigerant & Frequency
When Key <> 0; Function uses record corresponding to Key and ignores input parameters
Model, Refrigerant & Frequency. Note: when Key is used but no record corresponding to value
Key can be found, this results in return code 1.
Model: Compressor model name
Refrigerant: Refrigerant name (not the Refrigerant code)
Frequency: Frequency in Hz
Te: Evaporating temperature in C
Tc: Condensing temperature in C
Sc: Subcooling in K
Sh1: Superheat at evaporator outlet in K
Sh2: Superheat at compressor suction inlet in K
Output parameters
Cap: Cooling capacity in W
Pow: Power input in W
Cur: Current consumption in A
Mas: Mass flow in kg/s
Cop: Coefficient of performance in W/W
Tdis: Discharge temperature in C
Heat: Heating capacity in W
HCop: Heating coefficient of performance in W/W
Return parameter
ReturnCode: Error code
Instructions
Function:
DFS_RatingV2
Function: RatingV2 (Key, Model, Refrigerant, Frequency, Te, Tc, Sc, Sh1, Sh2, Cap, Pow, Cur, Mas,
Cop, Tdis, Heat, HCop, SIT, IP, PEX, TS, Mi) ReturnCode
Gives compressor performance data corresponding to input conditions.
Input parameters
Key: 0 or key
When Key = 0; Function uses input parameters Model, Refrigerant & Frequency
When Key <> 0; Function uses record corresponding to Key and ignores input parameters
Model, Refrigerant & Frequency. Note: when Key is used but no record corresponding to value
Key can be found, this results in return code 1.
Model: Compressor model name
Refrigerant: Refrigerant name (not the Refrigerant code)
Frequency: Frequency in Hz
Te: Evaporating temperature in C
Tc: Condensing temperature in C
Sc: Subcooling in K
Sh1: Superheat at evaporator outlet in K
Sh2: Superheat at compressor suction inlet in K
Output parameters
Cap: Cooling capacity in W
Pow: Power input in W
Cur: Current consumption in A
Mas: Mass flow in kg/s
Cop: Coefficient of performance in W/W
Tdis: Discharge temperature in C
Heat: Heating capacity in W
HCop: Heating coefficient of performance in W/W
SIT: Intermediate dew temperature in C
IP: Intermediate injection pressure in Pa
PEX: Economizer load in W
TS: Liquid temperature in C
Mi: Injection mass flow in kg/s
Return parameter
ReturnCode: Error code
Argument
Type
Unit
Argument
Type
Unit
File path
string
Frequency
integer
Hz
Key
integer
Te
double
NewKey
integer
Tc
double
Model
string
Sc
double
NewModel
string
Sh1
double
Refrigerant
string
Sh2
double
RefCode
integer
Cap
double
OldRefCode
integer
Pow
double
NewRefCode
integer
Cur
double
NewRefName
string
Mas
double
kg/s
FamCode
integer
Tdis
double
OldFamCode
integer
Cop
double
W/W
NewFamCode
integer
Heat
double
NewFamName
string
HCop
double
W/W
PowCode
integer
SIT
double
OldPowCode
integer
double
NewPowCode
integer
IP
PEX
double
C
Pa
W
NewPowName
string
TS
double
ReturnCode
integer
Mi
double
kg/s
Mode
double
FielName
string
Value
string
Instructions
Code definitions
Refrigerant codes
Family codes
Power codes
Application codes
Refrigerant code
Definition
R22
R404A
R407C
R410A
R134a
Family code
Definition
Refrigerant code
Definition
11
12
13
14
The application code is used to select either compressors for Refrigeration & A/C or for Heating
applications.
Application code
Definition
Instructions
Return codes
The return code indicates eventual errors or warnings related to the calculation.
Return code
Definition
Calculation OK.
-1
-2
-3
-4
-5
-6
-7
-8
Negative superheat.
-9
Negative subcooling.
-10
10
11
15
When the return code is 0, this means that the calculation is OK and there are no errors or warnings.
The calculation result can be used as is.
When the return code is negative, this indicates an error. The input is invalid or the input conditions are
too far outside the compressor application envelope. No calculation is made and all output are values
are: 9999.999
When the return code is positive, this indicates a warning. The input conditions are outside the
envelope or represent an unlikely condition. The DLL performs a calculation, but the calculation result
is approximative and for information only. The result of such calculations may be required in following
situations:
To calculate performance at a condition that will appear only during a relatively short period of
time, such as pump down.
To avoid that the client application crashes when making iterative calculations.
To accelerate the client application.
A positive return code shall never be interpreted as an approval from Danfoss CC to operate the
compressor at the corresponding condition. A positive return code means in the first place that
the condition is out of envelope. In such case, the input conditions shall be verified and eventually
corrected until the return code is zero. If there is a need anyhow to operate the compressor at a
condition with positive return code, this shall be done only after consulting the Danfoss CC.
The Selection & Application Guidelines from Danfoss CC shall always be your reference for defining the
application envelope.
Instructions
The DLL works with units C, K, W, A and kg/s. If the client application works with another unit system
the values shall be converted.
Evaporating temperature (Te) and Condensing temperature (Tc) must be passed to the functions in C.
When the client application works in F this value shall be converted to C:
5
Tc = x (Tf + 40) - 40
9
Discharge temperature (Tdis) is given by the DLL in C. When the client application works in F the C
value can be converted from C to F:
9
Tf = x (Tc + 40) - 40
5
Temperature difference
Temperature differences such as subcooling (Sc) and superheat (Sh1 & Sh2) must be passed to the
funtions in K. When the client application works in F this value shall be converted to K.
5
dTk = x dTf
9
When the client application would work in C this same value can be used, since temperature difference
in C equals temperature difference in K.
dTk = dTc
Cooling capacity
Cooling capacity is given by the DLL in W. When the client application works in Btu/h the output value
can be converted from W to Btu/h:
Qb =
Qw
0.293
Power input
Current consumption
Mass flow
Mass flow is given by the DLL in kg/s. When the client application works in lb/s the output value can
be converted from kg/s to lb/s:
Mlb = 2.20462 x Mkg
Instructions
(_
BYVAL STRPATH AS STRING _
) AS LONG
(_
BYVAL ICODE AS LONG, _
BYREF INEWCODE AS LONG, _
BYREF STRNAME AS STRING _
) AS LONG
(_
BYVAL ICODE AS LONG, _
BYREF INEWCODE AS LONG, _
BYREF STRNAME AS STRING _
) AS LONG
(_
BYVAL ICODE AS LONG, _
BYREF INEWCODE AS LONG, _
BYREF STRNAME AS STRING _
) AS LONG
(_
BYVAL ICODE AS LONG, _
BYREF INEWCODE AS LONG, _
BYREF STRNAME AS STRING _
) AS LONG
(_
BYVAL ICODE AS LONG, _
BYREF INEWCODE AS LONG, _
BYREF STRNAME AS STRING _
) AS LONG
(_
BYVAL ICODE AS LONG, _
BYREF INEWCODE AS LONG, _
BYREF STRNAME AS STRING _
) AS LONG
(_
BYVAL ICODE AS LONG, _
BYVAL IREFR AS LONG, _
BYVAL IFAM AS LONG, _
BYVAL IPOW AS LONG, _
BYREF INEWCODE AS LONG, _
BYREF STRNAME AS STRING, _
BYVAL MODE AS DOUBLE _
) AS LONG
Instructions
(_
BYVAL ICODE AS LONG, _
BYVAL STRFIELDNAME AS STRING, _
BYREF STRVALUE AS STRING _
) AS LONG
(_
BYVAL ICODE AS LONG, _
BYVAL STRMODEL AS STRING, _
BYVAL STRREFRIG AS STRING, _
BYVAL IFREQ AS LONG, _
BYVAL TE AS DOUBLE, _
BYVAL TC AS DOUBLE, _
BYVAL SC AS DOUBLE, _
BYVAL SH1 AS DOUBLE, _
BYVAL SH2 AS DOUBLE, _
BYREF COOLINGCAPACITY AS DOUBLE, _
BYREF POWERINPUT AS DOUBLE, _
BYREF CURRENTCONSUMPTION AS DOUBLE, _
BYREF MASSFLOW AS DOUBLE, _
BYREF COP AS DOUBLE, _
BYREF DISTEMP AS DOUBLE, _
BYREF HEAT AS DOUBLE, _
BYREF HCOP AS DOUBLE _
) AS LONG
(_
BYVAL ICODE AS LONG, _
BYVAL STRMODEL AS STRING, _
BYVAL STRREFRIG AS STRING, _
BYVAL IFREQ AS LONG, _
BYVAL TE AS DOUBLE, _
BYVAL TC AS DOUBLE, _
BYVAL SC AS DOUBLE, _
BYVAL SH1 AS DOUBLE, _
BYVAL SH2 AS DOUBLE, _
BYREF COOLINGCAPACITY AS DOUBLE, _
BYREF POWERINPUT AS DOUBLE, _
BYREF CURRENTCONSUMPTION AS DOUBLE, _
BYREF MASSFLOW AS DOUBLE, _
BYREF COP AS DOUBLE, _
BYREF DISTEMP AS DOUBLE, _
BYREF HEAT AS DOUBLE, _
BYREF HCOP AS DOUBLE, _
BYREF DSIT AS DOUBLE, _
BYREF DIP AS DOUBLE, _
BYREF DPEX AS DOUBLE, _
BYREF DTS AS DOUBLE, _
BYREF DMI AS DOUBLE _
) AS LONG
Instructions
An example is available on C:\_Foresee\Xls. This file can be used only if you install Foresee on the C drive.
This excel can be use with Excel 2000 to 2010.
List:
Give the list output and use these functions:
DFS_GetModel
DFS_GetRefrigerant
DFS_GetFamily
DFS_GetPower
Init:
Use Excel function for cleaning the list output.
Calculate:
Use the function : DFS_RatingV2
Input data
List output
Output data