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 | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | EquipTypeName | |||
character(len=*), | intent(in) | :: | EquipName | |||
integer, | intent(in) | :: | EquipTypeNum | |||
integer, | intent(inout) | :: | ProfileNum | |||
logical, | intent(in) | :: | FirstHVACIteration | |||
logical, | intent(in) | :: | InitLoopEquip |
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 SimulatePlantProfile(EquipTypeName,EquipName,EquipTypeNum,ProfileNum, FirstHVACIteration,InitLoopEquip )
! SUBROUTINE INFORMATION:
! AUTHOR Peter Graham Ellis
! DATE WRITTEN January 2004
! MODIFIED Brent Griffith, generalize fluid cp
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Simulates the plant load profile object.
! METHODOLOGY EMPLOYED:
! This is a very simple simulation. InitPlantProfile does the work of getting the scheduled load and flow rate.
! Flow is requested and the actual available flow is set. The outlet temperature is calculated.
! USE STATEMENTS:
USE FluidProperties, ONLY: GetSpecificHeatGlycol
USE DataInterfaces, ONLY: ShowFatalError
USE InputProcessor, ONLY: FindItemInList
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: EquipTypeName ! description of model (not used until different types of profiles)
CHARACTER(len=*), INTENT(IN) :: EquipName ! the user-defined name
INTEGER, INTENT(IN) :: EquipTypeNum ! the plant parameter ID for equipment model
INTEGER, INTENT(INOUT) :: ProfileNum ! the index for specific load profile
LOGICAL, INTENT(IN) :: FirstHVACIteration
LOGICAL, INTENT(IN) :: InitLoopEquip ! flag indicating if called in special initialization mode.
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: DeltaTemp
LOGICAL, SAVE :: GetInput = .TRUE.
REAL(r64) :: Cp ! local fluid specific heat
! FLOW:
IF (GetInput) THEN
CALL GetPlantProfileInput
GetInput = .FALSE.
END IF
IF (InitLoopEquip) THEN
ProfileNum = FindItemInList(EquipName, PlantProfile%Name, NumOfPlantProfile)
IF (ProfileNum /= 0) THEN
CALL InitPlantProfile(ProfileNum)
RETURN
ENDIF
ENDIF
IF (ProfileNum /= 0) THEN
CALL InitPlantProfile(ProfileNum)
IF (PlantProfile(ProfileNum)%MassFlowRate > 0.d0) THEN
Cp = GetSpecificHeatGlycol(PlantLoop(PlantProfile(ProfileNum)%WLoopNum)%FluidName, &
PlantProfile(ProfileNum)%InletTemp, &
PlantLoop(PlantProfile(ProfileNum)%WLoopNum)%FluidIndex, &
'SimulatePlantProfile')
DeltaTemp = PlantProfile(ProfileNum)%Power &
/ (PlantProfile(ProfileNum)%MassFlowRate * Cp)
ELSE
PlantProfile(ProfileNum)%Power = 0.d0
DeltaTemp = 0.d0
END IF
PlantProfile(ProfileNum)%OutletTemp = PlantProfile(ProfileNum)%InletTemp - DeltaTemp
CALL UpdatePlantProfile(ProfileNum)
CALL ReportPlantProfile(ProfileNum)
ELSE
CALL ShowFatalError('SimulatePlantProfile: plant load profile not found ='//Trim(EquipName))
ENDIF
RETURN
END SUBROUTINE SimulatePlantProfile