Friday, December 14, 2012

FDS 6 RC2 and Defining Species in FDS 6

To all of you who have provided feedback on FDS 6 RC1, thank you.  Based on feedback we have made some changes to inputs, fixed a few bugs, and have now released FDS 6 RC2.  You can download FDS 6 RC2 from the list of all available downloads.   A major set of changes from RC1 to RC2 is the specification of species.  Based on feedback on the inputs for the new lumped species capability, we have removed the SMIX input and moved the definition of lumped species to the SPEC input.

The remainder of this post will be another in our continuing series on topics in the FDS 6 Release Notes.  This post will focus on some significant changes made to species definitions in FDS 6 including the recent changes in RC2.

FDS 2 through the early versions of FDS 5 gave two options to tracking species.  You could define a primitive species that was tracked by FDS (like the water vapor from sprinklers), or you could make use of a reaction progress variable (which we termed at the time the mixture fraction).  In FDS 5.2 we began shifting, under the hood, the tracking of species from the conserved progress variables to a lumped species approach.  A lumped species is simply an equivalent gas species that represents a mixture of gasses that are always transported together in the same ratio.  For example, air can be considered as a lumped species consisting of 79 % N2 21 % O2 (and trace amounts of other gasses).  As input, however, you could still only use primitive species or access predefined lumped species by using a simple REAC line input.  In this case the predefined species were air and products.  The species were defined based upon the fuel you specified and the single-step reaction of:

Fuel + Air -> Products

For example if the fuel was propane you had:

C3H8 + 5 (O2 + 3.76 N2) ->3 CO2 + 4 H2O + 5 (3.76) N2

In this case the Air species would be the N2+O2 mixture on the left hand side of the equation (the actual species also has ambient CO2 and H2O) and the Product species was the mixture of gasses on the right hand side of the equation.

Doing this was motivated by a few factors.  First, by taking this approach we no longer needed to make use of complex state relationships to obtain the mass fractions of gasses.  Instead, simply multiplying the vector of lumped species by a transformation matrix would give the primitive species. Second, there were requests to track toxicant and irritant products (HCl, HCN, etc.) in order to compute FED and FIC. Trying to provide flexibility to add additional species within the progress variable framework would have been more difficult than the lumped species approach. Lastly, there were other development efforts to make the combustion model more flexible (which will be the subject of a future blog post) and those would be aided by a more flexible set of species inputs. 

What does all this mean for you?  If all you wish to do is use the REAC inputs for simple chemistry with the single-step combustion that was in FDS 5, the changes to species will remain under the hood.  Moving beyond the predefined species present in FDS 5, you now have the ability to define your own.  You now have two types of species that you can input, a primitive species (a single gas) or a lumped species.  For example adding the line shown below will cause FDS to track the species H2.

&SPEC ID='HYDROGEN'/

FDS 6 comes with a much larger set of predefined primitive species, but FDS 6 also allows you to define your own species with better control over the properties than in FDS 5.  You can also define the chemistry of the species which will enable FDS to automatically compute is molecular weight and the formula can then be used with the new REAC capabilities. For exampe:

&SPEC ID='CAFFEINE',FORMULA='C8H10N4O2'/

To input a lumped species, you must first define all the primitive species and then define how those species combine to form the lumped species.  For example, the lines below create a lumped species called AIR that consists of 79 % N2 and 21 % O2.  The LUMPED_COMPONENT_ONLY=.TRUE. tells FDS that the primitive species of NITROGEN and OXYGEN are only found in a lumped species and that FDS should not allocate memory to track them separately.:

&SPEC ID='NITROGEN',LUMPED_COMPONENT_ONLY=.TRUE./
&SPEC ID='OXYGEN',LUMPED_COMPONENT_ONLY=.TRUE./
&SPEC ID='AIR', SPEC_ID='NITROGEN','OXYGEN', VOLUME_FRACTION=0.79,0.21/ 

Consider this set of inputs:
  
&SPEC ID='HYDROGEN SULFIDE',LUMPED_COMPONENT_ONLY=.TRUE./
&SPEC ID='H2S-1',SPEC_ID='HYDROGEN SULFIDE'/
&SPEC ID='H2S-2',SPEC_ID='HYDROGEN SULFIDE'/
&SPEC ID='H2S-3',SPEC_ID='HYDROGEN SULFIDE'/

The above defines three lumped species that are all H2S.  Consider a case where you needed to simulate small leaks of H2S from a variety of sources.  If the leaks are small enough that they don't change the normal ambient airflow, then you could simulate multiple leaks at once provided you had a method to distinguish one leak from another.  With the lines above you can easily define a set of species that have the same properties, but are tracked separately.  If you were to use SPEC_ID='H2S-1' on an output, you would just get that species.  If you were to use SPEC_ID='HYDROGEN SULFIDE' you would get the sum of all three of the lumped species.

In addition to the changes discussed above there are three other notable improvements to the &SPEC input.  First, you can now define temperature dependent properties for custom species (FDS 5 limited you to constant properties). Second, the definition of liquid properties has been moved from &PART to &SPEC so that all species data is processed in one location.  Third, we have added the ability to define some simple aerosol properties.  This last was done to support recent efforts in adding aerosol deposition models to FDS (to compute soot deposition).