Archive for Programming

How to compile CFAST on Mac OS X and Linux

The Consolidated Model of Fire and Smoke Transport (CFAST) model is a two-zone fire model developed by NIST. From the NIST website, you can download the Windows version of CFAST, which includes a graphical user interface frontend (CEdit) for the creation and execution of CFAST cases. However, there are no downloadable CFAST binaries or user interfaces for the Mac and Linux platforms; you must compile CFAST yourself.

This guide will help you compile the CFAST executable on Mac OS X and Linux. This is useful for running CFAST cases on Mac or Linux machines, which is especially useful for scripting CFAST runs for optimization problems or running CFAST on a large number of cases in batch mode.

You will need the Intel Fortran compilers (ifort) and a copy of the CFAST source code from the CFAST Google Code site. You can try to use other free compilers, but I find that the Intel compilers are the most compatible and produce the most optimized (fastest) binaries. Note: there are heavily discounted Intel compilers for students.

To download the CFAST source code, the easiest way is to install subversion on your Mac or Linux machine and issue the following command:

svn co http://cfast.googlecode.com/svn/trunk/ cfast

Once you have the CFAST source code on your machine, you can perform the following steps to compile the CFAST executable.

1. In the cfast/CFAST/ directory, edit the makefile_linux file and make the following changes:

  • Replace ‘radation’ with ‘radiation’; this is a typo
  • Add ‘cyl_conduct.o’, ‘datamodules.o’, and ‘ssHeaders.f’ to the obj_serial section
  • Add the following lines to the Object Dependencies section:
    • cyl_conduct.o : cyl_conduct.f
    • datamodules.o : datamodules.f90
    • ssHeaders.o : ssHeaders.f
  • Add ‘cyl_conduct.f’, ‘datamodules.f90′, and ‘ssHeaders.f’ to the cfast.o line

Note: The corrected makefile can also be downloaded from here.

2. Copy datamodules.f90 from the cfast/CFAST/Include/ directory to the cfast/CFAST/Source/ directory

3. Change to the cfast/CFAST/Source/ directory

4. Run the command ‘ifort -c datamodules.f90′ to compile the datamodules and iofiles modules

5. Finally, run the command ‘make -f ../makefile_linux intel_osx_64’ to build CFAST

5b. If you are running Linux, the command is ‘make -f ../makefile_linux intel_linux’

Using these steps, I was able to build CFAST on an Intel Macbook Pro running 10.6 (Snow Leopard) as well as a Linux machine running CentOS release 5.6 with the 64-bit Intel Fortran Compiler version 12.0.4.184.

With your new CFAST executable file (cfast_osx_intel_64), you can run a CFAST case using the following syntax:

./cfast_osx_intel_64 casename

where casename is the name of your CFAST casename.in file (notice the .in file extension is omitted from the command).
Happy modeling!

Leave a comment »


New web calculator – flame heights and plume centerline temperatures

I’ve posted a new web calculator tool to calculate flame heights and plume centerline temperatures (above the flame height). The calculator is based on the correlations by Heskestad and McCaffrey, and is available here:

http://www.koverholt.com/flame-height-and-plume-centerline-temperature-calculator/

Please let me know if you find any bugs, would like to give feedback on this tool, or have a request for another web calculator!

Comments (3) »


New web calculator tool – transient steel heating under fire conditions

I’ve posted a new web calculator tool related to structural fire safety to calculate the lumped temperature of steel under fire conditions. The tool has the ability to input parameters for steel, select a standard fire time-temperature curve (ISO or ASTM), and choose unprotected or protected steel. The tool is based on the equations from the textbook by A. Buchanan, Structural Design For Fire Safety, and is available here:

http://www.koverholt.com/transient-steel-heating-under-fire-conditions/

I hope you find the calculator useful, and I will continue to add web tools for fire protection engineering calculations. I will be adding a more detailed explanation and equations to the steel heating calculator page in the near future as well as releasing the source code.

Please let me know if you find any bugs, would like to give feedback on this tool, or have a request for another web calculator! The next web tool will be a calculator to give results from the Heskestad flame height and centerline temperatures.

Leave a comment »