Skip to content

Commit

Permalink
FDS Source: Issue #6831. Add material component data to TGA_ANALYSIS …
Browse files Browse the repository at this point in the history
…output
  • Loading branch information
mcgratta committed Sep 19, 2018
1 parent af3f91b commit 9e9f45d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 16 deletions.
6 changes: 4 additions & 2 deletions Manuals/FDS_User_Guide/FDS_User_Guide.tex
Expand Up @@ -3640,14 +3640,16 @@ \subsection{Simulating Bench-scale Measurements like the TGA, DSC, and MCC}
\end{lstlisting}
The two {\ct TGA} entries will force FDS to perform a numerical version of the TGA, DSC and MCC measurements. The {\ct THICKNESS} and other boundary conditions on the {\ct SURF} line will be ignored. After running the analysis, which only takes a second or two, FDS will then shut down without running the actual simulation. To run the simulation, either remove the {\ct TGA} entries or set {\ct TGA\_ANALYSIS} to {\ct .FALSE.}

The result of the {\ct TGA\_ANALYSIS} is a single comma-delimited file called {\ct CHID\_tga.csv}. The first and second columns of the file consist of the time and sample temperature. The third column is the normalized sample mass; that is, the sample mass divided by its initial mass. The fourth column is the mass loss rate, in units of s$^{-1}$. The fifth column is the heat release rate per unit mass of the sample in units of W/g, typical of an MCC measurement. The sixth column is the heat absorbed by the sample normalized by its mass, also in units of W/g, typical of a DSC measurement. Results for a typical analysis of wood are shown in Fig.~\ref{tga_results}. In this case, a sample of wood containing about 10~\% water by mass heats up and undergoes three reactions, including the evaporation of water. Note that the TGA plots include both fuel and water vapor, while the MCC results only show fuel.
The result of the {\ct TGA\_ANALYSIS} is a single comma-delimited file called {\ct CHID\_tga.csv}. The first and second columns of the file consist of the time and sample temperature. The third column is the normalized sample mass; that is, the sample mass divided by its initial mass. The following columns list the mass fractions of the individual material components. The next column is the total mass loss rate, in units of s$^{-1}$, followed by the mass loss rates of the individual material components. The next column is the heat release rate per unit mass of the sample in units of W/g, typical of an MCC measurement. The final column is the heat absorbed by the sample normalized by its mass, also in units of W/g, typical of a DSC measurement. Results for a typical analysis of wood are shown in Fig.~\ref{tga_results}. In this case, a sample of wood containing about 10~\% water by mass heats up and undergoes three reactions, including the evaporation of water. Note that the TGA plots include both fuel and water vapor, while the MCC results only show fuel.

Details of the output quantities are discussed in Section~\ref{info:material_components}. Further details on these measurement techniques and how to interpret them are found in the FDS Verification Guide~\cite{FDS_Verification_Guide}.

\begin{figure}[ht]
\begin{tabular*}{\textwidth}{lr}
\includegraphics[width=3.2in]{SCRIPT_FIGURES/tga_analysis_mass} &
\includegraphics[width=3.2in]{SCRIPT_FIGURES/tga_analysis_mlr} \\
\includegraphics[width=3.2in]{SCRIPT_FIGURES/tga_analysis_mass_components} \\
\includegraphics[width=3.2in]{SCRIPT_FIGURES/tga_analysis_mlr} &
\includegraphics[width=3.2in]{SCRIPT_FIGURES/tga_analysis_mlr_components} \\
\includegraphics[width=3.2in]{SCRIPT_FIGURES/tga_analysis_mcc} &
\includegraphics[width=3.2in]{SCRIPT_FIGURES/tga_analysis_dsc}
\end{tabular*}
Expand Down
39 changes: 28 additions & 11 deletions Source/wall.f90
Expand Up @@ -3286,12 +3286,16 @@ SUBROUTINE TGA_ANALYSIS

USE PHYSICAL_FUNCTIONS, ONLY: SURFACE_DENSITY
USE COMP_FUNCTIONS, ONLY: SHUTDOWN
REAL(EB) :: DT_TGA=0.01_EB,T_TGA,SURF_DEN,SURF_DEN_0,HRR
INTEGER :: N_TGA,I,IW,IP
REAL(EB) :: DT_TGA=0.01_EB,T_TGA,SURF_DEN_0,HRR
REAL(EB), ALLOCATABLE, DIMENSION(:) :: SURF_DEN
INTEGER :: N_TGA,I,IW,IP,N
CHARACTER(80) :: MESSAGE,TCFORM
TYPE(SURFACE_TYPE), POINTER :: SF

CALL POINT_TO_MESH(1)

SF => SURFACE(TGA_SURF_INDEX)
ALLOCATE(SURF_DEN(0:SF%N_MATL))
RADIATION = .FALSE.
TGA_HEATING_RATE = TGA_HEATING_RATE/60._EB ! K/min --> K/s
TGA_FINAL_TEMPERATURE = TGA_FINAL_TEMPERATURE + TMPM ! C --> K
Expand All @@ -3311,36 +3315,49 @@ SUBROUTINE TGA_ANALYSIS
ENDIF

OPEN (LU_TGA,FILE=FN_TGA,FORM='FORMATTED',STATUS='REPLACE')
WRITE(LU_TGA,'(A)') 's,C,g/g,1/s,W/g,W/g'
WRITE(LU_TGA,'(A)') 'Time,Temp,Mass,MLR,MCC,DSC'
WRITE(TCFORM,'(A,I3.3,A,I3.3,A)') "(A,",SF%N_MATL+1,"(A,',')",SF%N_MATL+1,"(A,','),A)"
WRITE(LU_TGA,TCFORM) 's,C,',('g/g',N=1,SF%N_MATL+1),('1/s',N=1,SF%N_MATL+1),'W/g,W/g'
WRITE(LU_TGA,TCFORM) 'Time,Temp,','Total Mass',(TRIM(MATERIAL(SF%MATL_INDEX(N))%ID)//' Mass',N=1,SF%N_MATL),'Total MLR',&
(TRIM(MATERIAL(SF%MATL_INDEX(N))%ID)//' MLR',N=1,SF%N_MATL),'MCC,DSC'

SURF_DEN_0 = SURFACE(TGA_SURF_INDEX)%SURFACE_DENSITY
WRITE(TCFORM,'(5A)') "(5(",TRIM(FMT_R),",','),",TRIM(FMT_R),")"
SURF_DEN_0 = SF%SURFACE_DENSITY
WRITE(TCFORM,'(A,I3.3,5A)') "(",2*SF%N_MATL+5,"(",TRIM(FMT_R),",','),",TRIM(FMT_R),")"

DO I=1,N_TGA
IF (ONE_D%LAYER_THICKNESS(1)<TWO_EPSILON_EB) EXIT
T_TGA = I*DT_TGA
ASSUMED_GAS_TEMPERATURE = TMPA + TGA_HEATING_RATE*T_TGA
IF (TGA_WALL_INDEX>0) THEN
CALL SOLID_HEAT_TRANSFER_1D(1,T_TGA,DT_TGA,WALL_INDEX=IW)
SURF_DEN = SURFACE_DENSITY(1,0,WALL_INDEX=IW)
ELSE
CALL SOLID_HEAT_TRANSFER_1D(1,T_TGA,DT_TGA,PARTICLE_INDEX=IP)
SURF_DEN = SURFACE_DENSITY(1,0,LAGRANGIAN_PARTICLE_INDEX=IP)
ENDIF
IF (MOD(I,NINT(1._EB/(TGA_HEATING_RATE*DT_TGA)))==0) THEN
IF (I==1 .OR. MOD(I,NINT(1._EB/(TGA_HEATING_RATE*DT_TGA)))==0) THEN
IF (TGA_WALL_INDEX>0) THEN
SURF_DEN(0) = SURFACE_DENSITY(1,0,WALL_INDEX=IW)
DO N=1,SF%N_MATL
SURF_DEN(N) = SURFACE_DENSITY(1,0,WALL_INDEX=IW,MATL_INDEX=N)
ENDDO
ELSE
SURF_DEN(0) = SURFACE_DENSITY(1,0,LAGRANGIAN_PARTICLE_INDEX=IP)
DO N=1,SF%N_MATL
SURF_DEN(N) = SURFACE_DENSITY(1,0,LAGRANGIAN_PARTICLE_INDEX=IP,MATL_INDEX=N)
ENDDO
ENDIF
IF (N_REACTIONS>0) THEN
HRR = ONE_D%MASSFLUX(REACTION(1)%FUEL_SMIX_INDEX)*0.001*REACTION(1)%HEAT_OF_COMBUSTION/(ONE_D%AREA_ADJUST*SURF_DEN_0)
ELSE
HRR = 0._EB
ENDIF
WRITE(LU_TGA,TCFORM) REAL(T_TGA,FB), REAL(ONE_D%TMP_F-TMPM,FB), REAL(SURF_DEN/SURF_DEN_0,FB), &
REAL(SUM(ONE_D%MASSFLUX_SPEC(1:N_TRACKED_SPECIES))/SURF_DEN_0,FB), &
WRITE(LU_TGA,TCFORM) REAL(T_TGA,FB), REAL(ONE_D%TMP_F-TMPM,FB), (REAL(SURF_DEN(N)/SURF_DEN_0,FB),N=0,SF%N_MATL), &
REAL(-SUM(ONE_D%MASSFLUX_MATL(1:SF%N_MATL))/SURF_DEN_0,FB), &
(REAL(-ONE_D%MASSFLUX_MATL(N)/SURF_DEN_0,FB),N=1,SF%N_MATL), &
REAL(HRR,FB), REAL(ONE_D%QCONF*0.001_EB/SURF_DEN_0,FB)
ENDIF
ENDDO

CLOSE(LU_TGA)
DEALLOCATE(SURF_DEN)

END SUBROUTINE TGA_ANALYSIS

Expand Down
8 changes: 5 additions & 3 deletions Utilities/Matlab/FDS_verification_dataplot_inputs.csv
Expand Up @@ -318,7 +318,7 @@ d,species_conservation_3,Flowfields/species_conservation_3_git.txt,Flowfields/sp
d,species_conservation_4,Flowfields/species_conservation_4_git.txt,Flowfields/species_conservation_4.csv,2,3,Time,Mass Ar|Total,Excess Ar|Total Evaporated Mass,ko|ro,0,100000,,0,100000,0,Flowfields/species_conservation_4_devc.csv,2,3,Time,Mass Ar|Total,FDS (Mass Ar)|FDS (Total),k-|r-,0,100000,,0,100000,0,Mass (species\_conservation\_4),Time (s),Mass (kg),0,100,1,-0.1,0.5,1,no,0.05 0.90,West,,1,linear,FDS_Verification_Guide/SCRIPT_FIGURES/species_conservation_4,Absolute Error,end,5.00E-03,Flowfields,r*,r,TeX
d,sphere_drag_1,Sprinklers_and_Sprays/sphere_drag_1_git.txt,Sprinklers_and_Sprays/sphere_drag_1.csv,1,2,Time,Exact 5|Exact 10|Exact 20,Exact 5|Exact 10|Exact 20,ko|ro|bo,0,100000,,7,10,0,Sprinklers_and_Sprays/sphere_drag_1_devc.csv,2,3,Time,FDS 5|FDS 10|FDS 20,FDS 5|FDS 10|FDS 20,k-|r-|b-,0,100000,,7,10,0,Pressure Drop (sphere\_drag\_1),Time (s),Pressure Drop (Pa),0,10,1,0,18,1,no,0.05 0.90,West,,1,linear,FDS_Verification_Guide/SCRIPT_FIGURES/sphere_drag_1,Relative Error,mean,0.05,Sprinklers and Sprays,bs,b,TeX
d,sphere_drag_2,Sprinklers_and_Sprays/sphere_drag_2_git.txt,Sprinklers_and_Sprays/sphere_drag_2.csv,1,2,Length,Pres,Exact,ko,0,100000,,0,100000,0,Sprinklers_and_Sprays/sphere_drag_2_line.csv,2,3,pres-x,pres,FDS,k-,0,100000,,0,100000,0,Pressure Drop (sphere\_drag\_2),Length (m),Pressure (Pa),0,10,1,0,0.3,1,no,0.05 0.90,East,,1,linear,FDS_Verification_Guide/SCRIPT_FIGURES/sphere_drag_2,Relative Error,max,0.02,Sprinklers_and_Sprays,bs,b,TeX
g,sphere_radiate,Complex_Geometry/sphere_radiate_git.txt,Complex_Geometry/sphere_radiate.csv,1,2,Time,HF,Exact,ko,0,100000,,0,100000,0,Complex_Geometry/sphere_radiate_devc.csv,2,3,Time,HF1,FDS,k-,0,100000,,0,100000,0,Heat Flux (sphere\_radiate),Time (s),Heat Flux (kW/m^2),0,0.01,1,0,8,1,no,0.05 0.90,SouthEast,,1,linear,FDS_User_Guide/SCRIPT_FIGURES/sphere_radiate,Relative Error,max,0.1,Radiation,bs,b,TeX
s,sphere_radiate,Complex_Geometry/sphere_radiate_git.txt,Complex_Geometry/sphere_radiate.csv,1,2,Time,HF,Exact,ko,0,100000,,0,100000,0,Complex_Geometry/sphere_radiate_devc.csv,2,3,Time,HF1,FDS,k-,0,100000,,0,100000,0,Heat Flux (sphere\_radiate),Time (s),Heat Flux (kW/m^2),0,0.01,1,0,8,1,no,0.05 0.90,SouthEast,,1,linear,FDS_User_Guide/SCRIPT_FIGURES/sphere_radiate,Relative Error,max,0.1,Radiation,bs,b,TeX
d,spray_burner,Fires/spray_burner_git.txt,Fires/spray_burner.csv,1,2,Time,HRR,Specified (HRR),k-,0,100000,,0,100000,0,Fires/spray_burner_hrr.csv,2,3,Time,HRR,FDS (HRR),k--,0,100000,,0,100000,0,Heat Release Rate (spray\_burner),Time (s),Heat Release Rate (kW),0,60,1,0,2500,1,no,0.05 0.90,SouthEast,,1,linear,FDS_User_Guide/SCRIPT_FIGURES/spray_burner_HRR,Relative Error,area,0.05,Fires,kd,k,TeX
d,stack_effect,Atmospheric_Effects/stack_effect_git.txt,Atmospheric_Effects/stack_effect.csv,1,2,Time,Ideal Upper|Ideal Lower,Ideal Upper|Ideal Lower,bo|ko,0,100000,,0,100000,0,Atmospheric_Effects/stack_effect_devc.csv,2,3,Time,FDS Upper|FDS Lower,FDS Upper|FDS Lower,b|k,0,100000,,0,100000,0,Leakage Velocity,Time (s),Velocity (m/s),0,100,1,0,5,1,no,0.05 0.90,South,,1,linear,FDS_User_Guide/SCRIPT_FIGURES/stack_effect_v,Relative Error,end,0.05,Atmospheric Effects,kd,k,TeX
d,stack_effect,Atmospheric_Effects/stack_effect_git.txt,Atmospheric_Effects/stack_effect.csv,1,2,Time,Ideal Upper Exterior|Ideal Lower Exterior|Ideal Upper Interior|Ideal Lower Interior,Ideal Upper Exterior|Ideal Lower Exterior|Ideal Upper Interior|Ideal Lower Interior,bo|ko|ro|go,0,100000,,0,100000,0,Atmospheric_Effects/stack_effect_devc.csv,2,3,Time,FDS Upper Exterior|FDS Lower Exterior|FDS Upper Interior|FDS Lower Interior,FDS Upper Exterior|FDS Lower Exterior|FDS Upper Interior|FDS Lower Interior,b|k|r|g,0,100000,,0,100000,0,Density,Time (s),Density (kg/m^3),0,100,1,0,1.5,1,no,0.05 0.90,South,,1,linear,FDS_User_Guide/SCRIPT_FIGURES/stack_effect_rho,Relative Error,end,0.01,Atmospheric Effects,kd,k,TeX
Expand Down Expand Up @@ -372,8 +372,10 @@ d,tangential_velocity,Flowfields/tangential_velocity_git.txt,Flowfields/tangenti
d,target_test,Radiation/target_test_git.txt,Radiation/target_test_devc.csv,2,3,Time,flux 1,Particle Target,ko,0,100000,,0,100000,0,Radiation/target_test_devc.csv,2,3,Time,flux 2,Obstruction Target,k-,0,100000,,0,100000,0,Heat Flux (target\_test),Time (s),Heat Flux (kW/m^2),0,5,1,0,100,1,no,0.05 0.90,SouthEast,,1,linear,FDS_Verification_Guide/SCRIPT_FIGURES/target_test,Relative Error,end,0.01,Radiation,ro,r,TeX
d,TC_heating,Radiation/TC_heating_git.txt,Radiation/TC_heating.csv,2,3,Time,Temp,Analytical (Temp),ko,0,100000,,0,100000,0,Radiation/TC_heating_devc.csv,2,3,Time,TC,FDS (TC),k-,0,100000,,0,100000,0,Temperature (TC\_heating),Time (s),Temperature (\circC),0,90,1,0,700,1,no,0.05 0.90,SouthEast,,1,linear,FDS_Verification_Guide/SCRIPT_FIGURES/TC_heating,Relative Error,end,0.01,Radiation,ro,r,TeX
d,TC_view_factor,Radiation/TC_view_factor_git.txt,Radiation/TC_view_factor.csv,1,2,Time,TC,Ideal (TC),ko,0,100000,,0,100000,0,Radiation/TC_view_factor_devc.csv,2,3,Time,TC_1,FDS (TC\_1),k-,0,100000,,0,100000,0,Temperature (TC\_view\_factor),Time (s),Temperature (\circC),0,180,1,0,500,1,no,0.05 0.90,SouthEast,,1,linear,FDS_Verification_Guide/SCRIPT_FIGURES/TC_view_factor,Relative Error,end,0.03,Radiation,ro,r,TeX
d,tga_analysis,Pyrolysis/tga_analysis_git.txt,Pyrolysis/tga_analysis_tga.csv,2,3,Temp,Mass,0,k-,0,100000,,0,100000,0,Pyrolysis/tga_analysis_tga.csv,2,3,Temp,Mass,0,k-,0,100000,,0,100000,0,TGA Results (tga\_analysis),Temperature (\circC),Mass Fraction,0,600,1,0,1.2,1,no,0.05 0.90, ,,1,linear,FDS_User_Guide/SCRIPT_FIGURES/tga_analysis_mass,N/A,end,0,Pyrolysis,kd,k,TeX
d,tga_analysis,Pyrolysis/tga_analysis_git.txt,Pyrolysis/tga_analysis_tga.csv,2,3,Temp,MLR,0,k-,0,100000,,0,100000,0,Pyrolysis/tga_analysis_tga.csv,2,3,Temp,MLR,0,k-,0,100000,,0,100000,0,TGA Results (tga\_analysis),Temperature (\circC),Mass Loss Rate (1/s),0,600,1,0,0.002,1,no,0.05 0.90, ,,1,linear,FDS_User_Guide/SCRIPT_FIGURES/tga_analysis_mlr,N/A,end,0,Pyrolysis,kd,k,TeX
d,tga_analysis,Pyrolysis/tga_analysis_git.txt,Pyrolysis/tga_analysis_tga.csv,2,3,Temp,Total Mass,0,k-,0,100000,,0,100000,0,Pyrolysis/tga_analysis_tga.csv,2,3,Temp,Total Mass,0,k-,0,100000,,0,100000,0,TGA Results (tga\_analysis),Temperature (\circC),Total Mass Fraction,0,600,1,0,1.2,1,no,0.05 0.90, ,,1,linear,FDS_User_Guide/SCRIPT_FIGURES/tga_analysis_mass,N/A,end,0,Pyrolysis,kd,k,TeX
d,tga_analysis,Pyrolysis/tga_analysis_git.txt,Pyrolysis/tga_analysis_tga.csv,2,3,Temp,component 1 Mass|component 2 Mass,Component 1|Component 2,k-|r-,0,100000,,0,100000,0,Pyrolysis/tga_analysis_tga.csv,2,3,Temp,residue Mass|water Mass,Residue|Water,g-|b-,0,100000,,0,100000,0,TGA Results (tga\_analysis),Temperature (\circC),Component Mass Fraction,0,600,1,0,1.2,1,no,0.05 0.90,West,,1,linear,FDS_User_Guide/SCRIPT_FIGURES/tga_analysis_mass_components,N/A,end,0,Pyrolysis,kd,k,TeX
d,tga_analysis,Pyrolysis/tga_analysis_git.txt,Pyrolysis/tga_analysis_tga.csv,2,3,Temp,Total MLR,0,k-,0,100000,,0,100000,0,Pyrolysis/tga_analysis_tga.csv,2,3,Temp,Total MLR,0,k-,0,100000,,0,100000,0,TGA Results (tga\_analysis),Temperature (\circC),Total Mass Loss Rate (1/s),0,600,1,-0.0015,0.0035,1,no,0.05 0.90, ,,1,linear,FDS_User_Guide/SCRIPT_FIGURES/tga_analysis_mlr,N/A,end,0,Pyrolysis,kd,k,TeX
d,tga_analysis,Pyrolysis/tga_analysis_git.txt,Pyrolysis/tga_analysis_tga.csv,2,3,Temp,component 1 MLR|component 2 MLR,Component 1|Component 2,k-|r-,0,100000,,0,100000,0,Pyrolysis/tga_analysis_tga.csv,2,3,Temp,residue MLR|water MLR,Residue|Water,g-|b-,0,100000,,0,100000,0,TGA Results (tga\_analysis),Temperature (\circC),Component Mass Loss Rate (1/s),0,600,1,-0.0015,0.0035,1,no,0.05 0.90,West,,1,linear,FDS_User_Guide/SCRIPT_FIGURES/tga_analysis_mlr_components,N/A,end,0,Pyrolysis,kd,k,TeX
d,tga_analysis,Pyrolysis/tga_analysis_git.txt,Pyrolysis/tga_analysis_tga.csv,2,3,Temp,MCC,0,k-,0,100000,,0,100000,0,Pyrolysis/tga_analysis_tga.csv,2,3,Temp,MCC,0,k-,0,100000,,0,100000,0,MCC Results (tga\_analysis),Temperature (\circC),Heat Release Rate (W/g),0,600,1,0,30,1,no,0.05 0.90, ,,1,linear,FDS_User_Guide/SCRIPT_FIGURES/tga_analysis_mcc,N/A,end,0,Pyrolysis,kd,k,TeX
d,tga_analysis,Pyrolysis/tga_analysis_git.txt,Pyrolysis/tga_analysis_tga.csv,2,3,Temp,DSC,0,k-,0,100000,,0,100000,0,Pyrolysis/tga_analysis_tga.csv,2,3,Temp,DSC,0,k-,0,100000,,0,100000,0,DSC Results (tga\_analysis),Temperature (\circC),Heating Rate (W/g),0,600,1,0,4,1,no,0.05 0.90, ,,1,linear,FDS_User_Guide/SCRIPT_FIGURES/tga_analysis_dsc,N/A,end,0,Pyrolysis,kd,k,TeX
d,tga_sample,Pyrolysis/tga_sample_git.txt,Pyrolysis/tga_sample_data.csv,1,2,Temp,Mass,Measured,k-,0,100000,,0,100000,0,Pyrolysis/tga_sample_devc.csv,2,3,TGA temp,mpua,FDS (mpua),k--,0,100000,,0,100000,0,TGA Mass (tga\_sample),Temperature (\circC),Mass Fraction,0,900,1,0,1.2,1,no,0.05 0.90,South,,1,linear,FDS_Verification_Guide/SCRIPT_FIGURES/tga_sample_mass,Relative Error,end,0.01,Pyrolysis,ro,r,TeX
Expand Down

0 comments on commit 9e9f45d

Please sign in to comment.