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 | ||
---|---|---|---|---|---|---|
logical, | intent(inout) | :: | ErrorsFound |
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 GetOSCData(ErrorsFound)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN May 2000
! MODIFIED Jul 2011, M.J. Witte and C.O. Pedersen, add new fields to OSC for last T, max and min
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine gets the OtherSideCoefficient data.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! Other Side Coefficient Definition
! OtherSideCoefficients,
! \memo This object sets the other side conditions for a surface in a variety of ways.
! A1, \field OtherSideCoeff Name
! \required-field
! \reference OSCNames
! \reference OutFaceEnvNames
! N1, \field Combined convective/radiative film coefficient
! \required-field
! \type real
! \note if>0, N1 becomes exterior convective/radiative film coefficient and other fields
! \note are used to calc outside air temp then exterior surface temp based on outside air
! \note and specified coefficient
! \note if<=0, then remaining fields calculate the outside surface temperature(?)
! \note following fields are used in the equation:
! \note SurfTemp=N7*TempZone + N4*OutsideDryBulb + N2*N3 + GroundTemp*N5 + WindSpeed*N6*OutsideDryBulb
! N2, \field User selected Constant Temperature
! \units C
! \type real
! \note This parameter will be overwritten by the values from the schedule(A2 below) if one is present
! N3, \field Coefficient modifying the user selected constant temperature
! \note This coefficient is used even with a schedule. It should normally be 1.0 in that case
! N4, \field Coefficient modifying the external dry bulb temperature
! \type real
! N5, \field Coefficient modifying the ground temperature
! \type real
! N6, \field Coefficient modifying the wind speed term (s/m)
! \type real
! N7, \field Coefficient modifying the zone air temperature part of the equation
! \type real
! A2, \field ScheduleName for constant temperature
! \note Name of Schedule for values of "const" temperature.
! \note Schedule values replace N2 - User selected constant temperature.
! \type object-list
! \object-list ScheduleNames
! A3, \field Sinusoidal Variation of Constant Temperature Coefficient
! \note Optionally used to vary Constant Temperature Coefficient with unitary sine wave
! \type choice
! \key Yes
! \key No
! \default No
! N8; \field Period of Sinusoidal Variation
! \note Use with sinusoidal variation to define the time period
! \type real
! \units hr
! \default 24
! N9, \field Previous Other Side Temperature Coefficient
! \note This coeffient multiplies the other side temperature result from the
! \note previous zone timestep
! \type real
! \default 0
! N10, \field Minimum Other Side Temperature
! \type real
! \units C
! \default -100
! N11; \field Maximum Other Side Temperature
! \type real
! \units C
! \default 200
! USE STATEMENTS:
USE DataIPShortCuts
USE InputProcessor, ONLY: GetNumObjectsFound, GetObjectItem, FindItemInList, VerifyName, SameString
USE ScheduleManager, ONLY: GetScheduleIndex
USE General, ONLY: RoundSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
LOGICAL, INTENT(INOUT) :: ErrorsFound
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: OSCFormat1="('! <Other Side Coefficients>,Name,"// &
"Combined convective/radiative film coefficient {W/m2-K},"// &
"User selected Constant Temperature {C},Coefficient modifying the constant temperature term,"// &
"Coefficient modifying the external dry bulb temperature term,"// &
"Coefficient modifying the ground temperature term,"// &
"Coefficient modifying the wind speed term {s/m},"// &
"Coefficient modifying the zone air temperature term,"// &
"Constant Temperature Schedule Name,"// &
"Sinusoidal Variation,"// &
"Period of Sinusoidal Variation,"// &
"Previous Other Side Temperature Coefficient,"// &
"Minimum Other Side Temperature {C},"// &
"Maximum Other Side Temperature {C}')"
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER NumAlphas
INTEGER NumProps
INTEGER Loop
INTEGER IOSTAT
INTEGER OSCNum
LOGICAL ErrorInName
LOGICAL IsBlank
CHARACTER(len=52) cOSCLimitsString
cCurrentModuleObject='SurfaceProperty:OtherSideCoefficients'
TotOSC=GetNumObjectsFound(cCurrentModuleObject)
ALLOCATE(OSC(TotOSC))
OSCNum=0
DO Loop=1,TotOSC
CALL GetObjectItem(cCurrentModuleObject,Loop,cAlphaArgs,NumAlphas, &
rNumericArgs,NumProps,IOSTAT, &
AlphaBlank=lAlphaFieldBlanks,NumBlank=lNumericFieldBlanks, &
AlphaFieldnames=cAlphaFieldNames,NumericFieldNames=cNumericFieldNames)
ErrorInName=.false.
IsBlank=.false.
CALL VerifyName(cAlphaArgs(1),OSC%Name,OSCNum,ErrorInName,IsBlank,TRIM(cCurrentModuleObject)//' Name')
IF (ErrorInName) THEN
ErrorsFound=.true.
CYCLE
ENDIF
OSCNum=OSCNum+1
OSC(OSCNum)%Name = cAlphaArgs(1)
OSC(OSCNum)%SurfFilmCoef = rNumericArgs(1)
OSC(OSCNum)%ConstTemp = rNumericArgs(2) ! This will be replaced if schedule is used
OSC(OSCNum)%ConstTempCoef = rNumericArgs(3) ! This multiplier is used (even with schedule). It should normally be 1.0
OSC(OSCNum)%ExtDryBulbCoef = rNumericArgs(4)
OSC(OSCNum)%GroundTempCoef = rNumericArgs(5)
OSC(OSCNum)%WindSpeedCoef = rNumericArgs(6)
OSC(OSCNum)%ZoneAirTempCoef = rNumericArgs(7)
OSC(OSCNum)%SinusoidPeriod = rNumericArgs(8)
IF(( .not. lAlphaFieldBlanks(2)) .and. (NumAlphas /= 1)) THEN ! Const temp will come from schedule specified below.
OSC(OSCNum)%ConstTempScheduleName = cAlphaArgs(2)
IF (OSC(OSCNum)%ConstTempScheduleName /= Blank) THEN
OSC(OSCNum)%ConstTempScheduleIndex=GetScheduleIndex(OSC(OSCNum)%ConstTempScheduleName)
IF (OSC(OSCNum)%ConstTempScheduleIndex == 0) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'="'//TRIM(cAlphaArgs(1))// &
'", invalid '//TRIM(cAlphaFieldNames(2))//'="'//TRIM(cAlphaArgs(2)))
ErrorsFound=.true.
ENDIF
ENDIF
ENDIF
IF (.NOT. lAlphaFieldBlanks(3)) THEN
IF (SameString(cAlphaArgs(3), 'No')) THEN
OSC(OSCNum)%SinusoidalConstTempCoef = .FALSE.
ELSEIF (SameString(cAlphaArgs(3), 'Yes')) THEN
OSC(OSCNum)%SinusoidalConstTempCoef = .True.
ELSE
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'="'//TRIM(cAlphaArgs(1))// &
'", invalid '//TRIM(cAlphaFieldNames(3))//'="'//TRIM(cAlphaArgs(3)))
ErrorsFound=.true.
ENDIF
ENDIF
IF (rNumericArgs(1) > 0.0d0 .and. .not. ANY(rNumericArgs(3:7) /= 0.0d0) &
.AND. (.not. OSC(OSCNum)%SinusoidalConstTempCoef)) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'="'//TRIM(cAlphaArgs(1))// &
'" has zeros for all coefficients.')
CALL ShowContinueError('...The outdoor air temperature for surfaces using this OtherSideCoefficients '// &
'object will always be 0C.')
ENDIF
IF (rNumericArgs(1) <= 0.0d0 .and. .not. ANY(rNumericArgs(3:7) /= 0.0d0) &
.AND. (.not. OSC(OSCNum)%SinusoidalConstTempCoef)) THEN
CALL ShowSevereError(TRIM(cCurrentModuleObject)//'="'//TRIM(cAlphaArgs(1))// &
'" has zeros for all coefficients.')
CALL ShowContinueError('...The outside surface temperature for surfaces using this OtherSideCoefficients '// &
'object will always be 0C.')
ENDIF
OSC(OSCNum)%TPreviousCoef = rNumericArgs(9)
IF (.NOT. lNumericFieldBlanks(10)) THEN
OSC(OSCNum)%MinLimitPresent = .TRUE.
OSC(OSCNum)%MinTempLimit = rNumericArgs(10)
cOSCLimitsString = RoundSigDigits(rNumericArgs(10),3)
ELSE
cOSCLimitsString = 'N/A'
ENDIF
IF (.NOT. lNumericFieldBlanks(11)) THEN
OSC(OSCNum)%MaxLimitPresent = .TRUE.
OSC(OSCNum)%MaxTempLimit = rNumericArgs(11)
cOSCLimitsString = TRIM(cOSCLimitsString)//','//TRIM(RoundSigDigits(rNumericArgs(10),3))
ELSE
cOSCLimitsString = TRIM(cOSCLimitsString)//','//'N/A'
ENDIF
ENDDO
DO Loop=1,TotOSC
IF (Loop == 1) THEN
WRITE(OutputFileInits,OSCFormat1)
ENDIF
IF (OSC(Loop)%SurfFilmCoef > 0.0d0) THEN
cAlphaArgs(1)=RoundSigDigits(OSC(Loop)%SurfFilmCoef,3)
CALL SetupOutputVariable('Surface Other Side Coefficients Exterior Air Drybulb Temperature [C]',OSC(Loop)%OSCTempCalc, &
'System','Average',OSC(Loop)%Name)
ELSE
cAlphaArgs(1)='N/A'
ENDIF
IF (OSC(Loop)%ConstTempScheduleIndex /= 0) THEN
cAlphaArgs(2)=OSC(Loop)%ConstTempScheduleName
WRITE(OutputFileInits,'(A)') 'Other Side Coefficients,'//TRIM(OSC(Loop)%Name)//','//TRIM(cAlphaArgs(1))//','// &
'N/A,'//TRIM(RoundSigDigits(OSC(Loop)%ConstTempCoef,3))//','// &
TRIM(RoundSigDigits(OSC(Loop)%ExtDryBulbCoef,3))//','//TRIM(RoundSigDigits(OSC(Loop)%GroundTempCoef,3))//','// &
TRIM(RoundSigDigits(OSC(Loop)%WindSpeedCoef,3))//','//TRIM(RoundSigDigits(OSC(Loop)%ZoneAirTempCoef,3))//','// &
TRIM(cAlphaArgs(2))//','//TRIM(cAlphaArgs(3))//','//TRIM(RoundSigDigits(OSC(Loop)%SinusoidPeriod,3))//','// &
TRIM(RoundSigDigits(OSC(Loop)%TPreviousCoef,3))//','//TRIM(cOSCLimitsString)
ELSE
cAlphaArgs(2)='N/A'
WRITE(OutputFileInits,'(A)') 'Other Side Coefficients,'//TRIM(OSC(Loop)%Name)//','//TRIM(cAlphaArgs(1))//','// &
TRIM(RoundSigDigits(OSC(Loop)%ConstTemp,2))//','//TRIM(RoundSigDigits(OSC(Loop)%ConstTempCoef,3))//','// &
TRIM(RoundSigDigits(OSC(Loop)%ExtDryBulbCoef,3))//','//TRIM(RoundSigDigits(OSC(Loop)%GroundTempCoef,3))//','// &
TRIM(RoundSigDigits(OSC(Loop)%WindSpeedCoef,3))//','//TRIM(RoundSigDigits(OSC(Loop)%ZoneAirTempCoef,3))//','// &
TRIM(cAlphaArgs(2))//','//TRIM(cAlphaArgs(3))//','//TRIM(RoundSigDigits(OSC(Loop)%SinusoidPeriod,3))//','// &
TRIM(RoundSigDigits(OSC(Loop)%TPreviousCoef,3))//','//TRIM(cOSCLimitsString)
ENDIF
ENDDO
RETURN
END SUBROUTINE GetOSCData