'============= Create and Open Database Connection =============
'OPEN THE DATABASE
If blnConnectToDB Then
blnDBconnectionDown = false
on error resume next
set dbConn = Server.CreateObject("ADODB.Connection")
'Open the Connnection
dbConn.Open "DSN=PostgreSQL30", "eere_news", "33reNews"
''New Error trapping. KC added 2/23/2012
If Err.Number <> 0 Then
''Response.Write (Err.Description& "
Set dbConn = nothing
blnDBconnectionDown = true
On Error GoTo 0
''error trapping not working here KC removed 2/23/2012
''tmpDBErrorNativeError = 0
'' For Each dbErr In dbConn.Errors
'' strErrMsg = strErrMsg & _
'' "Source: " & dbErr.Source & vbCrLF & _
'' "Description: " & dbErr.Description & vbCrLF & _
'' "SQL State: " & dbErr.SQLState & vbCrLF & _
'' "NativeError: " & dbErr.NativeError & vbCrLF & _
'' "Number: " & dbErr.Number & vbCrLF & vbCrLF
'' tmpDBErrorNativeError = dbErr.NativeError
'' If (dbConn.Errors.Count > 0) AND (tmpDBErrorNativeError <> 5703) Then
'' Set dbConn = nothing
'' blnDBconnectionDown = true
'' End If
Public Function GetRS2(myCommand)
On Error GoTo 0
'objConn: local connection object
'objRS: local recordset object
'objComm: command object passed in to the function
Dim objConn, objRS, blnErrorLogged, objComm
'Create the command object
Set objComm = Server.CreateObject("ADODB.Command")
Set objComm = myCommand
'Create the connection object
Set objConn = Server.CreateObject("ADODB.Connection")
'Open the connection object
objConn.Open "DSN=PostgreSQL30", "eere_news", "33reNews"
'Set the active connection
objComm.ActiveConnection = objConn
'Create the recordset object
Set objRS = Server.CreateObject("ADODB.Recordset")
'Set the cursor location for disconnected recordsets
'objRS.CursorLocation = adUseClient
'Turn on error handling for just a second
' On Error Resume Next
'Open the recordset
'objRS.Open SQL, objConn, adOpenStatic, adLockOptimistic
Set objRS = objComm.Execute
'Response.Write "State = " & objRS.State & " "
'Response.Write "Count = " & objRS.RecordCount & " "
'Check for an error
' If Err.Number <> 0 Then
' Response.Write "Database Error Occured
' Response.Write "SQL: "
' Response.Write SQL
' End If
'Turn off error handling
' On Error GoTo 0
'Disconnect the recordset
'Set objComm.ActiveConnection = Nothing
'Close the connection
'Set the connection to Nothing
'Set objConn = Nothing
'Set the Command to Nothing
'Set objComm = Nothing
'Return the recordset
Set GetRS2 = objRS
On Error Resume Next
'Create Recordset Object
set rs = Server.CreateObject("ADODB.Recordset")
If blnConnectToDB Then
'Open Recordset based on SQL
rs.Open sSQL, dbConn, 1, 3, 1
set GetRs = rs
'Open the Command Object
dbConn.Execute sSQL, lRecordsAffected
'Return the Records Affected
ExecSQL = lRecordsAffected
Dim sch ' Schema
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
.Item(sch & "sendusing") = 2
.Item(sch & "smtpserver") = "mxrelay.doe.gov"
Set cdoMessage = CreateObject("CDO.Message")
Set .Configuration = cdoConfig
.From = strFrom
.To = strTo
.Subject = strSubject
.TextBody = strMessage
Set cdoMessage = Nothing
Set cdoConfig = Nothing
tmpString = Replace(tmpString , "<", "")
tmpString = Replace(tmpString , ">", "")
tmpString = Replace(tmpString , "'", "")
tmpString = Replace(tmpString , """", "")
tmpString = Replace(tmpString , ";", "")
tmpString = Replace(tmpString , "(", "")
tmpString = Replace(tmpString , ")", "")
removeBadChars = tmpString
'If there is a mobile version of this site, check the user_agent, and forward to
'the mobile version of the site (unless cookie or querystring var is set)
if "true" = "true" then
tmpSeeFullPage = Mid(Request.Querystring("m"),1,1)
if ((isMobile) and (tmpSeeFullPage <> "1")) then
tmpMobileURL = Request.servervariables("HTTP_URL")
tmpMobileFileName = mid(tmpMobileURL, InStrRev(tmpMobileURL, "/")+1)
tmpMobileURL = Left(tmpMobileURL, InStrRev(tmpMobileURL, "/"))
tmpMobileURL = tmpMobileURL & "m/" & tmpMobileFileName
tmpTitle = "Federal Energy Management Program: Energy Savings Calculator for Air-Cooled Electric Chillers"
''Added the following code to make EERE news/events items work with the embedded addthis code.
strQueryString = ""
if request.servervariables("QUERY_STRING") <> "" then
strQueryString = "%3F" & Server.HTMLEncode(request.servervariables("QUERY_STRING"))
if inStr(LCase(tmpTitle), "newsdetail") > 0 Then
tmpTitle = replace(tmpTitle, "NewsDetail", "News")
if inStr(LCase(tmpTitle), "eventsdetail") > 0 Then
tmpTitle = replace(tmpTitle, "EventsDetail", "Event")
arrAddThis = Array("email", "facebook", "twitter", "google", "delicious", "digg")
arrAddThisDesc(0) = "Send a link to " & tmpTitle & " to someone by E-mail"
arrAddThisDesc(1) = "Share " & tmpTitle & " on Facebook"
arrAddThisDesc(2) = "Tweet about " & tmpTitle & " on Twitter"
arrAddThisDesc(3) = "Bookmark " & tmpTitle & " on Google"
arrAddThisDesc(4) = "Bookmark " & tmpTitle & " on Delicious"
arrAddThisDesc(5) = "Rank " & tmpTitle & " on Digg"
''This code is strictly when a user clicks on a left nav and needs to be forwarded to another site/program/office
if ("" <> "") then
Energy Savings Calculator for Air-Cooled Electric Chillers
This cost calculator is a screening tool that estimates a product's lifetime energy cost savings at various efficiency levels.
Learn more about the calculator assumptions and definitions.
This energy savings calculator only provides information about the relative difference between two equivalent products, all other factors being equal. Other assumptions include:
Base model - Values represent a 100-ton air-cooled electric chiller operated for 2,000 full-load hours per year with an EER of 9. The performance of this standard unit is based on ASHRAE Standard 90.1.
Default values - The values pre-loaded into the calculator represent average operating conditions in the Federal sector. Calculations assume that efficiency ratings entered by the user are based on the Air-Conditioning and Refrigeration Institute's (ARI) 1998 Standard 550/590.
FEMP efficiency standard - Chiller installations are typically optimized for full-load or partial-load operation. FEMP standards mandate that a new product purchase must meet minimum efficiency requirements for both full-load and partial-load design conditions. The energy and cost savings outputs in this calculator are dependent on the primary design condition (either a full-load or a partial-load application), not the combination.
U.S. Federal average electricity price - $/kWh
Energy efficiency ratio (EER) to kW/ton conversion - Efficiencies for air-cooled electric chillers are typically measured as EER, whereas water-cooled electric chillers are typically measured in kW/ton. Efficiencies expressed in EER can be converted to kW/ton with the following formula: kW/ton = 12 / EER.
Chiller efficiencies - In instances where both water-cooled and air-cooled chillers are viable installation options, water-cooled chillers likely offer higher efficiencies at the same capacity when compared to air-cooled chillers.
Uniform present value (UPV) – 16.34
Lifetime energy costs - Values represent the sum of the discounted value of annual energy costs, based on an assumed chiller life of 23 years.
Price trends and discount rate - Future electricity price trends and a discount rate of 3% are based on Federal guidelines.
Energy efficiency ratio (EER) is the ratio of net cooling capacity (or heat removed in Btu/h) to the total input rate of electric power applied in watts. The units of EER are Btu/Wh. A higher EER value indicates a more efficient system.
Uniform present value (UPV) is a discount factor calculated from the NIST product lifetime and utility rate.
Integrated part-load value (IPLV) is an efficiency metric calculated using AHRI Standard 550/590 test conditions at load capacities of 25%, 50%, 75%, and 100%. It is intended to provide comparative information about a chiller used under variable load conditions.
Note: Full-load and IPLV efficiencies are derived from standard test inputs and are therefore generically comparable. NPLV must be calculated for the specific load rating points desired for each chiller being compared.