firemodels / fds

Fire Dynamics Simulator
https://pages.nist.gov/fds-smv/
Other
674 stars 627 forks source link

AREA_SCALING in PYROLYSIS #13648

Closed ericvmueller closed 1 month ago

ericvmueller commented 1 month ago

@rmcdermo and I are testing some cases on the recently implemented OXPYRO_MODEL, where oxidation reactions are limited by the flux of oxygen which can be provided by mass transport to the surface. For this example case we consider an oxidizing char particle and the per-area rate of char consumption can be derived from the oxygen transport as:

m_dot_pp_char = h_c/c_p * (Y_O2_G - Y_O2_F) / nu_O2

where h_c/c_p is the mass transfer coefficient and Y_O2_F is the surface oxygen mass fraction which is computed by balancing with the kinetics.

This consumption rate should equal the net mass flux for the particle. However, when I compare the equation above to the output of MASS FLUX the two start to diverge as the particle shrinks.

This can be traced to the fact that M_DOT_G_PP_ACTUAL in PYROLYSIS is calculated based on the initial surface area: https://github.com/firemodels/fds/blob/7a8b82571360f9475aa9da27d7d9460cdf0995fd/Source/wall.f90#L2931-L2938

while the OXPYRO_MODEL uses a balance that assumes M_DOT_G_PP_ACTUAL is based on the current surface area: https://github.com/firemodels/fds/blob/7a8b82571360f9475aa9da27d7d9460cdf0995fd/Source/wall.f90#L2951-L2956

This can be corrected with a tweak to the OXPYRO_MODEL such as:

AREA_SCALING = (I_GRAD*(SF%THICKNESS+SF%INNER_RADIUS)**(I_GRAD-1))/(I_GRAD*(R_S(0))**(I_GRAD-1))
M_DOT_ERROR = M_DOT_O2_PP*AREA_SCALING - H_MASS*(Y_O2_F - Y_O2_G)

but it raises the question of why we compute M_DOT_G_PP_ACTUAL from the initial area and then rescale it later in the code, rather than just using the current surface area.

I've attached the input and a python script so you can see how I'm processing the output.

VT_firebrand_2ms_noAsh.fds.txt shrinking_bug.py.txt

mcgratta commented 1 month ago

The short answer is that's how it was set up by Simo 20 years ago. But it might not be needed now. I'll check it out.

ericvmueller commented 1 month ago

my case works with the latest. Thanks!