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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | thisPV | |||
logical, | intent(in) | :: | RunFlag |
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 CalcSimplePV(thisPV, RunFlag)
! SUBROUTINE INFORMATION:
! AUTHOR B. Griffith
! DATE WRITTEN Jan. 2004
! MODIFIED B. Griffith, Aug. 2008
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! calculate the electricity production using a simple PV model
! METHODOLOGY EMPLOYED:
! <description>
! REFERENCES:
! na
! USE STATEMENTS:
USE DataHeatBalance, ONLY: QRadSWOutIncident
USE ScheduleManager, ONLY: GetCurrentScheduleValue
USE DataHVACGlobals, ONLY: TimeStepSys
USE DataGlobals, ONLY: SecInHour
USE DataSurfaces, ONLY: Surface
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: thisPV
LOGICAL, INTENT(IN) :: RunFlag !unused1208
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: thisSurf ! working index ptr to Surface arrays
REAL(r64) :: Eff ! working variable for solar electric efficiency
!unused1208 REAL(r64) :: ArrayEnergy !working variable for PV energy this system time step
!first get surface index to use as a pointer
thisSurf = PVArray(thisPV)%SurfacePtr
IF (QRadSWOutIncident(thisSurf) > MinIrradiance) then
!get efficiency
SELECT CASE (PVArray(thisPV)%SimplePVModule%EfficencyInputMode)
CASE (FixedEfficiency)
Eff = PVArray(thisPV)%SimplePVModule%PVEfficiency
CASE (ScheduledEfficiency) ! get from schedule
Eff = GetCurrentScheduleValue(PVArray(thisPV)%SimplePVModule%EffSchedPtr )
PVArray(thisPV)%SimplePVModule%PVEfficiency = Eff
CASE DEFAULT
call showSevereError('caught bad Mode in Generator:Photovoltaic:Simple use FIXED or SCHEDULED efficiency mode')
END SELECT
PVArray(thisPV)%Report%DCPower = &
PVArray(thisPV)%SimplePVModule%AreaCol & ! active solar cellsurface net area
* Eff & ! solar conversion efficiency
* QRadSWOutIncident(thisSurf) ! solar incident
! store sink term in appropriate place for surface heat transfer itegration
PVArray(thisPV)%SurfaceSink = PVArray(thisPV)%Report%DCPower
! array energy, power * timestep
PVArray(thisPV)%Report%DCEnergy = PVArray(thisPV)%Report%DCPower * (TimeStepSys * SecInHour)
PVArray(thisPV)%Report%ArrayEfficiency = Eff
ELSE !not enough incident solar, zero things out
PVArray(thisPV)%SurfaceSink = 0.0d0
PVArray(thisPV)%Report%DCEnergy = 0.0d0
PVArray(thisPV)%Report%DCPower = 0.0d0
PVArray(thisPV)%Report%ArrayEfficiency = 0.0d0
ENDIF
RETURN
END SUBROUTINE CalcSimplePV