Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

CFAST for inert environment #2215

Unanswered
Vera-MVD asked this question in Q&A
Oct 28, 2025 · 11 comments · 22 replies
Discussion options

Hi!

I am new to CFAST community, have been going through all the manuals and examples to figure out if it could be useful for what I am trying to model. The task is to model a compartment filled with an inert gas (ambient condition on the outside). At some point there is a breach in the wall of the compartment. Due to buoyancy and pressure oxygen starts to ingress through the breach. When the oxygen level in the compartment reaches a certain point, a fire inside the compartment starts. I do have characteristics of the environment inside and outside the compartment, and for the fire as well, but I am puzzled on how to set the initial inert environment and for the fire starting on the oxygen level inside the compartment. I feel like CFAST is capable of modeling this, but maybe I am wrong. Is this something that CFAST can handle or am I asking too much from it?

Any advise would be highly appreciated while I continue going through the old discussions in here to see if this have maybe already been discussed at some point, nothing so far.

Almost forgot, the version I am using is CFAST v 7.7.5 that comes with SMV6 GUI.

Thanks,
Vera

You must be logged in to vote

Replies: 11 comments 22 replies

Comment options

This does not sound like a problem where CFAST is the appropriate tool.

You must be logged in to vote
1 reply
Comment options

Thank you for your response. TBH, I was both expected and dreaded that would be the case. You know the feeling when it is all there in front of you and looks like with a few modifications it all going to work, but you are struggling to make the right changes to get there? That's how I am feeling. But yes, I understand CFAST was not designed for this. Thank you again!

Comment options

I don't know if CFAST would allow a breach. The geometry is fixed from the start.

You must be logged in to vote
1 reply
Comment options

Oh, I can work with a breach present at time zero as long as the inert environment is set inside the compartment at that time. I just need to see how fast the oxygen level rises depending on the size of the breach and the inside/outside condition and the fire progression after it starts. Thank you!

Comment options

Others might know better, but I am not sure one can set an initial environment inside that is different than outside. This would start the simulation off with a non-sensical discontinuity at the boundary between zones. I think the CFAST solver would choke on that.

You must be logged in to vote
7 replies
Comment options

Well, I cannot even get to that point to see if CFAST would choke on that.

I got a false hope from chatGPT (guilty of going that route, to my defense I only went there after going through the user manuals, examples, and youtube videos of CFAST). AI's answer was "Sure, it is possible", but needless to say none of it's solutions actually worked.

Thank you!

Comment options

Think of us as ChatBots that don't pander or patronize. We give it to you straight.

Comment options

I'd much rather hear that than false hope statements. I appreciate all the responses I've gotten here today!

Comment options

You're welcome, and you're still Amazing!!

Comment options

Thank you!

Comment options

Before I completely give up the idea of using CFAST for my task, I want to ask: can the Nitrogen and Oxygen mass fraction of the initial environment be changed by a user from their look-like-preset values of 77% and 23% respectively (from CFAST Technical Reference Guide (p.10)) ? I understand that I cannot do it from within the GUI itself, but is it possible to make the changes manually in the code? Would all the code's calculations and results be valid still after that or they are all based on that 77/23 ratio?

Thank you in advance for any input on this,
Vera

You must be logged in to vote
4 replies
Comment options

You would have to edit the source code and compile your own version of CFAST.

Comment options

Thank you for your response. Oh, so it is possible? Is cfast.f90 in the Code tab, updated 2 yrs ago the right source code file?

Comment options

You will need to carefully review the source code so you understand which variable(s) or type structure(s) need to be modified.

Comment options

I understand. For this particular task I would have to step down and let someone else to do the changes to the source code. To work with the GUI is one thing, but messing with the source code manually is a completely different level, which unfortunately I am not at. Thank you, I appreciate your responses!

Comment options

try cfast posted here.
https://github.com/firemodels/test_bundles/releases/tag/CFAST_TEST
To define initial O2 concentration for all interior rooms use INTERIOR_O2_CONC on the &INIT line - default is 0.23 kg/kg. Likewise, to define O2 concentration for the outside use EXTERIOR_O2_CONC on the &INIT line. Nitrogen concentration is set to 1 - O2 concentration. Concentrations must be between 0.0 and 1.0.

The following defined interior O2 concentrations to 0.1 kg/kg and exterior O2 concentration to 0.2 kg/kg
&INIT INTERIOR_O2_CONC=0.1, EXTERIOR_O2_CON=0.2 /

You must be logged in to vote
3 replies
Comment options

Thank you so much for your response! I will be testing it today. If I may ask, what software do I have to have on my computer to be able to recompile the code if I make any further changes to it? I'm contacting my IT group today, so I could ask them to install it for me.

Comment options

A Fortran compiler. We use the Intel oneAPI Fortran compiler. It is free, but requires some IT know-how to install and use. These instructions are a bit out of date, but will get you started.

Comment options

Thank you!

Comment options

Hi guys, I need your input to understand the t = 0 cell pressure output. I've changed the initial internal pressure from ambient to 4 in w.g. below that. The output text file captures that in the ambient conditions section, showing Interior Pressure (Pa) as 83811.84, but when I scroll down the file to the Time = 0.0 seconds, Cell Pressure (Pa) is shown as zero. The same zero for the Cell pressure at time 0s is shown in the output excel file (name_compartments.xls, cell F5). Question: Why? Is the Interior Pressure in the ambient conditions section of the input file is not really the cell pressure at time = 0s that the excel file shows? What am I missing?

The model I am trying to setup is just a single compartment with inert environment on the inside and ambient conditions on the outside. There is also one small breach on the wall (set it up as a small wall vent for now). No fire simulation yet. I would like to see the cell P and T profiles and also the changes of masses of N2 and O2 in the cell.

The changes I've done to the source code file are really just that, changing the cell ambient environment to inert and the initial cell pressure is now lower than that on the outside of the cell. The rest is controlled through the input interface (inside T 40C, outside T 20C, humidity 0%)

Change 1: Creating the inert environment.
Source file: input_namelist.f90 line 295
!interior_o2_mass_fraction = default_o2_mass_fraction ! kg/kg
changed to:
interior_o2_mass_fraction = 0.0_eb ! kg/kg

The output text file now shows at time 0 I have 100% N2 and 0% O2 (as expected). Since I have a small breach on the wall, as the simulation starts, the ambient air starts flowing in the compartment and some N2 is leaving it. But if I look at the Time = 60 sec in the output text file, it still shows 100% N2 for the upper layer with some O2 also present. So, the sum would be more than 100%. It shouldn't be, right? I need to check if that is just a simple output precision issue and the 100% shown is just a rounded up number.

Change 2: Initial Cell Pressure. I did not see the one place where I thought it would be defined as an input parameter, so I've made the following changes to the couple of places in the code:
2.1. Source file: input.f90 line 108
!interior_abs_pressure = exterior_abs_pressure*interior_ambient_temperature/exterior_ambient_temperature
changed to:
interior_abs_pressure = 83811.84_eb
2.2. Source file: initialization.f90 lines 317 - 325
t_ref = default_temperature
pressure_ref = default_pressure
!interior_abs_pressure = pressure_ref
changed to:
interior_abs_pressure = 83811.84_eb
pressure_offset = pressure_ref
interior_ambient_temperature = t_ref
tgignt = t_ref + 200.0_eb
exterior_ambient_temperature = interior_ambient_temperature
!exterior_abs_pressure = interior_abs_pressure
changed to:
exterior_abs_pressure = pressure_ref

With these changes, the Cell P output for time 0 is shown as 0.00 in both excel and text output files. Am I missing more places in the source code where the changes should be done? If what shown is the relative pressure, relative to the initial cell conditions (it would explain zeros at time zero), but then the absolute cell pressure in the excel file (column G) should be the initial cell pressure (in my case 83811.84Pa) and not the ambient P from the outside, right? But it shows the outside pressure as absolute cell pressure..

I would appreciate your input on this,

Vera

You must be logged in to vote
0 replies
Comment options

Regarding my message above.. My confusion is that I do not understand what pressure exactly is shown in text output file and excel output file?

From the User manual (p. 51), the text output file shows (at each time interval) "compartment pressure (relative to ambient)".

The ambient conditions are listed in the text output file as T and P for both the Interior and Exterior. In my case, interior pressure is below exterior (by 4 in w.g.). So, when it says "relative to ambient" does it mean to the initial interior pressure (that would explain why it is zero at time = 0)?

When we look at the excel output file, it looks as it shows the same output for pressure in Column F (Pressure Cell, Pa) as the text output file. But per User Manual (p.54) that pressure is "pressure at compartment floor relative to the outside at the absolute height of the floor." So, it is relative to the exterior pressure. Then, it cannot be equal zero at time = 0 as shown by the excel file as the initial value for interior pressure is different than for exterior.

And then we have Absolute Pressure Cell, Pa Column G in the excel file, that I though was the initial interior pressure, but it shows the exterior pressure. The user Manual does not have a description for this output, I guess it was added later.

Is there anyone who can help me to understand what those pressure outputs are and how they relate to the initial interior pressure? And also tell if there are more places in the source code (additional to the two I've identified in the message above) where manual changes should be made to reflect a scenario with different starting point for interior and exterior pressure?

Thanks in advance for any help with this matter,

Vera

You must be logged in to vote
0 replies
Comment options

You can set up your cases to work or at least to run. The breach is a vent that opens at a certain time. I don't know what inert atmosphere you can be talking about, I am sorry. However, if you talking about a full rich environment with no oxygen, which is technically not burning but it seems misleading to call it inert. If you want to start a fire in the compartment when the oxygen concentration is sufficient I think you probably have to go to FDS. While I think I could jury-rigged that case it would have too many assumptions and work arounds to trust and as such I wouldn't do that. If you mean you have fuel rich environment at low pressure and the interior temp is sufficiently above the combustion temp and what you are interested in is a vent jet fire, that would be external to your compartment that at least can be done, I would not trust the answers. It is not impossible that CFAST would entrain fuel into the oxygen plume in the compartment at the start of the breach and start combustion inside the compartment. It may even represent the actual results well but it feels like it would be outside our assumptions for vent jet fires and we have no test data to compare the model answer to so there is no way to estimate the accuracy if it even worked. In fact I am not sure it even should. You are trying to answer questions about conditions that likely are outside the conditions that CFAST was even considering when it was created. I would again suggest that you talk to the FDS experts about the possibility of FDS giving you the answers you want.

You must be logged in to vote
1 reply
Comment options

Thank you for your response!

By inert environment I mean an environment with close to zero O2 and close to 100% of inert gas.

For the simple case to just see how CFAST works and to be able to track the numbers easily, I did use just 100% N2 and 0% O2 with humidity also set to zero. Totally unrealistic, but as I said just to test the things out. One compartment. N o doors, no windows for now. Outside is just an ambient air. Inside sub ambient pressure and elevated temperature. And I am using the vent fully open from time t=0, to represent just a sort of a breach in the wall. I can open it at a certain time of course, but just to simplify the tracking and understanding of the results let's say it is always fully open.

There will be a fuel in the compartment, that would combust when the O2 fraction reaches a certain level, but that would be a problem for the next step.

I want to see how fast (depending on the breach size) the O2 level will raise in the compartment. It sounds like a simple setup, but with CFAST built using ambient environment everywhere as a starting point, I need to make some changes to the source code. And while the first set of changes regarding the 100% N2 environment looked like it worked OK, changing the pressure inside the compartment to be different that on the outside presents some challenges as I am having troubles tracking the places in the code where such changes have to be made. Add to that me being not a coder and one who only has some basic knowledge in Fortran, the process is painfully slow.

On the other hand, I would prefer not to make many changes to the source code for the exact the reason you've mentioned, the results validity will become questionable.

At the moment I've made the changes to the inside pressure (not sure it was done properly, so, I posted here for any more suggestions), but the pressure output does not make sense. Two reasons for that: I messed up completely the source code (quite possible), and I simply read the output files wrong. Tried the User Manual, to not much help. Thus, my questions above.

As an alternative, I am thinking of maybe using the forced ventilation to get to that sub ambient pressure point inside the compartment before opening the breach (instead of trying to manually set it up from within the code). But then I will have to somehow bring the inside temperature up by the exact same time of the desired pressure level is reachable.

Anyway, thank you for your suggestion about the FDS, I'll take a look at it.

Regards,

Vera

Comment options

If you want to see the impact start with your vent being f=0, t=0, f=0, t=1, f=1, t=2. When you start as you did CFAST tries to come up with an initial solution at t = 0 and that means you will not see the response you are looking to observe. I would also set the spreadsheet output at 0.1 s. Otherwise all you will see is a step change from one steady state condition to another. You might want to even use a timestep of 0.01. Run the case for 5 s or less and you will see how CFAST responds, in that case, which is to equilibrate internal conditions to external conditions. Now that I see what you are doing, sorry it took so long, this isn't an unreasonable test but it isn't likely to show you that much.

You must be logged in to vote
1 reply
Comment options

No, no, you are good. I appreciate your help very much. I've rerun with the wall vent set to open fully at 2s with output for excel every 0.01s. I see a much smoother change in P as expected. The problem is that Absolute Cell Pressure (shown in Column G) is actually not interior (cell) pressure but looks like it is ambient exterior pressure. If we assume (as I am not 100% sure I am reading the results correctly) that the Cell Pressure shown in Colum F is actually a relative cell pressure (relative to the initial (at time t=0s) pressure, then to get the actual cell pressure I would need to sum the initial cell pressure (83811.84 Pa) with Column F, right? I am attaching a few screenshots with the inputs and the outputs focused on the cell pressure. Also attached are screenshots of the two places in the source code where I've made the changes to reflect that the interior pressure is sub ambient. Based on the output I am getting, I am suspecting that there are might be more places in the code where the modification have to be made to reflect that input modification.

Thanks,
Vera
CFAST Inert with subambient P txt 1
CFAST Inert with subambient P txt 2
CFAST Inert with subambient P excel
CFAST Inert with subambient P initialization_f90
CFAST Inert with subambient P input_f90

Comment options

I would agree with @preneke. This is not a good problem for CFAST. Reignition is going to occur somewhere along the contour of the incomming flow where O2 cocentrations support combustion. That event could happen anywhere in the compartment depending on where there is sufficient tempeature to support ignition. CFAST is going to average the door flow over the entire compartment. CFAST does not predict the shape of the incomming plume or its entrainement.

Even with FDS this is a research problem and not common practice. Predicting reignition is challenging, even for CFD.

You must be logged in to vote
1 reply
Comment options

Thank you for your response. I know that I am sort of doing both: (1) asking CFAST to do what it was not even designed to do, and (2) using only a fraction of what CFAST actually can do.

As for the fire, I am not at the fire stage yet, as I am having problems with setting up the initial environment at the moment. When/if I am pass this point, I was thinking about introducing a fire in the following way. I know that it must start when the O2 concentration in the cell reaches a certain level (say 5%). So, I was planning to run the model first (without fire) to see when the O2 gets to 5%. Then modify the model introducing my fire at that time. I think CFAST can do this, right?

Thanks,

Vera

Comment options

Yes, I believe you can get CFAST to do this, including the fire. I am not sure what you accomplish beyond learning how to run certain cases in CFAST. While I don't want to discourage you from learning to run CFAST, I am concerned you are entering a realm of misusing CFAST by falling victim to the idea of if CFAST runs it must be a useful calculation. As with all scientific tools you have to be very careful to stay within the assumptions. If you are concerned with the impact of the fire you trying to study and its impacts on a larger building you can use other tools to get a reasonable estimate of the local fire behavior and then you use that estimate as part of the inputs for an analysis of a larger structure with this fire occurring. There are lots of flexibility that CFAST has to help answer all sorts of questions, but it has its limits and it is important to understand that just because you can get CFAST to run doesn't mean that the results from CFAST should be trusted. If you are jury rigging your way about the limits that CFAST has the results might be very difficult to make sense of. Still if you are very careful of using the results and there relationship to CFASTS assumption I do think you can get a case to run.

You must be logged in to vote
3 replies
Comment options

The only thing I am questioning at the moment - can CFAST handle initial environment on the inside being different than on the outside? Inert gas on the inside vs ambient on the outside in my case. If the answer is yes, than what in the source code should be changed to reflect that. Plus my questions about the Cell pressure output in the excel file that I've mentioned above.

Through the GUI you can only specify the outside T and P and inside T. Not the inside P which is calculated in the source code as (see file input.f90 line 108)

interior_abs_pressure = exterior_abs_pressure*interior_ambient_temperature/exterior_ambient_temperature
I cannot use this as my case uses inert atmosphere on the inside, not ambient air as on the outside.

There is another place in the source code (see initialization.f90 line 318-319) where the inside P equated to the outside (default ambient pressure)

pressure_ref = default_pressure
interior_abs_pressure = pressure_ref

These are the two places where I've changed so far in the source code by manually defining the absolute inside pressure to that of my case (the changes are shown in the attached screenshots above).

Is there any more places in the source code that have to be modified to reflect my case (given that the initial O2 mass fraction on the inside is already changed to 0)?

I understand that CFAST was created for certain purpose and works only under certain assumptions (as any other code out there). I wonder if the changes I am trying to make to the source code would change any of the original assumptions and make the results questionable. I am not asking CFAST to do things differently I am just trying to make it start from a specific set of initial condition for the compartment environment.

I do appreciate all the responses,

Vera

Comment options

preneke Jan 22, 2026
Collaborator

I want to say it use to do that, which is an inside joke. I will see if I can get to that in the next day or so. If not it might take months for us to thaw out from this massive blizzard we are expecting Sunday. I will say there is no reason that it shouldn't be able to do that and if it doesn't it is a function of adding the inputs and nothing more. CFAST doesn't inherently have any problem with that. My only concern is making sure that the case has to be stable initial solution at t = 0, which could be a huge issue in the GUI. I shouldn't write this stream of consciousness. The initial solution could be a real problem in cases people might want to run. In your case you just need to start any actual changes at t = 1 but that isn't always true in every case a person might try to run.

Comment options

Thank you! I really appreciate your help with this and yes, starting changes at t=1 is not an issue for my case.

Stay warm and safe, and send some snow our way (Chicago) as it looks like beside the rather cold conditions outside which is expected for tomorrow we are not going to get much snow.

Vera

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /