using System; using L=Science.Physics.GeneralPhysics; namespace Serway.Chapter21 { /// /// Example01: A Tank of Helium /// A tank used for filling helium balloons has a volume /// of 0.3 m^3 and contains 2.0 mol of helium gas at 20.0 C. /// Assume that the helium behaves like an ideal gas. /// (A) What is the total translational kinetic energy of the gas /// molecules? /// K_{tot trans} = 7.3 \times 10^3 J /// (B) What is the average kinetic energy per molecule? /// \delta e = 6.07 \times 10^{-21} J /// public class Example01 { public Example01() { } private string result; public string Result { get{return result;} } public void Compute() { L.IdealGas gas = new L.IdealGas(); gas.Volume = 0.3; gas.Mole = 2.0; gas.Temperature = 20.0+273.0; gas.FindPressure(); //(A) double total = 3.0/2.0*gas.Pressure*gas.Volume; result+=total.ToString(); double average = total/gas.Mole/L.Constant.AvogadroConstant; result+="\r\n"+average.ToString(); } } } //7308.006 //6.06977242524917E-21