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) | :: | GeneratorType | |||
character(len=*), | intent(in) | :: | GeneratorName | |||
integer, | intent(inout) | :: | GeneratorIndex | |||
logical, | intent(in) | :: | RunFlag | |||
real(kind=r64), | intent(in) | :: | WTLoad |
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 SimWindTurbine(GeneratorType,GeneratorName,GeneratorIndex,RunFlag,WTLoad)
! SUBROUTINE INFORMATION:
! AUTHOR Daeho Kang
! DATE WRITTEN October 2009
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine manages the simulation of wind turbine component.
! This drivers manages the calls to all of the other drivers and simulation algorithms.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList
USE DataGlobalConstants, ONLY: iGeneratorWindTurbine
USE General, ONLY: TrimSigDigits
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
INTEGER, INTENT(IN) :: GeneratorType ! Type of Generator
INTEGER, INTENT(INOUT) :: GeneratorIndex ! Generator index
CHARACTER(len=*), INTENT(IN) :: GeneratorName ! User specified name of Generator
LOGICAL, INTENT(IN) :: RunFlag ! ON or OFF
REAL(r64), INTENT(IN) :: WTLoad ! Electrical load on WT (not used)
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL, SAVE :: GetInputFlag=.true.
INTEGER :: WindTurbineNum
! Obtains and allocates heat balance related parameters from input
IF (GetInputFlag) THEN
CALL GetWindTurbineInput
GetInputFlag=.false.
ENDIF
IF (GeneratorIndex == 0) THEN
WindTurbineNum = FindItemInList(GeneratorName,WindTurbineSys%Name,NumWindTurbines)
IF (WindTurbineNum == 0) THEN
CALL ShowFatalError('SimWindTurbine: Specified Generator not one of Valid Wind Turbine Generators '// &
TRIM(GeneratorName))
END IF
GeneratorIndex=WindTurbineNum
ELSE
WindTurbineNum = GeneratorIndex
IF (WindTurbineNum > NumWindTurbines .or. WindTurbineNum < 1) THEN
CALL ShowFatalError('SimWindTurbine: Invalid GeneratorIndex passed='//TRIM(TrimSigDigits(WindTurbineNum))// &
', Number of Wind Turbine Generators='//TRIM(TrimSigDigits(NumWindTurbines))// &
', Generator name='//TRIM(GeneratorName))
ENDIF
IF (GeneratorName /= WindTurbineSys(WindTurbineNum)%Name) THEN
CALL ShowFatalError('SimMWindTurbine: Invalid GeneratorIndex passed='//TRIM(TrimSigDigits(WindTurbineNum))// &
', Generator name='//TRIM(GeneratorName)//', stored Generator Name for that index='// &
TRIM(WindTurbineSys(WindTurbineNum)%Name))
ENDIF
ENDIF
CALL InitWindTurbine (WindTurbineNum)
CALL CalcWindTurbine (WindTurbineNum, RunFlag)
CALL ReportWindTurbine (WindTurbineNum)
RETURN
END SUBROUTINE SimWindTurbine