GunnsFluidReactor - nasa/gunns GitHub Wiki

GunnsFluidReactor

default_img

Background

This link extends GunnsFluidConductor with a model of chemical reactions, including their reactants, products, and heat balance. This link is similar to the GunnsFluidAdsorber in that it reacts on the fluid flowing through the conductive part of the link. The reactor can be configured to perform 1 or more reactions, which happen in series -- the results of each reaction feed into the input of the next reaction, etc. This can limit the amount of reactants available to following reactions, which is perhaps not ideal and is a model limitation.

GUNNS has a defined set of reaction types that can be used. These are defined in the Type enumeration in the ChemicalReaction class in the gunns/ms-utils/properties/ChemicalReaction.hh file. Some are listed below, but see that file for the complete list of available reactions:

  • CO_REMOVAL (2CO + O2 --> 2CO2)
  • CH4_REMOVAL (CH4 + 2O2 --> CO2 + 2H2O)
  • H2_REMOVAL (2H2 + O2 --> 2H2O)

These reactions make use of a defined set of chemical compounds, which are defined in the Type enumeration in the ChemicalCompound class in the gunns/ms-utils/properties/ChemicalCompound.hh file. Some are listed below, but see that file for the complete list of available compounds:

  • NH42HPO4 (Di-Ammonium hydrogen phosphate)
  • H3PO4 (Phosphoric Acid)
  • NH3 (Ammonia)
  • CH4 (Methane)
  • H2 (Hydrogen)
  • O2 (Oxygen)
  • H2O (Water)
  • CO (Carbon monoxide)
  • CO2 (Carbon dioxide)

Note that not all of these compounds are available as GUNNS fluids. For those compounds that are not GUNNS fluids (the list of fluids is defined in ms-utils/properties/FluidProperties class), the reactor link treats them as either stored catalysts (reactants) or captured products that remain trapped within the link as solids, etc. As reactants, these compounds can feed the reaction until they run out, similar to the adsorbed mass in an adsorber link. Compounds that are fluid constituents are always passed through from inlet to outlet and either removed from the network (reactants) or added to the downstream node as products.

These reactions are not temperature-dependent. For temperature-dependent reaction rates, use a GunnsFluidHotReactor. The reaction rate in this link is always 100% efficient, meaning it always uses the available reactants in the incoming mass flow up until one of the reactants is used up. All reactions also have a maximum reaction mass rate that is imposed here - this is a property of the ChemicalRections class.

Like most fluid conductors, this link models the isentropic expansion and heat convection effects on the fluid exit temperature.

How To Use in GunnsDraw

This link can be connected to nodes in the same ways as a GunnsFluidConductor. Similar to GunnsFluidJumper, reactors involve several steps to set up properly. The reactor link requires a list of reactions and compounds to model. These lists are defined by a Reactor Reactions and a Reactor Compounds list in GunnsDraw, respectively. Default shapes for these lists are found in the GUNNS_Fluid.xml shape library, circled below:

default_img

Drag one of each into your network container. They can be expanded by clicking the '+' symbol in the left side of their title bar. Expanding a default set of lists will look like this:

default_img

Now, give each list a unique name in the network by editing their titles in their title bars. In the Reactions list, modify the list data items to list the reactions types, from ChemicalReaction.hh above, that the reactor link is to model. New rows can be inserted by selecting a row, then clicking <Ctrl+Enter>, and rows can be deleted by selecting a row and clicking <Delete> or <Backspace>. The reactor link will model the reactions as occurring in the order they are listed in this list. Similarly, modify the Compounds list to contain the entire set of compounds, from ChemicalCompound.hh above, used by all the reaction types in your Reactions list. Make sure that each reaction you use has every one of the compounds it needs listed in your Compounds list. The compounds that each reaction type needs is in ChemicalReaction.hh. The compounds can be in any order in the list, but don't duplicate compounds or reactions in a list. Specify any initial mass of a particular compound present in the reactor in the Mass column. This would be important for catalysts in a reaction for which we don't have a fluid type, like H3PO4 in the example shown below. This is an example of what these two lists would look like for a set of reactions:

default_img

Multiple reactor links can use the same lists, and a network can have multiple lists. For example, you could have multiple Compounds lists for the same Reaction list, specifying different initial compound masses. You could have multiple sets of Reactions and Compounds lists for different types of reactors.

Now you are ready to give the Reaction & Compounds lists to the reactor link's configuration data, as described below.

Port Connection Rules (These are limitations on the port connection to nodes that the link enforces in run-time):

Other Rules (These are extra rules you should always try to follow):

  • Do not mix fluid phases across the link. That is, both nodes should contain the same phase (gas or liquid), and not different phases.

Configuration Data Parameters:

  • maxConductivity: Same as GunnsFluidConductor.
  • expansionScaleFactor: Same as GunnsFluidConductor.
  • reactions (default = NULL, must not be NULL): Always use: &netReactions
  • reactionTypes (default = NULL, must not be NULL): This is the name of a Chemical Reactions list you created that specifies which reactions this reactor performs, i.e. tccsReactions
  • nReactions (default = 0, must be > 0): This is the number of reactions in the given reactionTypes.
  • compounds (default = NULL, must not be NULL): Always use: &netCompounds
  • compoundTypes (default = NULL, must not be NULL): This is the name of a Chemical Compounds list you created that contains all of the compounds that all of the reactions in the given reactionsTypes uses, i.e. tccsCompounds. Also note that all compounds that are GUNNS fluid constituents must be present in the network.
  • nCompounds (default = 0, must be > 0): This is the number of compounds in the given compoundTypes.
  • thermalLength: Same as GunnsFluidValve.
  • thermalDiameter: Same as GunnsFluidValve.
  • surfaceRoughness: Same as GunnsFluidValve.

Input Data Parameters:

  • malfBlockageFlag: Same as GunnsFluidConductor.
  • malfBlockageValue: Same as GunnsFluidConductor.
  • totalMasses (default = NULL, must not be NULL): Always use: "compoundTypesMasses.array" (not including quotes), i.e. tccsCompoundsMasses.array
  • wallTemperature: Same as GunnsFluidValve.

Common Problems

  • Initialization Exceptions: Typical problems with set-up involve missing compounds. Either a compound that a reaction expects is not in the compounds list, or a compound that is a GUNNS fluid is not present as a fluid constituent in the network.

References

  • N/A
⚠️ **GitHub.com Fallback** ⚠️