firemodels / fds

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

HVAC array out of bounds #12641

Closed mcgratta closed 5 months ago

mcgratta commented 5 months ago

This case was sent in via the GoogleGroup post

https://groups.google.com/g/fds-smv/c/5b1OdUl-WRI/m/syOj4lQfAAAJ?utm_medium=email&utm_source=footer

CFD_ALAL85.fds.txt

It fails after 4 time steps with an error in the HVAC routine. It fails with either 4 MPI processes or 9.

 Fire Dynamics Simulator

 Current Date     : March 18, 2024  10:10:42
 Revision         : FDS-6.8.0-1706-g37c2bc2-master
 Revision Date    : Fri Mar 15 15:07:09 2024 -0400
 Compiler         : Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.7.1 Build 20221019_000000
 Compilation Date : Mar 15, 2024 17:43:03

 Job TITLE        :
 Job ID string    : CFD_ALAL85_db

 Time Step:      1, Simulation Time:      0.02 s
 Time Step:      2, Simulation Time:      0.04 s
 Time Step:      3, Simulation Time:      0.06 s
 Time Step:      4, Simulation Time:      0.09 s
forrtl: severe (408): fort: (3): Subscript firemodels/smv#2 of the array LHS has value 0 which is less than the lower bound of 1

Image              PC                Routine            Line        Source
fds_impi_intel_li  0000000002DC4CAD  hvac_routines_mp_        1990  hvac.f90
fds_impi_intel_li  0000000002D7CDAA  hvac_routines_mp_        1390  hvac.f90
fds_impi_intel_li  0000000004191090  MAIN__                    669  main.f90
fds_impi_intel_li  0000000000409B1D  Unknown               Unknown  Unknown
libc-2.17.so       00002B1DBEB3D555  __libc_start_main     Unknown  Unknown
fds_impi_intel_li  0000000000409A36  Unknown               Unknown  Unknown
srun: error: burn003: task 0: Exited with exit code 152
srun: launch/slurm: _step_signal: Terminating StepId=141920.0
drjfloyd commented 5 months ago

Input attaches HVAC VENTs to OBST that get removed.

10.2.3 HVAC Node Parameters

Note that a VENT being used for an HVAC system must be present throughout the simulation. The VENT should not have a CTRL_ID or DEVC_ID. This also includes the solid surface it is attached; i.e., any OBST the VENT is attached to also needs to be present throughout the simulation. Turning on or off a VENT connected to an HVAC system, requires a damper in the duct connected to VENT.

Input uses SURF_ID='HVAC' for VENT for TYPE_ID='LEAK'

10.3.2 Leaks

Localized Leakage

The local leakage approach is intended to represent leakage through a specific crack or for situations where the leakage is not necessarily from one sealed pressure zone to another. For example, a cracked open door might have a opening that is too small to resolve with the grid. One would; however, still want to capture the fact that hot gases could escape the top of the crack and cold gases enter the bottom. The local leakage approach uses the local pressure rather than just the zone pressure. Therefore, one can define multiple leakage paths for different windows, over the height of a door, or over the height of a tall stairwell where stack effect might be important. To use this approach two VENT inputs are linked via an HVAC input with TYPE_ID=’LEAK’. In the example below a 0.001 m2 leakage path is created between the VENT with ID=’VENT 1’ and the VENT with ID=’VENT 2’. Note that the SURF_ID for a VENT with localized leakage is not ’HVAC’. The input must correspond to a SURF input. Wall heat transfer will be computed based upon the inputs on the referenced SURF input.

mcgratta commented 5 months ago

I missed that. OK, so we need to think of a way to stop this case from running.

drjfloyd commented 5 months ago

I am adding a check for the VENT SURF_ID. Will need to see what we can do for the OBST removal. Checking for a VENT CTRL or DEVC is easy enough.

mcgratta commented 5 months ago

I was able to track the bug to Stair Leak B5, but I haven't been able to get beyond that.

drjfloyd commented 5 months ago

This isn't a bug. This is an input error.

Remove the CTRL_ID and DEVC_ID for any OBST that an HVAC VENT is attached to. Don't use SURF_ID='HVAC' for localized leakage.

If I fixed those this ran past timestep 4.

I have added error message for a VENT with CTRL_ID or DEVC_ID and using SURF_ID='HVAC' for localized leakage. Working on the OBST error message now.

drjfloyd commented 5 months ago

Also have sent this to Thunderhead support as this input was made with Pyrosim.

mcgratta commented 5 months ago

So in this input file, should the person not put SURF_ID='HVAC' on the VENT line?

drjfloyd commented 5 months ago

Yes. The User's Guide says don't do that.

mcgratta commented 5 months ago

In this case, how would one know which of these VENTs have localized leakage. I removed all the SURF_ID='HVAC' statements, but now I have errors saying that the VENTs have no SURF_ID. That may be another issue -- why doesn't a VENT without a SURF_ID not just pick up SURF_DEFAULT?

drjfloyd commented 5 months ago

You know because you have a HVAC input that uses a vent for localized leakage:

&HVAC ID='Stair Leak B4', TYPE_ID='LEAK', VENT_ID='Stair B4', VENT2_ID='AMBIENT', AREA=0.02, LEAK_ENTHALPY=.TRUE., LOSS=1.0/

The User's Guide says: Note that the SURF_ID for a VENT with localized leakage is not ’HVAC’. The input must correspond to a SURF input. Wall heat transfer will be computed based upon the inputs on the referenced SURF input.

It does not say to leave SURF_ID blank. We could have it pick up SURF_DEFAULT but I think that would lead to other issues as in most cases when a user has a VENT they intend to assign some specific surface to it. You can use SURF_ID='INERT' which I will add to the guide.

mcgratta commented 5 months ago

Have we ruled out the possibility of a having a leaky door open?

drjfloyd commented 5 months ago

Yes. If you have a door that needs that open, just put the leak path on the floor, above the door, to the side, etc. Otherwise we would have to every FDS timestep check to see if some HVAC component now no longer exists, rebuild the HVAC flow solver setup, etc. and I think would have a very high likelihood of leading to unintended consequences.

mcgratta commented 5 months ago

OK, putting the vents on the wall or floor is just as intuitive as putting on the door itself. Is this mentioned in the U Guide? I'm currently looking at the section on local leaks.

drjfloyd commented 5 months ago

It may not be. I am working on some guide updates now with new error messages being added. Will look at that section.

drjfloyd commented 5 months ago

Added error messages and some more text to the guide.

mcgratta commented 5 months ago

I have the case running now past where it failed before. I moved the vents from the door bottom to the floor and eliminated the SURF_ID='HVAC'

mcgratta commented 5 months ago

I edited the section on local leakage in the User's Guide, putting these rules in bulletized form. I think it is easier to pick out specifics that way.

bwklein commented 5 months ago

I saw the email to support for this issue. I'll reply to @drjfloyd there to sort out how the UI should behave in this case.

mcgratta commented 5 months ago

I am returning to the original problem identified in this discussion post

I have reproduced the occurrence of a large pressure difference across an opened door. At first glance, this might have to do with establishing a base height for the vertical pressure stratification, but I need to study it more.

drjfloyd commented 5 months ago

We had a bug a few years ago related to meshes with different base heights and pressure.

mcgratta commented 5 months ago

This fix in the pressure zone merging algorithm appears to have fixed the original bug where there were unphysical pressure gradients in a stairwell smoke study. The next minor release, FDS 6.9.0, contains the fix. It should be released today.

mcgratta commented 5 months ago

I added a verification case called Pressure_Solver/stairwell.fds based on this case.