Molar_Quantity_and_Flows - nasa/gunns GitHub Wiki

Molar Quantity and Flows

Moles vs. Mass

Looking at one row in an example fluid system that combines all of the fluid effects Fluid_Capacitance, Conductance, Potential_Source and Flow_Source:

We can see that since they’re all additive, all the terms must combine with consistent units matching the flow source F, which is quantity per time. So the units of the fluid system must be either (kg/s) or (kg*mol/s). GUNNS chooses molar quantity & flow, (kg*mol/s).

The reason is because of a convenient property of ideal gases: they all have the same compressibility factor = 1. All ideal gases have identical molar compressibility at the same temperature and pressure. We assume that fluid in a node is homogenous, i.e. all the individual constituents in a mixture in a node are at equal temperature and pressure. This means that when we change the mixture of ideal gases in a node, since the individual fluid constituents are always at the same temperature & pressure, all resulting mixtures have the same compressibility, and thus molar capacitance. In other words, adding a mole of ideal nitrogen to a node increases the node pressure by the exact same amount as adding a mole of ideal hydrogen. The same is not true for adding equal masses to a node, or adding equal moles of non-ideal fluids.

The upshot of this is that when we have different mixtures of ideal gases combining & mixing in nodes, we incur no Fluid_State_Error due to the mixing. No such advantage can be gained by working with mass for any mixture of fluid types. Systems with ideal gas mixtures (e.g. air) are the most typical application of the fluid aspect in GUNNS, thus it is worth using moles as our working quantity.

Molecular Weight Units & Conversions

The Trick units we use for molecular weight (1/mol) needs some explanation. First, here is a good review of what we call Molecular Weight MW_: Molar Mass. Here is a review of the definition of a Mole%28unit%29, and see here for a description of the kilogram-mole that is our standard variant: Other units called mole. We express the molecular weights of compounds as (kg/kg-mol), which reduces to (1/mol). The molecular weight of H2O is 18.0153, whether expressed in the standard definition (g/mole), or in different units of mass (lb/lb-mole), (kg/kg-mole) etc. Our weight is 18.0153 kilgrams per kilo-mole (or kg-mole, same thing), and since there are 1000 gram-moles per kilogram-mole, it all works out to 18.0153. We chose to create a single Trick unit that would work for any mass prefix, (mol). Then Trick can automatically convert between different mass prefixes for us such as (g*mol) and (kg*mol), etc. The unit itself (mol) is classified as one of Trick’s dimensionless units, along with (one), (1), etc. It is really just a label for clarity.

The standard GUNNS unit for mass is chosen to be (kg), time is (s), so the standard mass flow rate unit is (kg/s). Thus, for convenience when converting between mass flow rate and molar flow rate, if we want to use the standard molecular weight values for compounds (18.0153 for H2O, etc), then when we convert we must be clear with our units, thus:

molecular weight (1/mol) = mass (kg) / kilogram-moles (kg*mol) = (kg/kg/mol) = (1/mol)

And our molecular flow rates take the units: molar rate = mass rate (kg/s) / MW (1/mol) = (kg*mol/s).

⚠️ **GitHub.com Fallback** ⚠️