Skip to content

Commit

Permalink
Merge pull request #10096 from mcgratta/master
Browse files Browse the repository at this point in the history
FDS Verification: Add a test case for 'MASS FLUX' et al
  • Loading branch information
mcgratta committed Dec 2, 2021
2 parents b33a778 + 00c9ac2 commit d8f1cab
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 7 deletions.
16 changes: 13 additions & 3 deletions Manuals/FDS_User_Guide/FDS_User_Guide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -9505,14 +9505,24 @@ \subsubsection{Mass Flow in the Gas Phase}

\subsubsection{Mass Flow at a Boundary}
\label{info:wallflux}
\label{mass_balance_1}

There are three quantities that may be used for recording the mass flux of a particular gas species at boundaries: {\ct 'MASS FLUX'}, {\ct 'MASS FLUX WALL'}, and {\ct TOTAL MASS FLUX WALL'. Each takes a {\ct SPEC\_ID} if a certain species is desired; otherwise the sum of all gas components is given. The difference between the two outputs is that {\ct 'MASS FLUX'} refers to the generation rate of a gas species or solid material component at a solid boundary, whether it be user-specified or the result of a pyrolysis model. {\ct 'MASS FLUX WALL'}, on the other hand, is the actual computed mass flux which might be slightly different than {\ct 'MASS FLUX'} due to small numerical error in the normal component of velocity at a solid wall. That is, {\ct 'MASS FLUX WALL'} is a direct computation of
There are three quantities that may be used for recording the mass flux of a particular gas species at a boundary: {\ct 'MASS FLUX'}, {\ct 'MASS FLUX WALL'}, and {\ct TOTAL MASS FLUX WALL'}. Each takes a {\ct SPEC\_ID} if a particular gas species is desired; otherwise the sum of all gas species is given. The difference between the outputs is that {\ct 'MASS FLUX'} refers to the generation rate of a gas species or solid material component at a solid boundary, whether it be user-specified or the result of a pyrolysis model. {\ct 'MASS FLUX WALL'}, on the other hand, is the actual computed mass flux which might be slightly different than {\ct 'MASS FLUX'} due to small numerical error in the normal component of velocity at a solid wall. That is, {\ct 'MASS FLUX WALL'} is a direct computation of
\be
\dot{m}_\alpha = \rho Y_\alpha u_n - \rho D_\alpha \partial Y_\alpha / \partial n
\ee
where $\mathbf{n}$ is the normal direction of the surface. The third mass flux output is called {\ct 'TOTAL MASS FLUX WALL'}. This quantity is very similar to {\ct 'MASS FLUX WALL'} except that it combines the predicted and corrected mass flux over a single time step. It is the boundary analog of the gas phase quantities {\ct 'TOTAL MASS FLUX X/Y/Z'}.
where $\mathbf{n}$ is the normal direction of the surface. The third mass flux output option is called {\ct 'TOTAL MASS FLUX WALL'}. This quantity is very similar to {\ct 'MASS FLUX WALL'} except that it combines the predicted and corrected mass flux over a single time step. It is the boundary analog of the gas phase quantities {\ct 'TOTAL MASS FLUX X/Y/Z'}.

The convention used for all forms of the boundary mass flux is that a positive value means that mass is entering the computational domain. The quantity may be applied at a solid surface, a flow vent, or an {\ct OPEN} boundary.
For each form of the boundary mass flux, a positive value means that mass is entering the computational domain. These quantities may be applied at a solid surface or vent. {\ct 'MASS FLUX WALL'} and {\ct 'TOTAL MASS FLUX WALL'} can also be applied at an {\ct OPEN} boundary.

To demonstrate the difference between these various forms of mass flux output, consider Fig.~\ref{mass_balance_1_fig}. These plots show the spatially integrated mass flux of gas from a solid surface, where the mass flux has been ramped up linearly for 10~s, held steady for 20~s, and ramped down to zero linearly for 10~s. The {\ct 'MASS FLUX'} output merely mimics this specified curve. The {\ct 'MASS FLUX WALL'} and {\ct 'TOTAL MASS FLUX WALL'} output exhibit fluctuations caused by the fact that the mass flux is not perfectly applied at the solid surface---there are small fluctuations in the normal component of velocity caused by the inexact velocity-pressure coupling at the boundary. These flucuations are minor and average out close to the specified value, but sometimes it is useful to use the more exact output quantities for diagnostic purposes.

\begin{figure}[ht]
\includegraphics[width=3in]{SCRIPT_FIGURES/mass_balance_1}
\includegraphics[width=3in]{SCRIPT_FIGURES/mass_balance_1b}
\caption[Results of the {\ct mass\_balance\_1} test case]{(Left) Mass flow rate of a gas from a solid boundary. (Right) Close-up view.}
\label{mass_balance_1_fig}
\end{figure}


\subsection{Enthalpy Flow}
Expand Down
2 changes: 2 additions & 0 deletions Utilities/Matlab/FDS_verification_dataplot_inputs.csv
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ d,leak_test_3,HVAC/leak_test_3_git.txt,HVAC/leak_test_3.csv,1,2,Time,p1|p2,Ideal
d,leak_test_4,HVAC/leak_test_4_git.txt,HVAC/leak_test_4.csv,1,2,Time,p,Ideal,ko,0,100000,,0,100000,-1.00E+09,1.00E+09,0,HVAC/leak_test_4_devc.csv,2,3,Time,p1,FDS,k-,0,100000,,0,100000,-1.00E+09,1.00E+09,0,Pressure (leak\_test\_4),Time (s),Pressure (Pa),0,30,1,0,500,1,no,0.05 0.90,SouthEast,,1,linear,FDS_Verification_Guide/SCRIPT_FIGURES/leak_test_4,Relative Error,end,0.01,HVAC,ms,m,TeX
d,level_set_fuel_model_1,WUI/level_set_fuel_model_1_git.txt,WUI/level_set_fuel_model_1.csv,1,2,Time,mass,Expected,ko,0,400000,,0,400000,-1.00E+09,1.00E+09,0,WUI/level_set_fuel_model_1_devc.csv,2,3,Time,mass,FDS,k-,0,400000,,0,400000,-1.00E+09,1.00E+09,0,Mass Loss (level\_set\_fuel\_model\_1),Time (s),Mass (kg),0,10,3600,0,100000,1,no,0.05 0.90,SouthEast,,1,linear,FDS_User_Guide/SCRIPT_FIGURES/level_set_fuel_model_1_mass,Relative Error,end,0.01,WUI,g^,g,TeX
d,liquid_mixture,Pyrolysis/liquid_mixture_git.txt,Pyrolysis/liquid_mixture.csv,1,2,Time,Fuel Mass|Water Mass,Expected Fuel Mass| Expected Water Mass,ko|ro,0,400000,,0,400000,-1.00E+09,1.00E+09,0,Pyrolysis/liquid_mixture_mass.csv,2,3,Time,N-HEXANE|WATER VAPOR,FDS (N-HEXANE)|FDS (WATER VAPOR),k-|r-,0,400000,,0,400000,-1.00E+09,1.00E+09,0,Evaporated Mass (liquid\_mixture),Time (s),Mass (kg),0,600,1,0,1.5,1,no,0.05 0.90,East,,1,linear,FDS_User_Guide/SCRIPT_FIGURES/liquid_mixture,Relative Error,end,0.01,WUI,g^,g,TeX
d,mass_balance_1,Mass_Balance/mass_balance_1_git.txt,Mass_Balance/mass_balance_1.csv,1,2,Time,mdot,Ideal Mass Flow,k-,0,100000,,10,30,-1.00E+09,1.00E+09,0,Mass_Balance/mass_balance_1_devc.csv,2,3,Time,MF-1|MF-2|MF-3,MASS FLUX|MASS FLUX WALL|TOTAL MASS FLUX WALL,r--|g-|m-,0,100000,,10,30,-1.00E+09,1.00E+09,0,Mass Flow (mass\_balance\_1),Time (s),Mass Flow (kg/s),0,50,1,0,0.002,1,no,0.05 0.90,South,,1,linear,FDS_User_Guide/SCRIPT_FIGURES/mass_balance_1,Relative Error,mean_1_2,0.01,Flowfields,r>,r,TeX
d,mass_balance_1,Mass_Balance/mass_balance_1_git.txt,Mass_Balance/mass_balance_1.csv,1,2,Time,mdot,Ideal Mass Flow,k-,0,100000,,10,30,-1.00E+09,1.00E+09,0,Mass_Balance/mass_balance_1_devc.csv,2,3,Time,MF-1|MF-2|MF-3,MASS FLUX|MASS FLUX WALL|TOTAL MASS FLUX WALL,r--|g-|m-,0,100000,,10,30,-1.00E+09,1.00E+09,0,Mass Flow (mass\_balance\_1),Time (s),Mass Flow (kg/s),15,25,1,0.0015,0.0017,1,no,0.05 0.90,South,,1,linear,FDS_User_Guide/SCRIPT_FIGURES/mass_balance_1b,Relative Error,mean_1_3,0.01,Flowfields,r>,r,TeX
d,mass_heat_wall_device_test,Flowfields/mass_heat_wall_device_test_git.txt,Flowfields/mass_heat_wall_device_test_data.csv,2,3,Time,MF vent,Ideal Mass Flow Out,ko,0,100000,,0,100000,-1.00E+09,1.00E+09,0,Flowfields/mass_heat_wall_device_test_devc.csv,2,3,Time,MF vent,FDS Mass Flow Out,k-,0,100000,,0,100000,-1.00E+09,1.00E+09,0,Mass Outflow (mass\_heat\_wall\_device\_test),Time (s),Mass Flow (kg/s),0,60,1,-5,5,1,no,0.05 0.90,East,,1,linear,FDS_Verification_Guide/SCRIPT_FIGURES/wall_device_test_massflow_out,Relative Error,end,0.01,Flowfields,r>,r,TeX
d,mass_heat_wall_device_test,Flowfields/mass_heat_wall_device_test_git.txt,Flowfields/mass_heat_wall_device_test_data.csv,2,3,Time,MF open,Ideal Mass Flow In,ko,0,100000,,0,100000,-1.00E+09,1.00E+09,0,Flowfields/mass_heat_wall_device_test_devc.csv,2,3,Time,MF open,FDS Mass Flow In,k-,0,100000,,0,100000,-1.00E+09,1.00E+09,0,Mass Inflow (mass\_heat\_wall\_device\_test),Time (s),Mass Flow (kg/s),0,60,1,-5,5,1,no,0.05 0.80,East,,1,linear,FDS_Verification_Guide/SCRIPT_FIGURES/wall_device_test_massflow_in,Relative Error,end,0.01,Flowfields,r>,r,TeX
d,mass_heat_wall_device_test,Flowfields/mass_heat_wall_device_test_git.txt,Flowfields/mass_heat_wall_device_test_data.csv,2,3,Time,HF vent,Ideal Heat Flow Out,ko,0,100000,,0,100000,-1.00E+09,1.00E+09,0,Flowfields/mass_heat_wall_device_test_devc.csv,2,3,Time,HF vent,FDS Heat Flow Out,k-,0,100000,,0,100000,-1.00E+09,1.00E+09,0,Heat Outflow (mass\_heat\_wall\_device\_test),Time (s),Heat Flow (kW),0,60,1,-1000,1000,1,no,0.05 0.90,East,,1,linear,FDS_Verification_Guide/SCRIPT_FIGURES/wall_device_test_heatflow_out,Relative Error,end,0.01,Flowfields,r>,r,TeX
Expand Down
6 changes: 2 additions & 4 deletions Verification/FDS_Cases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,6 @@ $QFDS -d Energy_Budget energy_budget_particles.fds
$QFDS -d Energy_Budget energy_budget_solid.fds
$QFDS -d Energy_Budget energy_budget_tmix.fds

#$QFDS -d Evacuation evac_smv_testcase0.fds
#$QFDS -d Evacuation evac_smv_testcase2.fds
#$QFDS -p 3 -d Evacuation evac_smv_testcase1.fds

$QFDS -d Extinction extinction_1.fds
$QFDS -d Extinction extinction_2.fds

Expand Down Expand Up @@ -325,6 +321,8 @@ $QFDS -p 2 -d HVAC leak_test_3.fds
$QFDS -d HVAC leak_test_4.fds
$QFDS -d HVAC HVAC_leak_exponent.fds

$QFDS -d Mass_Balance mass_balance_1.fds

$QFDS -d Miscellaneous layer_1mesh.fds
$QFDS -p 3 -d Miscellaneous layer_4mesh.fds
$QFDS -d Miscellaneous pyramid.fds
Expand Down
5 changes: 5 additions & 0 deletions Verification/Mass_Balance/mass_balance_1.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Time,mdot
0,0
10,0.0016
30,0.0016
40,0
34 changes: 34 additions & 0 deletions Verification/Mass_Balance/mass_balance_1.fds
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
&HEAD CHID='mass_balance_1' /

&MESH XB=0.0,1.0,0.0,1.0,0.0,5.0, IJK=20,20,100 /

&TIME T_END=50 /

&DUMP DT_DEVC=0.00000000001, SIG_FIGS=12 /

&SURF ID='BLOW', VEL=-1.0 /
&VENT MB='ZMIN', SURF_ID='BLOW'/
&VENT MB='ZMAX', SURF_ID='OPEN'/

&SPEC ID='N-HEPTANE' /

&SURF ID='SAMPLE', COLOR='RED', TMP_FRONT=100., MASS_FLUX(1)=0.01, SPEC_ID(1)='N-HEPTANE', RAMP_MF(1)='flow' /
&RAMP ID='flow', T= 0.0, F=0.0 /
&RAMP ID='flow', T=10.0, F=1.0 /
&RAMP ID='flow', T=30.0, F=1.0 /
&RAMP ID='flow', T=40.0, F=0.0 /

&SURF ID='WALL', COLOR='BLACK' /
&OBST XB=0.3,0.7,0.3,0.7,1.1,1.2, SURF_IDS='SAMPLE','WALL','WALL' /

&SLCF PBY=0.5, QUANTITY='MASS FRACTION', SPEC_ID='N-HEPTANE', VECTOR=.TRUE. /

&DEVC XB=0.3,0.7,0.3,0.7,1.2,1.2, QUANTITY='MASS FLUX' , SPEC_ID='N-HEPTANE', SURF_ID='SAMPLE', ID='MF-1', STATISTICS='SURFACE INTEGRAL' /
&DEVC XB=0.3,0.7,0.3,0.7,1.2,1.2, QUANTITY='TOTAL MASS FLUX WALL' , SPEC_ID='N-HEPTANE', SURF_ID='SAMPLE', ID='MF-2', STATISTICS='SURFACE INTEGRAL' /
&DEVC XB=0.3,0.7,0.3,0.7,1.2,1.2, QUANTITY='TOTAL TOTAL MASS FLUX WALL' , SPEC_ID='N-HEPTANE', SURF_ID='SAMPLE', ID='MF-3', STATISTICS='SURFACE INTEGRAL' /
&DEVC XB=0.0,1.0,0.0,1.0,3.0,3.0, QUANTITY='MASS FLUX Z' , SPEC_ID='N-HEPTANE', ID='MF-4', STATISTICS='AREA INTEGRAL' /
&DEVC XB=0.0,1.0,0.0,1.0,3.0,3.0, QUANTITY='TOTAL MASS FLUX Z' , SPEC_ID='N-HEPTANE', ID='MF-5', STATISTICS='AREA INTEGRAL' /
&DEVC XB=0.0,1.0,0.0,1.0,5.0,5.0, QUANTITY='TOTAL MASS FLUX WALL' , SPEC_ID='N-HEPTANE', IOR=-3, ID='MF-6', STATISTICS='SURFACE INTEGRAL' /
&DEVC XB=0.0,1.0,0.0,1.0,5.0,5.0, QUANTITY='TOTAL TOTAL MASS FLUX WALL' , SPEC_ID='N-HEPTANE', IOR=-3, ID='MF-7', STATISTICS='SURFACE INTEGRAL' /

&TAIL/

0 comments on commit d8f1cab

Please sign in to comment.