play phryzby with physics

Neon and Oxygen by Density

solved IdealGas

Q. A vessel contains twoVn=Vo, Tn=To non-reactive gases: neon (monatomic) and oxygen (diatomic). The ratio of their partial pressures is 3:2Pn=1.5⋅Po. The atomic mass of neon is 20.2 g/molMn=20.2g/mol and the molecular mass of oxygen is 32.0 g/molMo=32.0g/mol. What is the ratio of the mass densities of neon to oxygen in the vessel?

neonM = 0.0202 kg/moloxygenM = 0.032 kg/mol
Inputs
Mn
20.2 g/mol
Mo
32 g/mol
Outputs
ratio?

How it's solved

Solved with IdealGas

Given

  • Mn=20.2g/mol
  • Mo=32.0g/mol
  • Pn=1.5⋅Po from “partial pressures is 3:2”
  • Vn=Vo from “A vessel contains two”
  • Tn=To from “A vessel contains two”

Find ρnρo.

Working
  1. ideal gas law(oxygen)Po⋅Vo=no⋅R⋅To
  2. no=Po⋅Vo8.31446262⋅To
  3. ideal gas law(neon)Pn⋅Vn=nn⋅R⋅Tn
  4. nn=1.5⋅Po⋅Vo8.31446262⋅To
  5. density of a gas(oxygen)ρo=no⋅MoVo
  6. ρo=no⋅0.032Vo
  7. density of a gas(neon)ρn=nn⋅MnVn
  8. ρn=nn⋅0.0202Vo
  9. ρnρo=0.946875
  10. Mn=20.2g/mol=0.0202kg/mol
  11. Mo=32.0g/mol=0.032kg/mol
Conclusion

Neon has more molecules in the vessel, but each is lighter, so its greater number nearly cancels its lightness.

The web of concepts

given read from the words equation asked

The Ruby that solves it

The question and its solution are small Ruby files. The engine runs them.

question.rb
1require_relative "../physics"23question :neon_and_oxygen_by_density do4  kind :numerical5  describes "A vessel contains two non-reactive gases: neon (monatomic) and oxygen (diatomic). The ratio of their " \6            "partial pressures is 3:2. The atomic mass of neon is %{neon} and the molecular mass of oxygen is " \7            "%{oxygen}. %{ratio} of neon to oxygen in the vessel?"8  given neon: "20.2 g/mol"9  given oxygen: "32.0 g/mol"10  asks ratio: "What is the ratio of the mass densities"11end
solution.rb
1require_relative "../questions/neon_and_oxygen_by_density"2require_relative "../science/kinetic_theory/ideal_gas"34solve :neon_and_oxygen_by_density, using: IdealGas do5  objects :neon, :oxygen67  take neon: neon.molar_mass8  take oxygen: oxygen.molar_mass910  deduce_from "partial pressures is 3:2", neon.pressure => 1.5 * oxygen.pressure11  deduce_from "A vessel contains two", neon.volume => oxygen.volume, neon.temperature => oxygen.temperature1213  answer find_relation(neon.density / oxygen.density), figures: 31415  conclusion "Neon has more molecules in the vessel, but each is lighter, so its greater number nearly cancels " \16             "its lightness."17end
playground.rb
1require_relative "../solutions/neon_and_oxygen_by_density"23play_with :neon_and_oxygen_by_density do4  title "Neon and Oxygen by Density"5end
The laws it drew on
quantitywrittenunitswithinfrom
gas constantRJ mol⁻¹ K⁻¹—IdealGas
pressurePPa0 … ∞IdealGas
volumeVm³0 … ∞IdealGas
amountnmol—IdealGas
temperatureTK0 … 1e+09IdealGas
molar massMkg/mol—IdealGas
densityρkg/m³0 … ∞IdealGas
pressure of groundPgPa0 … ∞
volume of groundVgm³0 … ∞
amount of groundngmol—
temperature of groundTgK0 … 1e+09
pressure of neonPnPa0 … ∞
volume of neonVnm³0 … ∞
amount of neonnnmol—
temperature of neonTnK0 … 1e+09
pressure of oxygenPoPa0 … ∞
volume of oxygenVom³0 … ∞
amount of oxygennomol—
temperature of oxygenToK0 … 1e+09
density of groundρgkg/m³0 … ∞
molar mass of groundMgkg/mol—
density of neonρnkg/m³0 … ∞
molar mass of neonMnkg/mol—
density of oxygenρokg/m³0 … ∞
molar mass of oxygenMokg/mol—
Pg⋅Vg=ng⋅R⋅Tg
ideal gas law
ρg=ng⋅MgVg
density of a gas
Pg⋅Vg=ng⋅R⋅Tg
ideal gas law(ground)
Pn⋅Vn=nn⋅R⋅Tn
ideal gas law(neon)
Po⋅Vo=no⋅R⋅To
ideal gas law(oxygen)
ρg=ng⋅MgVg
density of a gas(ground)
ρn=nn⋅MnVn
density of a gas(neon)
ρo=no⋅MoVo
density of a gas(oxygen)
Pn=1.5⋅Po
partial pressures is 3:2
Vn=Vo
A vessel contains two (volume of neon)
Tn=To
A vessel contains two (temperature of neon)