Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
SUBROUTINE ReadEnergyMeters
! SUBROUTINE INFORMATION:
! AUTHOR Richard Liesen
! DATE WRITTEN 1998
! MODIFIED na
! RE-ENGINEERED December 2003 RJL
! PURPOSE OF THIS SUBROUTINE:
! Read Energy Results from the meters
! This routine reads the meters for the energy used
! METHODOLOGY EMPLOYED:
! NA
! REFERENCES:
! na
! USE STATEMENTS:
USE DataHVACGlobals, ONLY: FracTimeStepZone
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64), external :: GetInstantMeterValue
FuelType%ElecFacility =GetInstantMeterValue(FuelType%ElecFacilityIndex,1)*FracTimeStepZone + &
GetInstantMeterValue(FuelType%ElecFacilityIndex,2)
FuelType%DieselFacility =GetInstantMeterValue(FuelType%DieselFacilityIndex,1)*FracTimeStepZone + &
GetInstantMeterValue(FuelType%DieselFacilityIndex,2)
FuelType%PurchCoolFacility =GetInstantMeterValue(FuelType%PurchCoolFacilityIndex,1)*FracTimeStepZone + &
GetInstantMeterValue(FuelType%PurchCoolFacilityIndex,2)
FuelType%PurchHeatFacility =GetInstantMeterValue(FuelType%PurchHeatFacilityIndex,1)*FracTimeStepZone + &
GetInstantMeterValue(FuelType%PurchHeatFacilityIndex,2)
FuelType%NatGasFacility =GetInstantMeterValue(FuelType%NatGasFacilityIndex,1)*FracTimeStepZone + &
GetInstantMeterValue(FuelType%NatGasFacilityIndex,2)
FuelType%GasolineFacility =GetInstantMeterValue(FuelType%GasolineFacilityIndex,1)*FracTimeStepZone + &
GetInstantMeterValue(FuelType%GasolineFacilityIndex,2)
FuelType%CoalFacility =GetInstantMeterValue(FuelType%CoalFacilityIndex,1)*FracTimeStepZone + &
GetInstantMeterValue(FuelType%CoalFacilityIndex,2)
FuelType%FuelOil1Facility =GetInstantMeterValue(FuelType%FuelOil1FacilityIndex,1)*FracTimeStepZone + &
GetInstantMeterValue(FuelType%FuelOil1FacilityIndex,2)
FuelType%FuelOil2Facility =GetInstantMeterValue(FuelType%FuelOil2FacilityIndex,1)*FracTimeStepZone + &
GetInstantMeterValue(FuelType%FuelOil2FacilityIndex,2)
FuelType%PropaneFacility =GetInstantMeterValue(FuelType%PropaneFacilityIndex,1)*FracTimeStepZone + &
GetInstantMeterValue(FuelType%PropaneFacilityIndex,2)
FuelType%OtherFuel1Facility=GetInstantMeterValue(FuelType%OtherFuel1FacilityIndex,1)*FracTimeStepZone + &
GetInstantMeterValue(FuelType%OtherFuel1FacilityIndex,2)
FuelType%OtherFuel2Facility=GetInstantMeterValue(FuelType%OtherFuel2FacilityIndex,1)*FracTimeStepZone + &
GetInstantMeterValue(FuelType%OtherFuel2FacilityIndex,2)
FuelType%ElecProducedFacility =GetInstantMeterValue(FuelType%ElecProducedFacilityIndex,1)*FracTimeStepZone + &
GetInstantMeterValue(FuelType%ElecProducedFacilityIndex,2)
FuelType%SteamFacility =GetInstantMeterValue(FuelType%SteamFacilityIndex,1)*FracTimeStepZone + &
GetInstantMeterValue(FuelType%SteamFacilityIndex,2)
FuelType%ElecPurchasedFacility =GetInstantMeterValue(FuelType%ElecPurchasedFacilityIndex,1)*FracTimeStepZone + &
GetInstantMeterValue(FuelType%ElecPurchasedFacilityIndex,2)
FuelType%ElecSurplusSoldFacility =GetInstantMeterValue(FuelType%ElecSurplusSoldFacilityIndex,1)*FracTimeStepZone + &
GetInstantMeterValue(FuelType%ElecSurplusSoldFacilityIndex,2)
!Now these fuel types have to be sorted and summed into categories that we have pollution factors for.
!The Off-Site Electricity is the total needed by the facility minus the amount generated on-site.
!The on-site pollutants will end up being other fuel types used by the generators.
!If the difference between the 2 electric quantities is <0.0 then it will be zero for that time step.
!We will also add the District Cooling here with a rough conversion from Energy using the User
!defined COP.
FuelType%Elec = FuelType%ElecFacility - FuelType%ElecProducedFacility + &
FuelType%PurchCoolFacility/Pollution%PurchCoolCOP
If(FuelType%Elec .le. 0.0d0) FuelType%Elec = 0.0d0
!The Natural Gas fuel type will be summed from the meters with the District Heating using an efficiency.
FuelType%NatGas = FuelType%NatGasFacility + &
FuelType%PurchHeatFacility/Pollution%PurchHeatEffic + &
FuelType%SteamFacility/Pollution%SteamConvEffic
!The Distillate Oil or Fuel Oil #1
FuelType%FuelOil1 = FuelType%FuelOil1Facility
!The Residual Oil fuel type will be summed with the Fuel Oils
FuelType%FuelOil2 = FuelType%FuelOil2Facility
!The Gasoline fuel type will be summed
FuelType%Gasoline = FuelType%GasolineFacility
!The Natural Gas fuel type will be summed with the Nat gas and Propane fuel types from the meters and the Purchased
FuelType%Propane = FuelType%PropaneFacility
!The Coal fuel type will be assigned Coal
FuelType%Coal = FuelType%CoalFacility
!The Diesel fuel type will be summed
FuelType%Diesel = FuelType%DieselFacility
!The OtherFuel1 fuel type will be summed
FuelType%OtherFuel1 = FuelType%OtherFuel1Facility
!The OtherFuel2 fuel type will be summed
FuelType%OtherFuel2 = FuelType%OtherFuel2Facility
FuelType%ElecPurch = FuelType%ElecPurchasedFacility
FuelType%ElecSold = FuelType%ElecSurplusSoldFacility
RETURN
END SUBROUTINE ReadEnergyMeters