Skip to content

Commit

Permalink
Merge pull request #12323 from mcgratta/master
Browse files Browse the repository at this point in the history
FDS Source: Add ERROR statement numbers, remove unused code
  • Loading branch information
mcgratta authored Jan 2, 2024
2 parents d17038f + 790ef15 commit 6464309
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 186 deletions.
54 changes: 31 additions & 23 deletions Manuals/FDS_User_Guide/FDS_User_Guide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -13405,29 +13405,37 @@ \chapter{Error Codes}
395 \> {\ct RAMP with EXTERNAL\_FILE is present but no EXTERNAL\_FILENAME } \> Section~\ref{info:external_control} \\
396 \> {\ct Row \ldots\ of \ldots\ has a bad 1st latitude. } \> Section~\ref{info:spraypattern} \\
397 \> {\ct Row \ldots\ of \ldots\ has a bad 2nd latitude. } \> Section~\ref{info:spraypattern} \\

401 \> {\ct SURF \ldots\ cannot be applied to a thin obstruction \ldots\ } \> Section~\ref{info:thin_obstructions} \\
402 \> {\ct VENT \ldots\ cannot be applied to a thin obstruction \ldots\ } \> Section~\ref{info:thin_obstructions} \\
403 \> {\ct HT3D solid must have at least one face exposed \ldots\ } \> Section~\ref{info:HT3D_Limitations} \\
404 \> {\ct HT3D thin solid must have at least one face exposed \ldots\ } \> Section~\ref{info:HT3D_Limitations} \\
405 \> {\ct MESH \ldots\ can stretch in at most 2 coordinate directions. } \> Section~\ref{info:TRNX} \\
406 \> {\ct MESH \ldots\ Poisson initialization error: \ldots\ } \> Section~\ref{info:Errors} \\
407 \> {\ct DEVC \ldots\ requires repositioning. } \> Section~\ref{info:DEVC_position} \\
408 \> {\ct DEVC \ldots\ must be associated with a heat-conducting surface. } \> Section~\ref{info:solidoutputquantities} \\
409 \> {\ct PROF \ldots\ requires repositioning. } \> Section~\ref{info:PROF} \\
410 \> {\ct PROF \ldots\ must be associated with a heat-conducting surface. } \> Section~\ref{info:solidoutputquantities} \\
411 \> {\ct MESH \ldots\ is not in alignment with MESH \ldots\ } \> Section~\ref{info:mesh_alignment} \\
412 \> {\ct SURF \ldots\ must specify velocity boundary condition ... } \> Section~\ref{info:MASS_FLUX} \\
413 \> {\ct SURF \ldots\ cannot be applied below GROUND\_LEVEL. } \> Section~\ref{info:wall_of_wind} \\
414 \> {\ct RAMP\_V\_X assigned to SURF \ldots\ } \> Section~\ref{info:RAMP_Vel_Prof} \\
415 \> {\ct RAMP\_V\_Y assigned to SURF \ldots\ } \> Section~\ref{info:RAMP_Vel_Prof} \\
416 \> {\ct RAMP\_V\_Z assigned to SURF \ldots\ } \> Section~\ref{info:RAMP_Vel_Prof} \\
417 \> {\ct SURF \ldots\ cannot be applied to an exterior boundary. } \> Section~\ref{info:HT3D_Limitations} \\
418 \> {\ct SURF \ldots\ layers are thicker than the underlying obstruction. } \> Section~\ref{info:linings} \\
419 \> {\ct MESH \ldots\ UVWFILE \ldots\ does not exist. } \> Section~\ref{info:CSVF} \\
420 \> {\ct MESH \ldots\ TMPFILE \ldots\ does not exist. } \> Section~\ref{info:CSVF} \\
421 \> {\ct MESH \ldots\ SPECFILE \ldots\ does not exist. } \> Section~\ref{info:CSVF} \\
\> \> \\
398 \> {\ct Row \ldots\ of \ldots\ has a bad 1st longitude. } \> Section~\ref{info:spraypattern} \\
399 \> {\ct Row \ldots\ of \ldots\ has a bad 2nd longitude. } \> Section~\ref{info:spraypattern} \\
400 \> {\ct Row \ldots\ of \ldots\ has a bad velocity. } \> Section~\ref{info:spraypattern} \\
401 \> {\ct Row \ldots\ of \ldots\ has a bad mass flow. } \> Section~\ref{info:spraypattern} \\
402 \> {\ct Row \ldots\ of \ldots\ has a bad wavelength. } \> Section~\ref{radiative_part_props} \\
403 \> {\ct Row \ldots\ of \ldots\ has a bad real index. } \> Section~\ref{radiative_part_props} \\
404 \> {\ct Row \ldots\ of \ldots\ has a bad complex index. } \> Section~\ref{radiative_part_props} \\
407 \> {\ct TABLE \ldots\ not found. } \> Section~\ref{info:spraypattern} \\
\> \> \\
421 \> {\ct SURF \ldots\ cannot be applied to a thin obstruction \ldots\ } \> Section~\ref{info:thin_obstructions} \\
422 \> {\ct VENT \ldots\ cannot be applied to a thin obstruction \ldots\ } \> Section~\ref{info:thin_obstructions} \\
423 \> {\ct HT3D solid must have at least one face exposed \ldots\ } \> Section~\ref{info:HT3D_Limitations} \\
424 \> {\ct HT3D thin solid must have at least one face exposed \ldots\ } \> Section~\ref{info:HT3D_Limitations} \\
425 \> {\ct MESH \ldots\ can stretch in at most 2 coordinate directions. } \> Section~\ref{info:TRNX} \\
426 \> {\ct MESH \ldots\ Poisson initialization error: \ldots\ } \> Section~\ref{info:Errors} \\
427 \> {\ct DEVC \ldots\ requires repositioning. } \> Section~\ref{info:DEVC_position} \\
428 \> {\ct DEVC \ldots\ must be associated with a heat-conducting surface. } \> Section~\ref{info:solidoutputquantities} \\
429 \> {\ct PROF \ldots\ requires repositioning. } \> Section~\ref{info:PROF} \\
430 \> {\ct PROF \ldots\ must be associated with a heat-conducting surface. } \> Section~\ref{info:solidoutputquantities} \\
431 \> {\ct MESH \ldots\ is not in alignment with MESH \ldots\ } \> Section~\ref{info:mesh_alignment} \\
432 \> {\ct SURF \ldots\ must specify velocity boundary condition ... } \> Section~\ref{info:MASS_FLUX} \\
433 \> {\ct SURF \ldots\ cannot be applied below GROUND\_LEVEL. } \> Section~\ref{info:wall_of_wind} \\
434 \> {\ct RAMP\_V\_X assigned to SURF \ldots\ } \> Section~\ref{info:RAMP_Vel_Prof} \\
435 \> {\ct RAMP\_V\_Y assigned to SURF \ldots\ } \> Section~\ref{info:RAMP_Vel_Prof} \\
436 \> {\ct RAMP\_V\_Z assigned to SURF \ldots\ } \> Section~\ref{info:RAMP_Vel_Prof} \\
437 \> {\ct SURF \ldots\ cannot be applied to an exterior boundary. } \> Section~\ref{info:HT3D_Limitations} \\
438 \> {\ct SURF \ldots\ layers are thicker than the underlying obstruction. } \> Section~\ref{info:linings} \\
439 \> {\ct MESH \ldots\ UVWFILE \ldots\ does not exist. } \> Section~\ref{info:CSVF} \\
440 \> {\ct MESH \ldots\ TMPFILE \ldots\ does not exist. } \> Section~\ref{info:CSVF} \\
441 \> {\ct MESH \ldots\ SPECFILE \ldots\ does not exist. } \> Section~\ref{info:CSVF} \\
\> \> \\
501 \> {\ct No ID provided \ldots } \> Section~\ref{info:HVAC} \\
502 \> {\ct Invalid TYPE\_ID provided \ldots } \> Section~\ref{info:HVAC} \\
503 \> {\ct Must have both DUCTs and NODEs in the input file } \> Section~\ref{info:HVAC} \\
Expand Down
2 changes: 1 addition & 1 deletion Source/cons.f90
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ MODULE GLOBAL_CONSTANTS

CHARACTER(LABEL_LENGTH) :: TABLE_ID(1000)
INTEGER :: N_TABLE=0,TABLE_TYPE(1000)
INTEGER, PARAMETER :: SPRAY_PATTERN=1,PART_RADIATIVE_PROPERTY=2,POINTWISE_INSERTION=3,TABLE_2D_TYPE=4
INTEGER, PARAMETER :: SPRAY_PATTERN=1,PART_RADIATIVE_PROPERTY=2,POINTWISE_INSERTION=3

! Variables related to meshes

Expand Down
62 changes: 0 additions & 62 deletions Source/func.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3834,68 +3834,6 @@ SUBROUTINE INTERPOLATE1D_UNIFORM(LOWER,X,XI,ANS)
END SUBROUTINE INTERPOLATE1D_UNIFORM


!> \brief Find interpolated value in a 2D array
!> \param TABLE_INDEX Index of the table
!> \param XI Index of first array dimension
!> \param YI Index of second array dimension
!> \param ANS Interpolated value at (XI,YI)

SUBROUTINE INTERPOLATE2D(TABLE_INDEX,XI,YI,ANS)

USE TYPES, ONLY: TABLES,TABLES_TYPE
INTEGER, INTENT(IN) :: TABLE_INDEX
REAL(EB), INTENT(IN) :: XI,YI
REAL(EB), INTENT(OUT) :: ANS
REAL(EB) :: XL,XU,FRAC
INTEGER :: I,J
TYPE (TABLES_TYPE), POINTER :: TA

TA => TABLES(TABLE_INDEX)

! Do 1D for X edges of table
IF (XI <= TA%LX) THEN
CALL INTERPOLATE1D(TA%Y,TA%Z(1,:),YI,ANS)
RETURN
ELSEIF (XI >= TA%UX) THEN
CALL INTERPOLATE1D(TA%Y,TA%Z(TA%NUMBER_ROWS,:),YI,ANS)
RETURN
ENDIF

! Do 1D for Y edges of table
IF (YI <= TA%LY) THEN
CALL INTERPOLATE1D(TA%X,TA%Z(:,1),XI,ANS)
RETURN
ELSEIF(YI >= TA%UY) THEN
CALL INTERPOLATE1D(TA%X,TA%Z(:,TA%NUMBER_COLUMNS),XI,ANS)
RETURN
ENDIF

! Search for column, do 1D if exact
DO J = 1, TA%NUMBER_COLUMNS
IF (ABS(YI-TA%Y(J)) < SPACING(TA%Y(J))) THEN
CALL INTERPOLATE1D(TA%X,TA%Z(:,J),XI,ANS)
RETURN
ENDIF
IF (TA%Y(J) > YI) EXIT
ENDDO

! Search for row, do 1D if exact
DO I = 1, TA%NUMBER_ROWS
IF(ABS(XI-TA%X(I)) < SPACING(TA%X(I))) THEN
CALL INTERPOLATE1D(TA%Y,TA%Z(I,:),YI,ANS)
RETURN
ENDIF
IF (TA%X(I) > XI) EXIT
ENDDO

FRAC = (XI-TA%X(I-1))/(TA%X(I)-TA%X(I-1))
XL = FRAC*(TA%Z(I,J-1)-TA%Z(I-1,J-1))+TA%Z(I-1,J-1)
XU = FRAC*(TA%Z(I,J )-TA%Z(I-1,J ))+TA%Z(I-1,J)
ANS = (YI-TA%Y(J-1))/(TA%Y(J)-TA%Y(J-1))*(XU-XL)+XL

END SUBROUTINE INTERPOLATE2D


!> \brief Randomly choose a point from a normal distribution
!> \param MEAN Mean of the normal distribution
!> \param SIGMA Standard deviation
Expand Down
Loading

0 comments on commit 6464309

Please sign in to comment.