firemodels / fds

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

Temperature decreases when coupling pyrolysis with internal heat #10449

Closed JenSpille closed 2 years ago

JenSpille commented 2 years ago

Hi everyone,

I am performing simulations on electrical cable fires and ran into an issue when coupling pyrolysis and an internal heat source.

I tried to simplify the problem using the attached input file. A cable is represented as particle with three layers (Jacket, Insulation and Copper). Jacket and Insulation are materials with pyrolyis reactions. The cable is heated by a constant internal heat source of 10000 kW/m³ placed in the copper layer.

When we take a look onto the temperatures in the middle of each layer, we can see that the temperatures decrease after 440 s. This leads to a very small mass loss rate.

image image

Running the file with FDS version 6.6, the temperatures constantly increase and the peak of mass loss rate is higher by a factor of 3.

image

image

I took a look on several older version of the code and found that in wall.f90

IF (SF%SPECIFIED_HEAT_SOURCE) THEN DO I=1,NWP Q_S(I) = Q_S(I)+SF%INTERNAL_HEAT_SOURCE(LAYER_INDEX(I)) ENDDO ENDIF

was changed to

IF (SF%SPECIFIED_HEAT_SOURCE) THEN DO I=1,NWP Q_S(I) = Q_S(I)+SF%INTERNAL_HEAT_SOURCE(SF%LAYER_INDEX(I)) ENDDO ENDIF

in version 6.7.4.

I am not familiar with FORTRAN., but after I changed to the previous formulation, the issue is fixed. testcase_internal_heat_pyrolysis.fds.txt

drjfloyd commented 2 years ago

Good catch. This should be LAYER_INDEX which accounts for wall nodes disappearing due to pyrolysis rather than SF%LAYER_INDEX which is the initial definition of a wall cell.

drjfloyd commented 2 years ago

This should be fixed now. Since it seems like you can compile yourself, you can pull the new source.

There were a couple of other spots where we were using SF%LAYER_INDEX where we shouldn't have been that are also fixed.

JenSpille commented 2 years ago

There were a couple of other spots where we were using SF%LAYER_INDEX where we shouldn't have been that are also fixed.

Thanks for your quick reply. I just compiled the fds-master using Intel compiler and did some test cases. So far it works fine for me. So I think we could close this issue.