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 GetInputFuelAndPollutionFactors
! SUBROUTINE INFORMATION:
! AUTHOR Jason Glazer
! DATE WRITTEN January 2004
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Read the Fuel Factor inputs by the user to
! get the source energy conversion factors
! Also reads PolutionCalculationFactors to
! get information on district cooling and heating
! METHODOLOGY EMPLOYED:
! Uses get input structure similar to other objects
! REFERENCES:
! na
! USE STATEMENTS:
USE PollutionModule, ONLY: GetFuelFactorInfo, GetEnvironmentalImpactFactorInfo
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) :: curSourceFactor
LOGICAL :: fuelFactorUsed
LOGICAL :: fFScheduleUsed
INTEGER :: ffScheduleIndex
!set the default factors for source energy - they will be overwritten if the user sets any values
sourceFactorElectric = 3.167d0
sourceFactorNaturalGas = 1.084d0
sourceFactorSteam = 0.3d0
sourceFactorGasoline = 1.05d0
sourceFactorDiesel = 1.05d0
sourceFactorCoal = 1.05d0
sourceFactorFuelOil1 = 1.05d0
sourceFactorFuelOil2 = 1.05d0
sourceFactorPropane = 1.05d0
sourceFactorOtherFuel1 = 1.0d0
sourceFactorOtherFuel2 = 1.0d0
! the following should be kept consistent with the assumptions in the pollution calculation routines
efficiencyDistrictCooling = 3.0d0
efficiencyDistrictHeating = 0.3d0
! TotalSourceEnergyUse = (gatherTotalsSource(1) & !total source from electricity
! + gatherTotalsSource(2) & !natural gas
! + gatherTotalsSource(3) & !gasoline
! + gatherTotalsSource(4) & !diesel
! + gatherTotalsSource(5) & !coal
! + gatherTotalsSource(6) & !fuel oil #1
! + gatherTotalsSource(7) & !fuel oil #2
! + gatherTotalsSource(8) & !propane
! + gatherTotalsBEPS(3)*sourceFactorElectric/efficiencyDistrictCooling & !district cooling
! + gatherTotalsBEPS(4)*sourceFactorNaturalGas/efficiencyDistrictHeating & !district heating
! + gatherTotalsBEPS(5)*sourceFactorSteam & !steam
! ) / largeConversionFactor
CALL GetFuelFactorInfo('NaturalGas',fuelFactorUsed,curSourceFactor,fFScheduleUsed,ffScheduleIndex)
IF (fuelFactorUsed) THEN
sourceFactorNaturalGas = curSourceFactor
fuelfactorsused(2)=.true.
ffUsed(2)=.true.
ENDIF
SourceFactors(2) = curSourceFactor
IF (fFScheduleUsed) THEN
fuelFactorSchedulesUsed=.true.
ffSchedUsed(2) = .TRUE.
ffSchedIndex(2) = ffScheduleIndex
ENDIF
CALL GetFuelFactorInfo('ResidualOil',fuelFactorUsed,curSourceFactor,fFScheduleUsed,ffScheduleIndex)
IF (fuelFactorUsed) THEN
sourceFactorFuelOil2 = curSourceFactor
fuelfactorsused(7)=.true.
ffUsed(11)=.true.
ENDIF
SourceFactors(11) = curSourceFactor
IF (fFScheduleUsed) THEN
fuelFactorSchedulesUsed=.true.
ffSchedUsed(11) = .TRUE.
ffSchedIndex(11) = ffScheduleIndex
ENDIF
CALL GetFuelFactorInfo('DistillateOil',fuelFactorUsed,curSourceFactor,fFScheduleUsed,ffScheduleIndex)
IF (fuelFactorUsed) THEN
sourceFactorFuelOil1 = curSourceFactor
fuelfactorsused(6)=.true.
ffUsed(10)=.true.
ENDIF
SourceFactors(10) = curSourceFactor
IF (fFScheduleUsed) THEN
fuelFactorSchedulesUsed=.true.
ffSchedUsed(10) = .TRUE.
ffSchedIndex(10) = ffScheduleIndex
ENDIF
CALL GetFuelFactorInfo('Coal',fuelFactorUsed,curSourceFactor,fFScheduleUsed,ffScheduleIndex)
IF (fuelFactorUsed) THEN
sourceFactorCoal = curSourceFactor
fuelfactorsused(5)=.true.
ffUsed(9)=.true.
ENDIF
SourceFactors(9) = curSourceFactor
IF (fFScheduleUsed) THEN
fuelFactorSchedulesUsed=.true.
ffSchedUsed(9) = .TRUE.
ffSchedIndex(9) = ffScheduleIndex
ENDIF
CALL GetFuelFactorInfo('Electricity',fuelFactorUsed,curSourceFactor,fFScheduleUsed,ffScheduleIndex)
IF (fuelFactorUsed) THEN
sourceFactorElectric = curSourceFactor
fuelfactorsused(1)=.true.
ffUsed(1)=.true.
ENDIF
SourceFactors(1) = curSourceFactor
IF (fFScheduleUsed) THEN
fuelFactorSchedulesUsed=.true.
ffSchedUsed(1) = .TRUE.
ffSchedIndex(1) = ffScheduleIndex
ENDIF
CALL GetFuelFactorInfo('Gasoline',fuelFactorUsed,curSourceFactor,fFScheduleUsed,ffScheduleIndex)
IF (fuelFactorUsed) THEN
sourceFactorGasoline = curSourceFactor
fuelfactorsused(3)=.true.
ffUsed(6)=.true.
ENDIF
SourceFactors(6) = curSourceFactor
IF (fFScheduleUsed) THEN
fuelFactorSchedulesUsed=.true.
ffSchedUsed(6) = .TRUE.
ffSchedIndex(6) = ffScheduleIndex
ENDIF
CALL GetFuelFactorInfo('Propane',fuelFactorUsed,curSourceFactor,fFScheduleUsed,ffScheduleIndex)
IF (fuelFactorUsed) THEN
sourceFactorPropane = curSourceFactor
fuelfactorsused(8)=.true.
ffUsed(12)=.true.
ENDIF
SourceFactors(12) = curSourceFactor
IF (fFScheduleUsed) THEN
fuelFactorSchedulesUsed=.true.
ffSchedUsed(12) = .TRUE.
ffSchedIndex(12) = ffScheduleIndex
ENDIF
CALL GetFuelFactorInfo('Diesel',fuelFactorUsed,curSourceFactor,fFScheduleUsed,ffScheduleIndex)
IF (fuelFactorUsed) THEN
sourceFactorDiesel = curSourceFactor
fuelfactorsused(4)=.true.
ffUsed(8)=.true.
ENDIF
SourceFactors(8) = curSourceFactor
IF (fFScheduleUsed) THEN
fuelFactorSchedulesUsed=.true.
ffSchedUsed(8) = .TRUE.
ffSchedIndex(8) = ffScheduleIndex
ENDIF
CALL GetFuelFactorInfo('DistrictCooling',fuelFactorUsed,curSourceFactor,fFScheduleUsed,ffScheduleIndex)
IF (fuelFactorUsed) THEN
ffUsed(3)=.true.
ENDIF
SourceFactors(3) = curSourceFactor
IF (fFScheduleUsed) THEN
ffSchedUsed(3) = .TRUE.
ffSchedIndex(3) = ffScheduleIndex
ENDIF
CALL GetFuelFactorInfo('DistrictHeating',fuelFactorUsed,curSourceFactor,fFScheduleUsed,ffScheduleIndex)
IF (fuelFactorUsed) THEN
ffUsed(4)=.true.
ENDIF
SourceFactors(4) = curSourceFactor
IF (fFScheduleUsed) THEN
ffSchedUsed(4) = .TRUE.
ffSchedIndex(4) = ffScheduleIndex
ENDIF
CALL GetFuelFactorInfo('Steam',fuelFactorUsed,curSourceFactor,fFScheduleUsed,ffScheduleIndex)
IF (fuelFactorUsed) THEN
ffUsed(5)=.true.
ENDIF
SourceFactors(5) = curSourceFactor
IF (fFScheduleUsed) THEN
ffSchedUsed(5) = .TRUE.
ffSchedIndex(5) = ffScheduleIndex
ENDIF
CALL GetFuelFactorInfo('OtherFuel1',fuelFactorUsed,curSourceFactor,fFScheduleUsed,ffScheduleIndex)
IF (fuelFactorUsed) THEN
sourceFactorOtherFuel1 = curSourceFactor
fuelfactorsused(11)=.true. ! should be source number
ffUsed(13)=.true.
ENDIF
SourceFactors(13) = curSourceFactor
IF (fFScheduleUsed) THEN
fuelFactorSchedulesUsed=.true.
ffSchedUsed(13) = .TRUE.
ffSchedIndex(13) = ffScheduleIndex
ENDIF
CALL GetFuelFactorInfo('OtherFuel2',fuelFactorUsed,curSourceFactor,fFScheduleUsed,ffScheduleIndex)
IF (fuelFactorUsed) THEN
sourceFactorOtherFuel2 = curSourceFactor
fuelfactorsused(12)=.true. ! should be source number
ffUsed(14)=.true.
ENDIF
SourceFactors(14) = curSourceFactor
IF (fFScheduleUsed) THEN
fuelFactorSchedulesUsed=.true.
ffSchedUsed(14) = .TRUE.
ffSchedIndex(14) = ffScheduleIndex
ENDIF
CALL GetEnvironmentalImpactFactorInfo(efficiencyDistrictHeating,efficiencyDistrictCooling,sourceFactorSteam)
END SUBROUTINE GetInputFuelAndPollutionFactors