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) | :: | ParamNum | |||
real(kind=r64), | intent(in) | :: | IncidentAngle |
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.
REAL(r64) FUNCTION IAM(ParamNum, IncidentAngle)
! SUBROUTINE INFORMATION:
! AUTHOR Peter Graham Ellis
! DATE WRITTEN December 2003
! MODIFIED Sept 2008, BG cut off IAM beyond 60 degrees.
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Calculates the incident angle modifier based on the solar collector parameters. Both first and second order
! correlations are allowed.
! METHODOLOGY EMPLOYED:
! A simple function.
! REFERENCES:
! ASHRAE Standard 93-1986 (RA 91), "Methods of Testing to Determine the Thermal Performance of Solar Collectors".
! ASHRAE Standard 96-1980 (RA 89), "Methods of Testing to Determine the Thermal Performance of Unglazed Flat-Plate
! Liquid-Type Solar Collectors".
! Duffie, J. A., and Beckman, W. A. Solar Engineering of Thermal Processes, Second Edition. Wiley-Interscience:
! New York (1991).
USE DataGlobals, ONLY: DegToRadians
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: ParamNum ! Collector parameters object number
REAL(r64), INTENT(IN) :: IncidentAngle ! Angle of incidence (radians)
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: s ! Intermediate variable
CHARACTER(len=MaxNameLength):: String ! Dummy string for converting numbers to strings
REAL(r64) :: CutOffAngle
! FLOW:
!cut off IAM for angles greater than 60 degrees. (CR 7534)
CutOffAngle = 60.0D0 * DegToRadians
IF (ABS(IncidentAngle) > CutOffAngle) THEN ! cut off, model curves not robust beyond cutoff
! curves from FSEC/SRCC testing are only certified to 60 degrees, larger angles can cause numerical problems in curves
IAM = 0.0D0
ELSE
s = (1.0d0 / COS(IncidentAngle)) - 1.0d0
IAM = 1.0d0 + Parameters(ParamNum)%iam1 * s + Parameters(ParamNum)%iam2 * (s**2)
IAM = MAX(IAM, 0.0d0) ! Never allow to be less than zero, but greater than one is a possibility
IF (IAM > 10.0d0) THEN ! Greater than 10 is probably not a possibility
CALL ShowSevereError('IAM Function: SolarCollectorPerformance:FlatPlate = '//TRIM(Parameters(ParamNum)%Name)// &
': Incident Angle Modifier is out of bounds due to bad coefficients.')
WRITE(String, *) Parameters(ParamNum)%iam1
CALL ShowContinueError('Coefficient 2 of Incident Angle Modifier ='//TRIM(String))
WRITE(String, *) Parameters(ParamNum)%iam2
CALL ShowContinueError('Coefficient 3 of Incident Angle Modifier ='//TRIM(String))
WRITE(String, *) IAM
CALL ShowContinueError('Calculated Incident Angle Modifier ='//TRIM(String))
CALL ShowContinueError('Expected Incident Angle Modifier should be approximately 1.5 or less.')
CALL ShowFatalError('Errors in SolarCollectorPerformance:FlatPlate input.')
END IF
ENDIF ! not greater than cut off angle
RETURN
END FUNCTION IAM