firemodels / fds

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

Unexpected result using OPTICALLY_THIN = T #11314

Closed ellon-b closed 1 year ago

ellon-b commented 1 year ago

Hello everyone, After reading the FDS User Guide Section 16.1, I believe the following 3 options, modified from plate_view_factor_cart_60.fds should be equivalent:

Original from plate_view_factor_cart_60.fds

&MISC GVEC=0,0,0,Y_CO2_INFTY=0.,HUMIDITY=0./  
&RADI NUMBER_RADIATION_ANGLES = 60 /

Option 1

&MISC GVEC=0,0,0/ 
&RADI NUMBER_RADIATION_ANGLES = 60, KAPPA0=0. /

Option 2

&MISC GVEC=0,0,0/ 
&RADI NUMBER_RADIATION_ANGLES = 60, OPTICALLY_THIN = T /

Option 1 worked fine and lead to the same results as the original. But Option 2 lead to a different result. The files are attached. Please, see if I misunderstood the guide or this is bug. I used the released version FDS 6-7-9. Thank you for your attention. plate_view_factor_cart_60.txt plate_view_factor_cart_60_devc.csv plate_view_factor_cart_60_1.txt plate_view_factor_cart_60_1_devc.csv plate_view_factor_cart_60_2.txt plate_view_factor_cart_60_2_devc.csv

mcgratta commented 1 year ago

OPTICALLY_THIN refers to a fire that is assumed to radiate exactly RADIATIVE_FRACTION of its energy output. It does not affect the surrounding gases as KAPPA0 does.

ellon-b commented 1 year ago

Thank you Kevin. But now I don't know exactly what is going on with OPTICALLY_THIN since the explanation in Section 16.1.2 goes in the line of setting kappa to zero. Given what you stated, why OPTICALLY_THIN changes the result when there's no combustion? I attached a third option when I removed the OPTICALLY_THIN from the Option 2 above. plate_view_factor_cart_60_3.txt plate_view_factor_cart_60_3_devc.csv

drjfloyd commented 1 year ago

The User's Guide states: There are some fire scenarios where you might want to set the absorption coefficient in the RTE, k, to zero by setting OPTICALLY_THIN to T on the RADI line, in which case reabsorption of thermal radiation by cold combustion product gases is neglected. Essentially, the fire radiates the user-specified RADIATIVE_FRACTION of energy, and this energy is transported to the domain boundaries without being reabsorbed by colder gases.

I would interpret this text as saying we compute KFST4_GAS(I,J,K)=Q(I,J,K)*CHI_R(I,J,K) and set KAPPA_GAS(I,J,K)=0. These inputs are a hot surface and a cold surface with no fire. This should be equal to the first case where we zero out all absorbing species and it should be equal to second case where we force kappa=0.

mcgratta commented 1 year ago

In the code, we do this:

IF (OPTICALLY_THIN .OR. KAPPA0==0._EB) RTE_SOURCE_CORRECTION = .FALSE.

OPTICALLY_THIN does not imply that KAPPA0=0. We could make it so, but at the moment, OPTICALLY_THIN only forces the fire to radiate RADIATIVE_FRACTION exactly.

drjfloyd commented 1 year ago

The User's Guide needs to be updated then. It states that O_T=T means KAPPA(I,J,K)=0.

drjfloyd commented 1 year ago

If all O_T=T does is make the fire radiate exactly CHI_R, then is OPTICALLY_THIN the term we should be using?

mcgratta commented 1 year ago

It's often used in the lit to denote a fire that radiates a fixed fraction of its energy. We want the ability to specify the RAD_FRAC exactly, but still allow smoke to absorb and emit.

rmcdermo commented 1 year ago

I would vote for making OPTICALLY_THIN=T set KAPPA=0.

ellon-b commented 1 year ago

I don't have much background in the code, but based on the guides, I need to add:

  1. Do you know why there's a difference in the results from plate_view_factor_cart_60_3.txt and plate_view_factor_cart_60_2.txt since there's no combustion?
  2. The Tech Ref Guide Section 6.1.3 talks about the Correction of the Emission Source Term, it says the corrective factor is

    When the source term defined in Eq. (6.10) is substituted into Eq. (6.8), the net radiative emission from the flaming region becomes the desired fraction of the total heat release rate.

When you use RTE_SOURCE_CORRECTION = .FALSE. is this not the same as RADIATIVE_FRACTION=0? As described in the User Guide Sec 16.1.4 for DNS when no correction is applied.

  1. It seems the purpose was to avoid absorption "near" the fire but at the same time allows absorption/emission in smoke "far" from it. But I didn't understand if this effect was accomplished in the present implementation.
mcgratta commented 1 year ago

When O_T=T, there is no net absorption or emission from gas phase cells. When O_T=F, the air, CO2, water vaopr, etc can absorb radiation.

drjfloyd commented 1 year ago

That isn't what is happening. Case 2 with O_T=T has a lower flux to the target than the original case (where Y_H2O and Y_CO2 are 0) and Case 1 (where KAPPA=0). The ambient water vapor and CO2 are absorbing radiation. Should we be changing this:

IF (KAPPA0>=0._EB) THEN

  KAPPA_GAS = KAPPA0

ELSEIF (N_RADCAL_ARRAY_SIZE>0) THEN

to this:

IF (KAPPA0>=0._EB) THEN

  KAPPA_GAS = KAPPA0

ELSEIF (OPTICALLY_THIN) THEN

  KAPPA_GAS = 0._EB

ELSEIF (N_RADCAL_ARRAY_SIZE>0) THEN

mcgratta commented 1 year ago

Probably, but that could be accomplished by just setting KAPPA0=0. If you grep on O_T in the code, the only line it affects is

IF (OPTICALLY_THIN .OR. KAPPA0==0._EB) RTE_SOURCE_CORRECTION = .FALSE.

So doing what you suggest make the two parameters equivalent.

rmcdermo commented 1 year ago

Originally, RTE_SOURCE_CORRECTION=F was the parameter. OPTICALLY_THIN was supposed to be a more intuitive input parameter. But it has an additional implication. I suggest that if we stick with OPTICALLY_THIN, then we simply use it to set KAPPA0=0 in read. Else, we change back to something like RTE_SOURCE_CORRECTION=F.

mcgratta commented 1 year ago

Commit #11321

I made a slight change to the code and user's guide so that now OPTICALLY_THIN=T is equivalent to KAPPA0=0. The result of either is to remove gas phase radiation absorption and limit gas phase emission to $\chi_r \dot{Q}$.

ellon-b commented 1 year ago

I have a question, when you use:

   RTE_SOURCE_CORRECTION = .FALSE.

for OPTICALLY_THIN, is this not the same as:

16.1.4 Radiation Option 4. Optically-Thick; Unspecified Radiative Fraction (DNS Default)

If it can be assumed that the temperature field is well-resolved and the radiation absorption coefficient and RTE source term can be calculated without correction, then RADIATIVE_FRACTION ought to be set to zero. This is the default for a DNS (Direct Numerical Simulation), and you can set it for LES calculations that are highly resolved, like where the grid cells are a few millimeters in size.

? It seems for me, based on the guides and code, that the standard for LES is to use the correction to make the combustion cells that meet the criteria to irradiate a fixed amount (RADIATIVE_FRACTION). If there's no correction it will use the temperature of the cell to calculate radiation.

mcgratta commented 1 year ago

In DNS mode, RADIATIVE_FRACTION is 0 by default, which means that FDS will calculate the radiation source term with no corrections. For all other modes, RAD_FRAC is a value greater than zero, by default, which means that FDS will "correct" the radiation source term to get close to the desired RAD_FRAC.

If OPTICALLY_THIN, FDS will remove gas phase radiation absorption, in which case the desired RAD_FRAC will be nearly exact.

rmcdermo commented 1 year ago

I grant you that this is confusing, but bare with me, there is a history...

Forget about RTE_SOURCE_CORRECTION for a moment, that is a relatively new method, added in the last several years.

In the early days of fire modeling, there were two options: either you prescribed a RADIATIVE_FRACTION (Xr) or you used the cell temperature and the Stefan-Boltzmann law (sigma T^4) to compute radiant emission. Historically in FDS, setting RADIATIVE_FRACTION=0 simply meant you would use the SB law. Setting RADIATIVE_FRACTION>0 meant the emission term would be set to Xr Q(I,J,K) for a given cell (I,J,K), where Q is the heat release rate.

Several years ago we ran into problems with the simple Xr Q method for predicting heat fluxes in the near field of a fire plume, around 1 m away from the fire. Kevin developed the RTE correction method to deal with this, and it is now the default. This method accounts for emission and absorption and integrates over the flame volume to correct the SB law such that the integral over the flame gives Xr. It is a step beyond simply using Xr Q, but it is still a poor man's "turbulent-radiation-interaction" method. That is, its purpose is to account for the fact that we cannot resolve the flame temperature and use the SB law directly.

ellon-b commented 1 year ago

I really appreciate your feedback, it really clarified the origin of the formula in the guide. I understand now that using RTE_SOURCE_CORRECTION = .FALSE. will not lead to using only the cell temperature for emission, but it will use the radiative fraction $\chi_r \cdot q$ without the absorption dependent correction since $\kappa = 0$ anyway.