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 GetWindTurbineInput
! SUBROUTINE INFORMATION:
! AUTHOR Daeho Kang
! DATE WRITTEN October 2009
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine gets input data for wind turbine components
! and stores it in the wind turbine data structure.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: GetNumObjectsFound,GetObjectItem,FindItemInList,SameString,VerifyName,GetObjectDefMaxArgs
USE ScheduleManager, ONLY: GetScheduleIndex
USE General, ONLY: RoundSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: Blank = ' '
CHARACTER(len=*), PARAMETER :: CurrentModuleObject='Generator:WindTurbine'
REAL(r64), PARAMETER :: SysEffDefault = 0.835d0 ! Default value of overall system efficiency
REAL(r64), PARAMETER :: MaxTSR = 12.0d0 ! Maximum tip speed ratio
REAL(r64), PARAMETER :: DefaultPC = 0.25d0 ! Default power coefficient
REAL(r64), PARAMETER :: MaxPowerCoeff = 0.59d0 ! Maximum power coefficient
REAL(r64), PARAMETER :: DefaultH = 50.0d0 ! Default of height for local wind speed
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL :: ErrorsFound = .false. ! If errors detected in input
LOGICAL :: IsNotOK ! Flag to verify name
LOGICAL :: IsBlank ! Flag for blank name
INTEGER :: WindTurbineNum ! Wind turbine number
INTEGER :: NumAlphas ! Number of Alphas for each GetobjectItem call
INTEGER :: NumNumbers ! Number of Numbers for each GetobjectItem call
INTEGER :: NumArgs
INTEGER :: IOStat
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cAlphaArgs ! Alpha input items for object
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cAlphaFields ! Alpha field names
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: cNumericFields ! Numeric field names
REAL(r64), ALLOCATABLE, DIMENSION(:) :: rNumericArgs ! Numeric input items for object
LOGICAL, ALLOCATABLE, DIMENSION(:) :: lAlphaBlanks ! Logical array, alpha field input BLANK = .true.
LOGICAL, ALLOCATABLE, DIMENSION(:) :: lNumericBlanks ! Logical array, numeric field input BLANK = .true.
! Initializations and allocations
CALL GetObjectDefMaxArgs(CurrentModuleObject,NumArgs,NumAlphas,NumNumbers)
ALLOCATE(cAlphaArgs(NumAlphas))
cAlphaArgs=' '
ALLOCATE(cAlphaFields(NumAlphas))
cAlphaFields=' '
ALLOCATE(cNumericFields(NumNumbers))
cNumericFields=' '
ALLOCATE(rNumericArgs(NumNumbers))
rNumericArgs=0.0d0
ALLOCATE(lAlphaBlanks(NumAlphas))
lAlphaBlanks=.true.
ALLOCATE(lNumericBlanks(NumNumbers))
lNumericBlanks=.true.
NumWindTurbines = GetNumObjectsFound(CurrentModuleObject)
ALLOCATE (WindTurbineSys(NumWindTurbines))
! Flow
DO WindTurbineNum = 1, NumWindTurbines
CALL GetObjectItem(CurrentModuleObject,WindTurbineNum,cAlphaArgs,NumAlphas,rNumericArgs,NumNumbers,IOStat, &
AlphaBlank=lAlphaBlanks,NumBlank=lNumericBlanks, &
AlphaFieldnames=cAlphaFields,NumericFieldNames=cNumericFields)
IsNotOK=.false.
IsBlank=.false.
CALL VerifyName(cAlphaArgs(1),WindTurbineSys%Name,WindTurbineNum,IsNotOK,IsBlank,CurrentModuleObject//' Name')
IF (IsNotOK) THEN
ErrorsFound = .true.
ENDIF
WindTurbineSys(WindTurbineNum)%Name = cAlphaArgs(1) ! Name of wind turbine
WindTurbineSys(WindTurbineNum)%Schedule = cAlphaArgs(2) ! Get schedule
IF (lAlphaBlanks(2)) THEN
WindTurbineSys(WindTurbineNum)%SchedPtr = ScheduleAlwaysOn
ELSE
WindTurbineSys(WindTurbineNum)%SchedPtr = GetScheduleIndex(cAlphaArgs(2))
IF (WindTurbineSys(WindTurbineNum)%SchedPtr == 0) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFields(2))//'="'//trim(cAlphaArgs(2))//'" not found.')
ErrorsFound = .TRUE.
ENDIF
ENDIF
! Select rotor type
SELECT CASE (cAlphaArgs(3))
CASE ('HORIZONTALAXISWINDTURBINE','HAWT', 'NONE', ' ')
WindTurbineSys(WindTurbineNum)%RotorType = HAWT
CASE ('VERTICALAXISWINDTURBINE','VAWT')
WindTurbineSys(WindTurbineNum)%RotorType = VAWT
CASE DEFAULT
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cAlphaFields(3))//'="'//trim(cAlphaArgs(3))//'".')
ErrorsFound = .TRUE.
END SELECT
! Select control type
SELECT CASE (cAlphaArgs(4))
CASE ('FIXEDSPEEDFIXEDPITCH','FSFP')
WindTurbineSys(WindTurbineNum)%ControlType = FSFP
CASE ('FIXEDSPEEDVARIABLEPITCH','FSVP')
WindTurbineSys(WindTurbineNum)%ControlType = FSVP
CASE ('VARIABLESPEEDFIXEDPITCH','VSFP')
WindTurbineSys(WindTurbineNum)%ControlType = VSFP
CASE ('VARIABLESPEEDVARIABLEPITCH','VSVP', 'NONE', ' ')
WindTurbineSys(WindTurbineNum)%ControlType = VSVP
CASE DEFAULT
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '//&
trim(cAlphaFields(4))//'="'//trim(cAlphaArgs(4))//'".')
ErrorsFound = .TRUE.
END SELECT
WindTurbineSys(WindTurbineNum)%RatedRotorSpeed = rNumericArgs(1) ! Maximum rotor speed in rpm
IF (WindTurbineSys(WindTurbineNum)%RatedRotorSpeed <= 0.0d0) THEN
IF (lNumericBlanks(1)) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(1))//' is required but input is blank.')
ELSE
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(1))//'=['//trim(RoundSigDigits(rNumericArgs(1),2))// &
'] must be greater than zero.')
ENDIF
ErrorsFound = .TRUE.
ENDIF
WindTurbineSys(WindTurbineNum)%RotorDiameter = rNumericArgs(2) ! Rotor diameter in m
IF (WindTurbineSys(WindTurbineNum)%RotorDiameter <= 0.0d0) THEN
IF (lNumericBlanks(2)) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(2))//' is required but input is blank.')
ELSE
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(2))//'=['//trim(RoundSigDigits(rNumericArgs(2),1))// &
'] must be greater than zero.')
ENDIF
ErrorsFound = .TRUE.
ENDIF
WindTurbineSys(WindTurbineNum)%RotorHeight = rNumericArgs(3) ! Overall height of the rotor
IF (WindTurbineSys(WindTurbineNum)%RotorHeight <= 0.0d0) THEN
IF (lNumericBlanks(3)) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(3))//' is required but input is blank.')
ELSE
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(3))//'=['//trim(RoundSigDigits(rNumericArgs(3),1))// &
'] must be greater than zero.')
ENDIF
ErrorsFound = .TRUE.
ENDIF
WindTurbineSys(WindTurbineNum)%NumOfBlade = rNumericArgs(4) ! Total number of blade
IF (WindTurbineSys(WindTurbineNum)%NumOfBlade == 0) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(4))//'=['//trim(RoundSigDigits(rNumericArgs(4),0))// &
'] must be greater than zero.')
ErrorsFound = .TRUE.
ENDIF
WindTurbineSys(WindTurbineNum)%RatedPower = rNumericArgs(5) ! Rated average power
IF (WindTurbineSys(WindTurbineNum)%RatedPower == 0.0d0) THEN
IF (lNumericBlanks(5)) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(5))//' is required but input is blank.')
ELSE
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(5))//'=['//trim(RoundSigDigits(rNumericArgs(5),2))// &
'] must be greater than zero.')
ENDIF
ErrorsFound = .TRUE.
ENDIF
WindTurbineSys(WindTurbineNum)%RatedWindSpeed = rNumericArgs(6) ! Rated wind speed
IF (WindTurbineSys(WindTurbineNum)%RatedWindSpeed == 0.0d0) THEN
IF (lNumericBlanks(6)) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(6))//' is required but input is blank.')
ELSE
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(6))//'=['//trim(RoundSigDigits(rNumericArgs(6),2))// &
'] must be greater than zero.')
ENDIF
ErrorsFound = .TRUE.
ENDIF
WindTurbineSys(WindTurbineNum)%CutInSpeed = rNumericArgs(7) ! Minimum wind speed for system operation
IF (WindTurbineSys(WindTurbineNum)%CutInSpeed == 0.0d0) THEN
IF (lNumericBlanks(7)) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(7))//' is required but input is blank.')
ELSE
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(7))//'=['//trim(RoundSigDigits(rNumericArgs(7),2))// &
'] must be greater than zero.')
ENDIF
ErrorsFound = .TRUE.
ENDIF
WindTurbineSys(WindTurbineNum)%CutOutSpeed = rNumericArgs(8) ! Minimum wind speed for system operation
IF (WindTurbineSys(WindTurbineNum)%CutOutSpeed == 0.0d0) THEN
IF (lNumericBlanks(8)) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(8))//' is required but input is blank.')
ELSE IF (WindTurbineSys(WindTurbineNum)%CutOutSpeed <= WindTurbineSys(WindTurbineNum)%RatedWindSpeed) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(8))//'=['//trim(RoundSigDigits(rNumericArgs(8),2))//'] must be greater than '// &
trim(cNumericFields(6))//'=['//trim(RoundSigDigits(rNumericArgs(6),2))//'].')
ELSE
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(8))//'=['//trim(RoundSigDigits(rNumericArgs(8),2))// &
'] must be greater than zero')
ENDIF
ErrorsFound = .TRUE.
ENDIF
WindTurbineSys(WindTurbineNum)%SysEfficiency = rNumericArgs(9) ! Overall wind turbine system efficiency
IF (lNumericBlanks(9) .OR. WindTurbineSys(WindTurbineNum)%SysEfficiency == 0.0d0 .OR. &
WindTurbineSys(WindTurbineNum)%SysEfficiency > 1.0d0) THEN
WindTurbineSys(WindTurbineNum)%SysEfficiency = SysEffDefault
CALL ShowWarningError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(9))//'=['//trim(RoundSigDigits(rNumericArgs(9),2))//'].')
CALL ShowContinueError('...The default value of '//trim(RoundSigDigits(SysEffDefault,3))//' for '// &
trim(cNumericFields(9))//' was assumed.')
END IF
WindTurbineSys(WindTurbineNum)%MaxTipSpeedRatio = rNumericArgs(10) ! Maximum tip speed ratio
IF (WindTurbineSys(WindTurbineNum)%MaxTipSpeedRatio == 0.0d0) THEN
IF (lNumericBlanks(10)) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(10))//' is required but input is blank.')
ELSE
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(10))//'=['//trim(RoundSigDigits(rNumericArgs(10),2))// &
'] must be greater than zero.')
END IF
ErrorsFound = .TRUE.
ENDIF
IF (WindTurbineSys(WindTurbineNum)%SysEfficiency > MaxTSR) THEN
WindTurbineSys(WindTurbineNum)%SysEfficiency = MaxTSR
CALL ShowWarningError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(10))//'=['//trim(RoundSigDigits(rNumericArgs(10),2))//'].')
CALL ShowContinueError('...The default value of '//trim(RoundSigDigits(MaxTSR,1))//' for '// &
trim(cNumericFields(10))//' was assumed.')
END IF
WindTurbineSys(WindTurbineNum)%MaxPowerCoeff = rNumericArgs(11) ! Maximum power coefficient
IF (WindTurbineSys(WindTurbineNum)%RotorType == HAWT .AND. &
WindTurbineSys(WindTurbineNum)%MaxPowerCoeff == 0.0d0) THEN
IF (lNumericBlanks(11)) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(11))//' is required but input is blank.')
ELSE
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(11))//'=['//trim(RoundSigDigits(rNumericArgs(11),2))// &
'] must be greater than zero.')
END IF
ErrorsFound = .TRUE.
ENDIF
IF (WindTurbineSys(WindTurbineNum)%MaxPowerCoeff > MaxPowerCoeff) THEN
WindTurbineSys(WindTurbineNum)%MaxPowerCoeff = DefaultPC
CALL ShowWarningError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(11))//'=['//trim(RoundSigDigits(rNumericArgs(11),2))//'].')
CALL ShowContinueError('...The default value of '//trim(RoundSigDigits(DefaultPC,2))//' for '// &
trim(cNumericFields(11))//' will be used.')
END IF
WindTurbineSys(WindTurbineNum)%LocalAnnualAvgWS = rNumericArgs(12) ! Local wind speed annually averaged
IF (WindTurbineSys(WindTurbineNum)%LocalAnnualAvgWS == 0.0d0) THEN
IF (lNumericBlanks(12)) THEN
CALL ShowWarningError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(12))//' is necessary for accurate prediction but input is blank.')
ELSE
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(12))//'=['//trim(RoundSigDigits(rNumericArgs(12),2))// &
'] must be greater than zero.')
ErrorsFound=.true.
END IF
ENDIF
WindTurbineSys(WindTurbineNum)%HeightForLocalWS = rNumericArgs(13) ! Height of local meteorological station
IF (WindTurbineSys(WindTurbineNum)%HeightForLocalWS == 0.0d0) THEN
IF (WindTurbineSys(WindTurbineNum)%LocalAnnualAvgWS == 0.0d0) THEN
WindTurbineSys(WindTurbineNum)%HeightForLocalWS = 0.0d0
ELSE
WindTurbineSys(WindTurbineNum)%HeightForLocalWS = DefaultH
IF (lNumericBlanks(13)) THEN
CALL ShowWarningError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(13))//' is necessary for accurate prediction but input is blank.')
CALL ShowContinueError('...The default value of '//trim(RoundSigDigits(DefaultH,2))//' for '// &
trim(cNumericFields(13))//' will be used.')
ELSE
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(13))//'=['//trim(RoundSigDigits(rNumericArgs(13),2))// &
'] must be greater than zero.')
ErrorsFound=.true.
END IF
END IF
END IF
WindTurbineSys(WindTurbineNum)%ChordArea = rNumericArgs(14) ! Chord area of a single blade for VAWTs
IF (WindTurbineSys(WindTurbineNum)%RotorType == VAWT .AND. &
WindTurbineSys(WindTurbineNum)%ChordArea == 0.0d0) THEN
IF (lNumericBlanks(14)) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(14))//' is required but input is blank.')
ELSE
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(14))//'=['//trim(RoundSigDigits(rNumericArgs(14),2))// &
'] must be greater than zero.')
END IF
ErrorsFound = .TRUE.
ENDIF
WindTurbineSys(WindTurbineNum)%DragCoeff = rNumericArgs(15) ! Blade drag coefficient
IF (WindTurbineSys(WindTurbineNum)%RotorType == VAWT .AND. &
WindTurbineSys(WindTurbineNum)%DragCoeff == 0.0d0) THEN
IF (lNumericBlanks(15)) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(15))//' is required but input is blank.')
ELSE
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(15))//'=['//trim(RoundSigDigits(rNumericArgs(15),2))// &
'] must be greater than zero.')
END IF
ErrorsFound = .TRUE.
ENDIF
WindTurbineSys(WindTurbineNum)%LiftCoeff = rNumericArgs(16) ! Blade lift coefficient
IF (WindTurbineSys(WindTurbineNum)%RotorType == VAWT .AND. &
WindTurbineSys(WindTurbineNum)%LiftCoeff == 0.0d0) THEN
IF (lNumericBlanks(16)) THEN
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(16))//' is required but input is blank.')
ELSE
CALL ShowSevereError(trim(CurrentModuleObject)//'="'//trim(cAlphaArgs(1))//'" invalid '// &
trim(cNumericFields(16))//'=['//trim(RoundSigDigits(rNumericArgs(16),2))// &
'] must be greater than zero.')
END IF
ErrorsFound = .TRUE.
ENDIF
WindTurbineSys(WindTurbineNum)%PowerCoeffC1 = rNumericArgs(17) ! Empirical power coefficient C1
IF (lNumericBlanks(17)) THEN
WindTurbineSys(WindTurbineNum)%PowerCoeffC1 = 0.0d0
END IF
WindTurbineSys(WindTurbineNum)%PowerCoeffC2 = rNumericArgs(18) ! Empirical power coefficient C2
IF (lNumericBlanks(18)) THEN
WindTurbineSys(WindTurbineNum)%PowerCoeffC2 = 0.0d0
END IF
WindTurbineSys(WindTurbineNum)%PowerCoeffC3 = rNumericArgs(19) ! Empirical power coefficient C3
IF (lNumericBlanks(19)) THEN
WindTurbineSys(WindTurbineNum)%PowerCoeffC3 = 0.0d0
END IF
WindTurbineSys(WindTurbineNum)%PowerCoeffC4 = rNumericArgs(20) ! Empirical power coefficient C4
IF (lNumericBlanks(20)) THEN
WindTurbineSys(WindTurbineNum)%PowerCoeffC4 = 0.0d0
END IF
WindTurbineSys(WindTurbineNum)%PowerCoeffC5 = rNumericArgs(21) ! Empirical power coefficient C5
IF (lNumericBlanks(21)) THEN
WindTurbineSys(WindTurbineNum)%PowerCoeffC5 = 0.0d0
END IF
WindTurbineSys(WindTurbineNum)%PowerCoeffC6 = rNumericArgs(22) ! Empirical power coefficient C6
IF (lNumericBlanks(22)) THEN
WindTurbineSys(WindTurbineNum)%PowerCoeffC6 = 0.0d0
END IF
END DO
DEALLOCATE(cAlphaArgs)
DEALLOCATE(cAlphaFields)
DEALLOCATE(cNumericFields)
DEALLOCATE(rNumericArgs)
DEALLOCATE(lAlphaBlanks)
DEALLOCATE(lNumericBlanks)
IF (ErrorsFound) Call ShowFatalError(CurrentModuleObject//' errors occurred in input. Program terminates.')
DO WindTurbineNum = 1, NumWindTurbines
CALL SetupOutputVariable('Generator Produced Electric Power [W]',WindTurbineSys(WindTurbineNum)%Power, &
'System','Average',WindTurbineSys(WindTurbineNum)%Name)
CALL SetupOutputVariable('Generator Produced Electric Energy [J]',WindTurbineSys(WindTurbineNum)%Energy, &
'System','Sum',WindTurbineSys(WindTurbineNum)%Name, &
ResourceTypeKey='ElectricityProduced',EndUseKey='WINDTURBINE',GroupKey='Plant')
CALL SetupOutputVariable('Generator Turbine Local Wind Speed [m/s]',WindTurbineSys(WindTurbineNum)%LocalWindSpeed, &
'System','Average',WindTurbineSys(WindTurbineNum)%Name)
CALL SetupOutputVariable('Generator Turbine Local Air Density [kg/m3]',WindTurbineSys(WindTurbineNum)%LocalAirDensity, &
'System','Average',WindTurbineSys(WindTurbineNum)%Name)
CALL SetupOutputVariable('Generator Turbine Tip Speed Ratio []',WindTurbineSys(WindTurbineNum)%TipSpeedRatio, &
'System','Average',WindTurbineSys(WindTurbineNum)%Name)
SELECT CASE (WindTurbineSys(WindTurbineNum)%RotorType)
CASE (HAWT)
CALL SetupOutputVariable('Generator Turbine Power Coefficient []',WindTurbineSys(WindTurbineNum)%PowerCoeff, &
'System','Average',WindTurbineSys(WindTurbineNum)%Name)
CASE (VAWT)
CALL SetupOutputVariable('Generator Turbine Chordal Component Velocity [m/s]',WindTurbineSys(WindTurbineNum)%ChordalVel, &
'System','Average',WindTurbineSys(WindTurbineNum)%Name)
CALL SetupOutputVariable('Generator Turbine Normal Component Velocity [m/s]',WindTurbineSys(WindTurbineNum)%NormalVel, &
'System','Average',WindTurbineSys(WindTurbineNum)%Name)
CALL SetupOutputVariable('Generator Turbine Relative Flow Velocity [m/s]',WindTurbineSys(WindTurbineNum)%RelFlowVel, &
'System','Average',WindTurbineSys(WindTurbineNum)%Name)
CALL SetupOutputVariable('Generator Turbine Attack Angle [deg]',WindTurbineSys(WindTurbineNum)%AngOfAttack, &
'System','Average',WindTurbineSys(WindTurbineNum)%Name)
END SELECT
END DO
RETURN
END SUBROUTINE GetWindTurbineInput