How to run CFAST many times, python or other methods?

213 views
Skip to first unread message

luyao kou

unread,
Oct 30, 2020, 4:27:13 AM10/30/20
to CFAST
Hi
In a multi-room building,  I want to run different fire scenarios such as the fire location changes, and the fire size/intensity changes. As a result, hundreds or thousands of simulations need to be executed for the same multi-room building. 

It seems that Python can generate CFAST input files and run the cfast.exe, could you tell me how to run CFAST many times using Python? I have no idea.

I appreciate your help!



Richard Peacock

unread,
Oct 30, 2020, 10:22:35 AM10/30/20
to CFAST
We are working on an addition to the CFAST suite that will allow users to do this, but it's not ready yet. We've used Python to create the files and then run them with a Windows batch file. The CFAST repo contains a utility program


that creates a Linux and Windows script to run multiple CFAST runs.  In Windows, it depends on CFAST and another utility, background.exe (that's installed as part of the FDS software but not yet CFAST), being in the Windows Path. The linux version is a bit more involved, but doable.

Alternatively, you can just create your own batch file by creating a list of the CFAST inputs files (for example, with a command like dir/b *.in > runall.bat, and editing the file to add the appropriate cfast.exe to the command line with a text editor (for example, Notepad will work, but Word creates its own format that's not directly callable from the command line). You can then run that file from the command prompt as simplly runall.bat (or whatever name you call it).

Reply all
Reply to author
Forward
0 new messages