Ideal Gas Mole Calculator
Description
This application calculates the total number of moles in a specified volume of an ideal gas. It can be used for a pure gas (one component) or for a gas mixture. For mixtures, the user can enter the mole fraction of each component to calculate the number of moles of every gas in the mixture.
The gas is assumed to behave ideally. Gas molecules are modeled as point particles with negligible individual volume, and intermolecular attractions or repulsions are neglected. Collisions are assumed to be perfectly elastic, and the gas is considered to be in thermodynamic equilibrium. Under these assumptions, the gas follows the ideal gas equation of state. This approximation is generally more accurate at relatively low pressures and high temperatures, and may become less accurate near condensation or at high pressures.
Instructions
- Enter the absolute pressure in pascals (Pa), the gas volume in cubic metres (m3), and the absolute temperature in kelvin (K).
- For a pure gas, leave the composition as
1(mole fraction = 1). - For a mixture, enter the component names separated by commas and their mole fractions separated by commas, in the same order. Example:
N2, O2, CO2and0.78, 0.21, 0.01. - Mole fractions must be non-negative and add up to 1. The calculator allows a small rounding tolerance of ±0.001.
- Select Calculate. Use Load Example to test a sample mixture, or Clear to reset the application.
All input quantities must be entered in SI units. Pressure must be absolute, not gauge pressure. Do not enter °C, kPa, bar, litres, or other non-SI alternatives.
Equation and calculation method
Ideal gas equation
\[PV=nRT\]Total number of moles
\[n=\frac{PV}{RT}\]Moles of component \(i\) in a mixture
\[n_i=y_i n\]Mole fraction
\[y_i=\frac{n_i}{n}, \qquad \sum_{i=1}^{k} y_i=1\]Where \(P\) is absolute pressure (Pa), \(V\) is volume (m3), \(T\) is absolute temperature (K), \(n\) is the total amount of gas (mol), and \(R\) is the universal gas constant:
For a mixture, Dalton's law gives the partial pressure of component \(i\) as \(P_i=y_iP\). The calculator also reports this value for each component.
Input data (SI units only)
Gas composition
Enter one component for a pure gas, or multiple components for a mixture.
Results
Total amount of gas:
—
Mixture composition and component results:
| Component | Mole fraction, yi | Partial pressure, Pi (Pa) | Amount, ni (mol) |
|---|---|---|---|
| Results will appear here. | |||
Assumptions and limitations
- The gas or gas mixture is treated as ideal, so \(PV=nRT\) is assumed to be valid.
- Pressure is uniform throughout the gas volume and is an absolute pressure.
- The gas temperature is uniform and expressed in kelvin.
- The entered mole fractions describe the overall gas composition and must sum to one.
- The program calculates amount of substance; it does not calculate compressibility factors or real-gas corrections.