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) | :: | PipeType | |||
character(len=*), | intent(in) | :: | ConstructionName | |||
character(len=*), | intent(in) | :: | FieldName | |||
integer, | intent(in) | :: | ConstructionNum | |||
integer, | intent(in) | :: | PipeNum | |||
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 ValidatePipeConstruction(PipeType,ConstructionName,FieldName,ConstructionNum,PipeNum,ErrorsFound)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN August 2008
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This routine, called from GetInput, validates the pipe construction usage.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE DataHeatBalance, ONLY : Construct, Material
USE General, ONLY: TrimSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: PipeType ! module object of pipe (error messages)
CHARACTER(len=*), INTENT(IN) :: ConstructionName ! construction name of pipe (error messages)
CHARACTER(len=*), INTENT(IN) :: FieldName ! fieldname of pipe (error messages)
INTEGER, INTENT(IN) :: ConstructionNum ! pointer into construction data
INTEGER, INTENT(IN) :: PipeNum ! pointer into pipe data
LOGICAL, INTENT(INOUT) :: ErrorsFound ! set to true if errors found here
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: Resistance ! overall thermal resistance [m^2.C/W]
REAL(r64) :: Density ! average density [kg/m^3]
REAL(r64) :: TotThickness ! total thickness of all layers
REAL(r64) :: SpHeat ! average specific heat [J/kg.K]
INTEGER :: LayerNum
INTEGER :: TotalLayers ! total number of layers (pipe layer + insulation layers)
Resistance=0.0d0
TotThickness=0.0d0
! CTF stuff
TotalLayers = Construct(ConstructionNum)%TotLayers
! get pipe properties
IF(TotalLayers == 1) THEN ! no insulation layer
PipeHT(PipeNum)%PipeConductivity = Material(Construct(ConstructionNum)%LayerPoint(1))%Conductivity
PipeHT(PipeNum)%PipeDensity = Material(Construct(ConstructionNum)%LayerPoint(1))%Density
PipeHT(PipeNum)%PipeCp = Material(Construct(ConstructionNum)%LayerPoint(1))%SpecHeat
PipeHT(PipeNum)%PipeOD = PipeHT(PipeNum)%PipeID + &
2.0*Material(Construct(ConstructionNum)%LayerPoint(1))%Thickness
PipeHT(PipeNum)%InsulationOD = PipeHT(PipeNum)%PipeOD
PipeHT(PipeNum)%SumTK = Material(Construct(ConstructionNum)%LayerPoint(1))%Thickness / &
Material(Construct(ConstructionNum)%LayerPoint(1))%Conductivity
ELSEIF(TotalLayers >= 2)THEN ! first layers are insulation, last layer is pipe
DO LayerNum = 1, TotalLayers - 1
Resistance = Resistance + Material(Construct(ConstructionNum)%LayerPoint(LayerNum))%Thickness &
/Material(Construct(ConstructionNum)%LayerPoint(LayerNum))%Conductivity
Density = Material(Construct(ConstructionNum)%LayerPoint(LayerNum))%Density &
* Material(Construct(ConstructionNum)%LayerPoint(LayerNum))%Thickness
TotThickness = TotThickness + Material(Construct(ConstructionNum)%LayerPoint(LayerNum))%Thickness
SpHeat = Material(Construct(ConstructionNum)%LayerPoint(LayerNum))%SpecHeat &
* Material(Construct(ConstructionNum)%LayerPoint(LayerNum))%Thickness
PipeHT(PipeNum)%InsulationThickness = Material(Construct(ConstructionNum)%LayerPoint(LayerNum))%Thickness
PipeHT(PipeNum)%SumTK = PipeHT(PipeNum)%SumTK + &
Material(Construct(ConstructionNum)%LayerPoint(LayerNum))%Thickness / &
Material(Construct(ConstructionNum)%LayerPoint(LayerNum))%Conductivity
ENDDO
PipeHT(PipeNum)%InsulationResistance = Resistance
PipeHT(PipeNum)%InsulationConductivity = TotThickness/Resistance
PipeHT(PipeNum)%InsulationDensity = Density/TotThickness
PipeHT(PipeNum)%InsulationCp = SpHeat/TotThickness
PipeHT(PipeNum)%InsulationThickness = TotThickness
PipeHT(PipeNum)%PipeConductivity = Material(Construct(ConstructionNum)%LayerPoint(TotalLayers))%Conductivity
PipeHT(PipeNum)%PipeDensity = Material(Construct(ConstructionNum)%LayerPoint(TotalLayers))%Density
PipeHT(PipeNum)%PipeCp = Material(Construct(ConstructionNum)%LayerPoint(TotalLayers))%SpecHeat
PipeHT(PipeNum)%PipeOD = PipeHT(PipeNum)%PipeID + &
2.0*Material(Construct(ConstructionNum)%LayerPoint(TotalLayers))%Thickness
PipeHT(PipeNum)%InsulationOD = PipeHT(PipeNum)%PipeOD + 2.0*PipeHT(PipeNum)%InsulationThickness
ELSE
CALL ShowSevereError(PipeType//': invalid '//FieldName//'="'//ConstructionName// &
'", too many layers=['//trim(TrimSigDigits(TotalLayers))//'], only 1 or 2 allowed.')
ErrorsFound=.true.
END IF
RETURN
END SUBROUTINE ValidatePipeConstruction