gov.nist.microanalysis.EPQLibrary
Class GasMixture

java.lang.Object
  extended by gov.nist.microanalysis.EPQLibrary.Composition
      extended by gov.nist.microanalysis.EPQLibrary.Material
          extended by gov.nist.microanalysis.EPQLibrary.GasMixture
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

public class GasMixture
extends Material

A GasMixture is a Material constructed from one or more Gases. The gases are assume to occupy the same volume and to obey the ideal gas law.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.nist.microanalysis.EPQLibrary.Composition
mHashCode, STOICIOMETRY, UNDETERMINED, WEIGHT_PCT
 
Constructor Summary
GasMixture(Gas[] gases, double temp, java.lang.String name)
          Create a gas mixture from its constituent gases.
 
Method Summary
static GasMixture createAir(double pressure, double temperature)
          createAir - Creates a gas with nominally the same composition as the air we breath.
 double getPressure()
          getPressure - returns the pressure (in pascal)
 double getTemperature()
          getTemperature - Returns the temperature (in kelvin)
 void setTemperature(double newTemp)
          setTemperature - Modifies the temperature of the gas and updates the pressure assuming constant volume.
 
Methods inherited from class gov.nist.microanalysis.EPQLibrary.Material
atomsPerCubicMeter, clear, clone, compareTo, defineByMaterialFraction, defineByWeightFraction, descriptiveString, equals, getDensity, hashCode, renormalize, replicate, setDensity
 
Methods inherited from class gov.nist.microanalysis.EPQLibrary.Composition
addElement, addElement, addElementByStoiciometry, containsElement, defineByMoleFraction, defineByWeightFraction, defineByWeightFraction, difference, elementSet, fromXML, getElementCount, getElementSet, getName, getNthElementByAtomicFraction, getNthElementByWeight, getOptimalRepresentation, massAbsorptionCoefficient, moleFraction, removeElement, replicate, setName, stoiciometryAvgAtomicNumber, sumWeightPercent, toString, toXML, weightAvgAtomicNumber, weightPercent
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GasMixture

public GasMixture(Gas[] gases,
                  double temp,
                  java.lang.String name)
Create a gas mixture from its constituent gases. The gases are first brought to a common temperature and then summed. The total pressure of the gas is the sum of the partial pressures. For example, air is 78.084% N2, 20.947% O2, 0.934% Ar, 0.033% CO2 and trace other elements (by volume). Create each gas independently using Gas(Element[],int[],double,double,String) then sum them together.

Parameters:
gases - A list of constituent gases
temp - The common temperature in kelvin
name - The human friendly name for the gas
Method Detail

setTemperature

public void setTemperature(double newTemp)
setTemperature - Modifies the temperature of the gas and updates the pressure assuming constant volume.

Parameters:
newTemp - In kelvin

getTemperature

public double getTemperature()
getTemperature - Returns the temperature (in kelvin)

Returns:
The temperature in kelvin

getPressure

public double getPressure()
getPressure - returns the pressure (in pascal)

Returns:
The pressure in pascal

createAir

public static GasMixture createAir(double pressure,
                                   double temperature)
createAir - Creates a gas with nominally the same composition as the air we breath.

Parameters:
pressure -
temperature -
Returns:
An instance of GasMixture