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 GetPVInput
! SUBROUTINE INFORMATION:
! AUTHOR David Bradley
! DATE WRITTEN January 2003
! MODIFIED B.Griffith Dec. 2003 - Jan 2004 added input for Simple and Sandia PV model
! B. Griffith Feb. 2008 - revised input for TRNSYS pv model for BIPV and inverter
! B. Griffith Aug. 2008 - revised input for new organization and naming convention
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine gets the input for the Photovoltaic units saving it in
! the data structures defined in DataPhotovoltaics.f90.
! METHODOLOGY EMPLOYED:
! subroutine structure taken from Beta2 BaseboardRadiator.f90
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: GetNumObjectsFound, GetObjectItem, VerifyName, FindItemInList, &
SameString
USE DataIPShortCuts
USE DataGlobals, ONLY: DegToRadians, KelvinConv
!unused0909 USE DataEnvironment, ONLY: Longitude, TimeZoneMeridian
USE DataSurfaces, ONLY: Surface, TotSurfaces, ExternalEnvironment, &
SurfaceClass_Shading, SurfaceClass_Detached_F, SurfaceClass_Detached_B
USE DataHeatBalance
USE ScheduleManager, ONLY: GetScheduleIndex
USE TranspiredCollector, ONLY: GetTranspiredCollectorIndex
USE General, ONLY: RoundSigDigits
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:
INTEGER :: PVNum ! working variable for do loop through pv arrays
INTEGER :: SurfNum ! working variable for surface id in Heat Balance domain
INTEGER :: ModNum ! working variable for do loop through Sandia model parameter input
INTEGER :: NumAlphas ! Number of PV Array parameter alpha names being passed
INTEGER :: NumNums ! Number of PV Array numeric parameters are being passed
INTEGER :: IOSTAT
LOGICAL :: ErrorsFound = .FALSE. ! if errors detected in input
LOGICAL :: IsNotOK ! Flag to verify name
LOGICAL :: IsBlank ! Flag for blank name
INTEGER :: ThisParamObj !
INTEGER :: dupPtr
TYPE(SimplePVParamsStruct), ALLOCATABLE, DIMENSION(:) :: tmpSimpleModuleParams ! temporary, for processing input data
TYPE(TRNSYSPVModuleParamsStruct), ALLOCATABLE, DIMENSION(:) :: tmpTNRSYSModuleParams ! temporary, for processing input data
TYPE(SNLModuleParamsStuct), ALLOCATABLE, DIMENSION(:) :: tmpSNLModuleParams ! temporary, for processing input data
! count how many photovoltaic arrays of different types are in the .idf
NumPVs = GetNumObjectsFound(cPVGeneratorObjectName )
NumSimplePVModuleTypes = GetNumObjectsFound(cPVSimplePerfObjectName )
Num1DiodePVModuleTypes = GetNumObjectsFound(cPVEquiv1DiodePerfObjectName )
NumSNLPVModuleTypes = GetNumObjectsFound(cPVSandiaPerfObjectName )
IF (NumPVs <= 0) THEN
CALL ShowSevereError('Did not find any '//Trim(cPVGeneratorObjectName) )
RETURN
ENDIF
IF (.NOT. ALLOCATED(PVarray)) ALLOCATE(PVarray(NumPVs))
ALLOCATE(CheckEquipName(NumPVs))
CheckEquipName=.true.
cCurrentModuleObject = cPVGeneratorObjectName
Do PVnum = 1, NumPVs
CALL GetObjectItem(cCurrentModuleObject,PVnum, cAlphaArgs, NumAlphas, rNumericArgs, NumNums, IOSTAT, &
AlphaBlank=lAlphaFieldBlanks, AlphaFieldnames=cAlphaFieldNames, NumericFieldNames=cNumericFieldNames )
IsNotOK = .FALSE.
IsBlank = .FALSE.
CALL VerifyName(cAlphaArgs(1), PVarray%Name, PVnum -1, IsNotOK, IsBlank, TRIM(cCurrentModuleObject)//' Name' )
IF (IsNotOK) THEN
ErrorsFound=.TRUE.
IF (IsBlank) cAlphaArgs(1) = 'xxxxx'
ENDIF
PVarray(PVNum)%Name = cAlphaArgs(1)
PVarray(PVNum)%SurfaceName = cAlphaArgs(2)
PVarray(PVNum)%SurfacePtr = FindItemInList(cAlphaArgs(2),Surface%Name,TotSurfaces)
! required-surface
IF (lAlphaFieldBlanks(2)) THEN
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(2))//' = '//TRIM(cAlphaArgs(2)) )
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//' = '//TRIM(cAlphaArgs(1)) )
CALL ShowContinueError('Surface name cannot be blank')
ErrorsFound=.TRUE.
ENDIF
IF (PVarray(PVNum)%SurfacePtr == 0) THEN
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(2))//' = '//TRIM(cAlphaArgs(2)) )
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//' = '//TRIM(cAlphaArgs(1)) )
ErrorsFound=.TRUE.
ELSE
! Found one -- make sure has right parameters for PV
SurfNum = PVarray(PVNum)%SurfacePtr
Surface(SurfNum)%isPV = .TRUE.
IF (.NOT. Surface(SurfNum)%ExtSolar) THEN
CALL ShowWarningError('Invalid '//TRIM(cAlphaFieldNames(2))//' = '//TRIM(cAlphaArgs(2)) )
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//' = '//TRIM(cAlphaArgs(1)) )
CALL ShowContinueError( 'Surface is not exposed to solar, check surface bounday condition')
END IF
! check surface orientation, warn if upside down
IF (( Surface(SurfNum)%Tilt < -95.0D0 ) .OR. (Surface(SurfNum)%Tilt > 95.0D0)) THEN
CALL ShowWarningError('Suspected input problem with '//TRIM(cAlphaFieldNames(2))//' = '//TRIM(cAlphaArgs(2)) )
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//' = '//TRIM(cAlphaArgs(1)) )
CALL ShowContinueError( 'Surface used for solar collector faces down')
CALL ShowContinueError('Surface tilt angle (degrees from ground outward normal) = ' &
//TRIM(RoundSigDigits(Surface(SurfNum)%Tilt,2) ) )
ENDIF
ENDIF
PVArray(PVNum)%PVModelType = iNotYetSetPVModel
IF (SameString(cAlphaArgs(3), cPVSimplePerfObjectName)) THEN
PVArray(PVNum)%PVModelType = iSimplePVModel
ELSEIF( SameString(cAlphaArgs(3), cPVEquiv1DiodePerfObjectName)) Then
PVArray(PVNum)%PVModelType = iTRNSYSPVModel
ELSEIF ( SameString(cAlphaArgs(3), cPVSandiaPerfObjectName)) THEN
PVArray(PVNum)%PVModelType = iSandiaPVModel
ELSE ! throw error, did not find module performance type
If (lAlphaFieldBlanks(3)) then
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(3))//' = '//TRIM(cAlphaArgs(3)) )
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//' = '//TRIM(cAlphaArgs(1)) )
CALL ShowContinueError('Field cannot be blank')
ErrorsFound=.TRUE.
ELSE
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(3))//' = '//TRIM(cAlphaArgs(3)) )
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//' = '//TRIM(cAlphaArgs(1)) )
CALL ShowContinueError('Did not recognize entry')
ErrorsFound=.TRUE.
ENDIF
ENDIF
PVArray(PVNum)%PerfObjName = cAlphaArgs(4) ! check later once perf objects are loaded
PVArray(PVNum)%CellIntegrationMode = iNotYetSetCellIntegration
If (SameString(cAlphaArgs(5), 'Decoupled')) Then
PVArray(PVNum)%CellIntegrationMode = iDecoupledCellIntegration
ELSEIF(SameString(cAlphaArgs(5), 'DecoupledUllebergDynamic')) Then
PVArray(PVNum)%CellIntegrationMode = iDecoupledUllebergDynamicCellIntegration
ELSEIF(SameString(cAlphaArgs(5), 'IntegratedSurfaceOutsideFace')) Then
PVArray(PVNum)%CellIntegrationMode = iSurfaceOutsideFaceCellIntegration
ELSEIF(SameString(cAlphaArgs(5), 'IntegratedTranspiredCollector')) Then
PVArray(PVNum)%CellIntegrationMode = iTranspiredCollectorCellIntegration
ELSEIF(SameString(cAlphaArgs(5), 'IntegratedExteriorVentedCavity')) Then
PVArray(PVNum)%CellIntegrationMode = iExteriorVentedCavityCellIntegration
ELSEIF(SameString(cAlphaArgs(5), 'PhotovoltaicThermalSolarCollector')) Then
PVArray(PVNum)%CellIntegrationMode = iPVTSolarCollectorCellIntegration
ELSE
IF (lAlphaFieldBlanks(5)) then
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(5))//' = '//TRIM(cAlphaArgs(5)) )
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//' = '//TRIM(cAlphaArgs(1)) )
CALL ShowContinueError('Field cannot be blank')
ErrorsFound=.TRUE.
ELSE
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(5))//' = '//TRIM(cAlphaArgs(5)) )
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//' = '//TRIM(cAlphaArgs(1)) )
CALL ShowContinueError('Did not recognize entry')
ErrorsFound=.TRUE.
ENDIF
ENDIF
PVArray(PVNum)%NumSeriesNParall = rNumericArgs(1)
PVArray(PVNum)%NumModNSeries = rNumericArgs(2)
ENDDO ! main PV array objects
! search for duplicate PV arrays on integrated heat transfer surfaces, accumulating source terms across arrays is not supported
DO PVnum = 1, NumPVs
IsNotOK = .FALSE.
SELECT CASE (PVArray(PVNum)%CellIntegrationMode)
CASE (iSurfaceOutsideFaceCellIntegration, iTranspiredCollectorCellIntegration, iExteriorVentedCavityCellIntegration )
dupPtr = FindItemInList(PVarray(PVNum)%SurfaceName, PVarray(PVNum+1:NumPVs)%SurfaceName, (NumPVs - PVnum) )
IF (dupPtr /= 0) dupPtr = dupPtr + PVNum ! to correct for shortened array in find item
IF (dupPtr /= 0) THEN
IF (PVArray(dupPtr)%CellIntegrationMode == iSurfaceOutsideFaceCellIntegration) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//': problem detected with multiple PV arrays.')
CALL ShowContinueError('When using IntegratedSurfaceOutsideFace heat transfer mode, only one PV array can be coupled')
CALL ShowContinueError('Both '//TRIM(PVarray(PVNum)%Name)//' and '//TRIM(PVarray(dupPtr)%Name)//' are using surface ' &
//TRIM(PVarray(PVNum)%SurfaceName) )
ErrorsFound=.TRUE.
ELSEIF (PVArray(dupPtr)%CellIntegrationMode == iTranspiredCollectorCellIntegration) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//': problem detected with multiple PV arrays.')
CALL ShowContinueError('When using IntegratedTranspiredCollector heat transfer mode, only one PV array can be coupled')
CALL ShowContinueError('Both '//TRIM(PVarray(PVNum)%Name)//' and '//TRIM(PVarray(dupPtr)%Name)//' are using UTSC ' &
//'surface = ' //TRIM(PVarray(PVNum)%SurfaceName) )
ErrorsFound=.TRUE.
ELSEIF (PVArray(dupPtr)%CellIntegrationMode ==iExteriorVentedCavityCellIntegration) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//': problem detected with multiple PV arrays.')
CALL ShowContinueError('When using IntegratedExteriorVentedCavity heat transfer mode, only one PV array can be coupled')
CALL ShowContinueError('Both '//TRIM(PVarray(PVNum)%Name)//' and '//TRIM(PVarray(dupPtr)%Name)//' are using exterior ' &
//'vented surface = ' //TRIM(PVarray(PVNum)%SurfaceName) )
ErrorsFound=.TRUE.
ENDIF
ENDIF
END select
ENDDO
IF (NumSimplePVModuleTypes > 0) THEN
ALLOCATE(tmpSimpleModuleParams(NumSimplePVModuleTypes))
cCurrentModuleObject = cPVSimplePerfObjectName
Do ModNum=1,NumSimplePVModuleTypes
CALL GetObjectItem(cCurrentModuleObject, ModNum,cAlphaArgs,NumAlphas, &
rNumericArgs,NumNums,IOSTAT, &
AlphaBlank=lAlphaFieldBlanks, AlphaFieldnames=cAlphaFieldNames, NumericFieldNames=cNumericFieldNames)
IsNotOK=.FALSE.
IsBlank=.FALSE.
CALL VerifyName(cAlphaArgs(1),tmpSimpleModuleParams%name,ModNum-1,IsNotOK,IsBlank, &
Trim(cCurrentModuleObject)//' Name')
IF (IsNotOK) THEN !repeat or blank name so don't add
ErrorsFound=.TRUE.
CYCLE
ENDIF
tmpSimpleModuleParams(ModNum)%Name = cAlphaArgs(1)
tmpSimpleModuleParams(ModNum)%ActiveFraction = rNumericArgs(1)
If (SameString(cAlphaArgs(2), 'Fixed')) Then
tmpSimpleModuleParams(ModNum)%EfficencyInputMode = FixedEfficiency
ELSEIF( SameString(cAlphaArgs(2), 'Scheduled')) Then
tmpSimpleModuleParams(ModNum)%EfficencyInputMode = ScheduledEfficiency
ELSE
IF (lAlphaFieldBlanks(2)) then
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(2))//' = '//TRIM(cAlphaArgs(2)) )
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//' = '//TRIM(cAlphaArgs(1)) )
CALL ShowContinueError('Field cannot be blank')
ErrorsFound=.TRUE.
ELSE
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(2))//' = '//TRIM(cAlphaArgs(2)) )
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//' = '//TRIM(cAlphaArgs(1)) )
CALL ShowContinueError('Did not recognize entry')
ErrorsFound=.TRUE.
ENDIF
ENDIF
tmpSimpleModuleParams(ModNum)%PVEfficiency = rNumericArgs(2)
tmpSimpleModuleParams(ModNum)%EffSchedPtr = GetScheduleIndex(cAlphaArgs(3))
If ( (tmpSimpleModuleParams(ModNum)%EffSchedPtr == 0) .AND. &
( tmpSimpleModuleParams(ModNum)%EfficencyInputMode == ScheduledEfficiency) ) THEN
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(3))//' = '//TRIM(cAlphaArgs(3)) )
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//' = '//TRIM(cAlphaArgs(1)) )
CALL ShowContinueError('Did not find schedule')
ErrorsFound=.TRUE.
ENDIF
ENDDO
ENDIF !
IF (Num1DiodePVModuleTypes > 0) Then
ALLOCATE(tmpTNRSYSModuleParams(Num1DiodePVModuleTypes) )
cCurrentModuleObject =cPVEquiv1DiodePerfObjectName
Do ModNum=1,Num1DiodePVModuleTypes
CALL GetObjectItem(cCurrentModuleObject, ModNum,cAlphaArgs,NumAlphas, &
rNumericArgs,NumNums,IOSTAT, &
AlphaBlank=lAlphaFieldBlanks, AlphaFieldnames=cAlphaFieldNames, NumericFieldNames=cNumericFieldNames )
IsNotOK=.FALSE.
IsBlank=.FALSE.
CALL VerifyName(cAlphaArgs(1),tmpTNRSYSModuleParams%name,ModNum-1,IsNotOK,IsBlank, &
Trim(cCurrentModuleObject)//' Name')
IF (IsNotOK) THEN !repeat or blank name so don't add
ErrorsFound=.TRUE.
CYCLE
ENDIF
tmpTNRSYSModuleParams(ModNum)%Name = cAlphaArgs(1)
IF (SameString(cAlphaArgs(2), 'CrystallineSilicon')) THEN
tmpTNRSYSModuleParams(ModNum)%CellType = CrystallineSiPVCells
ELSEIF (SameString(cAlphaArgs(2), 'AmorphousSilicon')) THEN
tmpTNRSYSModuleParams(ModNum)%CellType = AmorphousSiPVCells
ELSE
IF (lAlphaFieldBlanks(2)) then
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(2))//' = '//TRIM(cAlphaArgs(2)) )
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//' = '//TRIM(cAlphaArgs(1)) )
CALL ShowContinueError('Field cannot be blank')
ErrorsFound=.TRUE.
ELSE
CALL ShowSevereError('Invalid '//TRIM(cAlphaFieldNames(2))//' = '//TRIM(cAlphaArgs(2)) )
CALL ShowContinueError('Entered in '//TRIM(cCurrentModuleObject)//' = '//TRIM(cAlphaArgs(1)) )
CALL ShowContinueError('Did not recognize entry')
ErrorsFound=.TRUE.
ENDIF
ENDIF
tmpTNRSYSModuleParams(ModNum)%CellsInSeries = INT(rNumericArgs(1))
tmpTNRSYSModuleParams(ModNum)%Area = rNumericArgs(2)
tmpTNRSYSModuleParams(ModNum)%TauAlpha = rNumericArgs(3)
tmpTNRSYSModuleParams(ModNum)%SemiConductorBandgap = rNumericArgs(4)
tmpTNRSYSModuleParams(ModNum)%ShuntResistance = rNumericArgs(5)
tmpTNRSYSModuleParams(ModNum)%RefIsc = rNumericArgs(6)
tmpTNRSYSModuleParams(ModNum)%RefVoc = rNumericArgs(7)
tmpTNRSYSModuleParams(ModNum)%RefTemperature = rNumericArgs(8) + KelvinConv
tmpTNRSYSModuleParams(ModNum)%RefInsolation = rNumericArgs(9)
tmpTNRSYSModuleParams(ModNum)%Imp = rNumericArgs(10)
tmpTNRSYSModuleParams(ModNum)%Vmp = rNumericArgs(11)
tmpTNRSYSModuleParams(ModNum)%TempCoefIsc = rNumericArgs(12)
tmpTNRSYSModuleParams(ModNum)%TempCoefVoc = rNumericArgs(13)
tmpTNRSYSModuleParams(ModNum)%NOCTAmbTemp = rNumericArgs(14)+ KelvinConv
tmpTNRSYSModuleParams(ModNum)%NOCTCellTemp = rNumericArgs(15)+ KelvinConv
tmpTNRSYSModuleParams(ModNum)%NOCTInsolation = rNumericArgs(16)
tmpTNRSYSModuleParams(ModNum)%HeatLossCoef = rNumericArgs(17)
tmpTNRSYSModuleParams(ModNum)%HeatCapacity = rNumericArgs(18)
ENDDO
ENDIF
IF(NumSNLPVModuleTypes > 0) THEN
ALLOCATE(tmpSNLModuleParams(NumSNLPVModuleTypes))
cCurrentModuleObject = cPVSandiaPerfObjectName
Do ModNum=1, NumSNLPVModuleTypes
CALL GetObjectItem(cCurrentModuleObject, ModNum,cAlphaArgs,NumAlphas, &
rNumericArgs,NumNums,IOSTAT, &
AlphaBlank=lAlphaFieldBlanks, AlphaFieldnames=cAlphaFieldNames, NumericFieldNames=cNumericFieldNames )
IsNotOK=.FALSE.
IsBlank=.FALSE.
CALL VerifyName(cAlphaArgs(1),tmpSNLModuleParams%name,ModNum-1,IsNotOK,IsBlank, &
Trim(cCurrentModuleObject)//' Name')
IF (IsNotOK) THEN !repeat or blank name so don't add
ErrorsFound=.TRUE.
CYCLE
ENDIF
tmpSNLModuleParams(ModNum)%Name = cAlphaArgs(1)
tmpSNLModuleParams(ModNum)%Acoll = rNumericArgs(1)
tmpSNLModuleParams(ModNum)%NcellSer = rNumericArgs(2)
tmpSNLModuleParams(ModNum)%NparSerCells = rNumericArgs(3)
tmpSNLModuleParams(ModNum)%Isc0 = rNumericArgs(4)
tmpSNLModuleParams(ModNum)%Voc0 = rNumericArgs(5)
tmpSNLModuleParams(ModNum)%Imp0 = rNumericArgs(6)
tmpSNLModuleParams(ModNum)%Vmp0 = rNumericArgs(7)
tmpSNLModuleParams(ModNum)%aIsc = rNumericArgs(8)
tmpSNLModuleParams(ModNum)%aImp = rNumericArgs(9)
tmpSNLModuleParams(ModNum)%c_0 = rNumericArgs(10)
tmpSNLModuleParams(ModNum)%c_1 = rNumericArgs(11)
tmpSNLModuleParams(ModNum)%BVoc0 = rNumericArgs(12)
tmpSNLModuleParams(ModNum)%mBVoc = rNumericArgs(13)
tmpSNLModuleParams(ModNum)%BVmp0 = rNumericArgs(14)
tmpSNLModuleParams(ModNum)%mBVmp = rNumericArgs(15)
tmpSNLModuleParams(ModNum)%DiodeFactor = rNumericArgs(16)
tmpSNLModuleParams(ModNum)%c_2 = rNumericArgs(17)
tmpSNLModuleParams(ModNum)%c_3 = rNumericArgs(18)
tmpSNLModuleParams(ModNum)%a_0 = rNumericArgs(19)
tmpSNLModuleParams(ModNum)%a_1 = rNumericArgs(20)
tmpSNLModuleParams(ModNum)%a_2 = rNumericArgs(21)
tmpSNLModuleParams(ModNum)%a_3 = rNumericArgs(22)
tmpSNLModuleParams(ModNum)%a_4 = rNumericArgs(23)
tmpSNLModuleParams(ModNum)%b_0 = rNumericArgs(24)
tmpSNLModuleParams(ModNum)%b_1 = rNumericArgs(25)
tmpSNLModuleParams(ModNum)%b_2 = rNumericArgs(26)
tmpSNLModuleParams(ModNum)%b_3 = rNumericArgs(27)
tmpSNLModuleParams(ModNum)%b_4 = rNumericArgs(28)
tmpSNLModuleParams(ModNum)%b_5 = rNumericArgs(29)
tmpSNLModuleParams(ModNum)%DT0 = rNumericArgs(30)
tmpSNLModuleParams(ModNum)%fd = rNumericArgs(31)
tmpSNLModuleParams(ModNum)%a = rNumericArgs(32)
tmpSNLModuleParams(ModNum)%b = rNumericArgs(33)
tmpSNLModuleParams(ModNum)%c_4 = rNumericArgs(34)
tmpSNLModuleParams(ModNum)%c_5 = rNumericArgs(35)
tmpSNLModuleParams(ModNum)%Ix0 = rNumericArgs(36)
tmpSNLModuleParams(ModNum)%Ixx0 = rNumericArgs(37)
tmpSNLModuleParams(ModNum)%c_6 = rNumericArgs(38)
tmpSNLModuleParams(ModNum)%c_7 = rNumericArgs(39)
ENDDO
ENDIF
! now fill collector performance data into main PV structure
DO PVnum = 1, NumPVs
SELECT CASE (PVArray(PVNum)%PVModelType)
CASE (iSimplePVModel)
ThisParamObj = FindItemInList(PVArray(PVNum)%PerfObjName, tmpSimpleModuleParams%Name, NumSimplePVModuleTypes)
IF (ThisParamObj > 0) THEN
PVArray(PVNum)%SimplePVModule = tmpSimpleModuleParams(ThisParamObj) !entire structure assignment
! do one-time setups on input data
PVArray(PVNum)%SimplePVModule%AreaCol = Surface(PVArray(PVNum)%SurfacePtr)%Area &
* PVArray(PVNum)%SimplePVModule%ActiveFraction
ELSE
CALL ShowSevereError('Invalid PV performance object name of '//TRIM(PVArray(PVNum)%PerfObjName) )
CALL ShowContinueError('Entered in '//TRIM(cPVGeneratorObjectName)//' = '//TRIM(PVArray(PVNum)%Name) )
ErrorsFound = .TRUE.
ENDIF
CASE (iTRNSYSPVModel)
ThisParamObj = FindItemInList(PVArray(PVNum)%PerfObjName, tmpTNRSYSModuleParams%Name, Num1DiodePVModuleTypes)
IF (ThisParamObj > 0) THEN
PVArray(PVNum)%TRNSYSPVModule = tmpTNRSYSModuleParams(ThisParamObj) !entire structure assignment
ELSE
CALL ShowSevereError('Invalid PV performance object name of '//TRIM(PVArray(PVNum)%PerfObjName) )
CALL ShowContinueError('Entered in '//TRIM(cPVGeneratorObjectName)//' = '//TRIM(PVArray(PVNum)%Name) )
ErrorsFound = .TRUE.
ENDIF
CASE (iSandiaPVModel)
ThisParamObj = FindItemInList(PVArray(PVNum)%PerfObjName, tmpSNLModuleParams%Name, NumSNLPVModuleTypes)
IF (ThisParamObj > 0) THEN
PVArray(PVNum)%SNLPVModule = tmpSNLModuleParams(ThisParamObj) !entire structure assignment
ELSE
CALL ShowSevereError('Invalid PV performance object name of '//TRIM(PVArray(PVNum)%PerfObjName) )
CALL ShowContinueError('Entered in '//TRIM(cPVGeneratorObjectName)//' = '//TRIM(PVArray(PVNum)%Name) )
ErrorsFound = .TRUE.
ENDIF
END SELECT
!set up report variables CurrentModuleObject='Photovoltaics'
CALL SetupOutputVariable('Generator Produced DC Electric Power [W]', &
PVArray(PVNum)%Report%DCPower,'System','Average', &
PVarray(PVNum)%Name)
CALL SetupOutputVariable('Generator Produced DC Electric Energy [J]', &
PVArray(PVNum)%Report%DCEnergy,'System','Sum', &
PVarray(PVNum)%Name)
CALL SetupOutputVariable('Generator PV Array Efficiency []', &
PVArray(PVNum)%Report%ArrayEfficiency,'System','Average', &
PVarray(PVNum)%Name)
! CurrentModuleObject='Equiv1Diode or Sandia Photovoltaics'
IF ((PVArray(PVNum)%PVModelType == iTRNSYSPVModel) .OR. (PVArray(PVNum)%PVModelType == iSandiaPVModel)) THEN
CALL SetupOutputVariable('Generator PV Cell Temperature [C]', &
PVArray(PVNum)%Report%CellTemp,'System','Average', &
PVarray(PVNum)%Name)
CALL SetupOutputVariable('Generator PV Short Circuit Current [A]', &
PVArray(PVNum)%Report%ArrayIsc,'System','Average', &
PVarray(PVNum)%Name)
CALL SetupOutputVariable('Generator PV Open Circuit Voltage [V]', &
PVArray(PVNum)%Report%ArrayVoc,'System','Average', &
PVarray(PVNum)%Name)
ENDIF
! do some checks and setup
IF ( PVArray(PVNum)%PVModelType == iSurfaceOutsideFaceCellIntegration ) THEN
!check that surface is HeatTransfer and a Construction with Internal Source was used
IF (.NOT. Surface(PVArray(PVNum)%SurfacePTR)%HeatTransSurf) THEN
CALL ShowSevereError('Must use a surface with heat transfer for IntegratedSurfaceOutsideFace mode in '&
//TRIM(PVArray(PVNum)%Name))
ErrorsFound = .TRUE.
ELSEIF (.NOT. Construct(Surface(PVArray(PVNum)%SurfacePTR)%Construction)%SourceSinkPresent) THEN
CALL ShowSevereError('Must use a surface with internal source construction for IntegratedSurfaceOutsideFace mode in '&
//TRIM(PVArray(PVNum)%Name))
ErrorsFound = .TRUE.
ENDIF
ENDIF
IF (PVArray(PVNum)%CellIntegrationMode == iTranspiredCollectorCellIntegration) THEN
CALL GetTranspiredCollectorIndex( PVArray(PVNum)%SurfacePtr , PVArray(PVNum)%UTSCPtr )
ENDIF
IF (PVArray(PVNum)%CellIntegrationMode == iExteriorVentedCavityCellIntegration) THEN
CALL GetExtVentedCavityIndex( PVArray(PVNum)%SurfacePtr , PVArray(PVNum)%ExtVentCavPtr)
ENDIF
IF (PVArray(PVNum)%CellIntegrationMode == iPVTSolarCollectorCellIntegration) THEN
! Call GetPVTmodelIndex( PVArray(PVNum)%SurfacePtr , PVArray(PVNum)%PVTPtr )
ENDIF
ENDDO
IF (ErrorsFound) THEN
CALL ShowFatalError('Errors found in getting photovoltaic input')
ENDIF
RETURN
END SUBROUTINE GetPVInput