gov.nist.microanalysis.EPQLibrary
Class Gas

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

public class Gas
extends Material

Implements a gas based on the ideal gas law. It should be noted that this model of gases is niave (from many perspectives). The model views all interactions as essentially atomic. No molecular considerations are included except in as much as a mole of O2 has twice as many atoms as a mole of O.

Copyright: Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the public domain

Institution: National Institute of Standards and Technology

Version:
1.0
Author:
Nicholas
See Also:
Serialized Form

Field Summary
static double MOLAR_VOLUME
           
static double RYDBERG_CONSTANT
           
static double STANDARD_PRESSURE
           
static double STANDARD_TEMPERATURE
           
 
Fields inherited from class gov.nist.microanalysis.EPQLibrary.Composition
mHashCode, STOICIOMETRY, UNDETERMINED, WEIGHT_PCT
 
Constructor Summary
protected Gas()
           
  Gas(Element[] elms, int[] stoic, double pressure, double temperature, java.lang.String name)
          Constructs a single molecular gas such as N2, O2, Ar, CO2 etc.
 
Method Summary
 java.lang.Object clone()
           
 double getMassPerSubunit()
          getMassPerSubunit - For used with materials defined by stoichiometry.
 double getPressure()
          getPressure - returns the pressure (in pascal)
 double getTemperature()
          getTemperature - Returns the temperature (in kelvin)
protected  void replicate(Gas gas)
           
 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, 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
 

Field Detail

RYDBERG_CONSTANT

public static final double RYDBERG_CONSTANT
See Also:
Constant Field Values

MOLAR_VOLUME

public static final double MOLAR_VOLUME
See Also:
Constant Field Values

STANDARD_PRESSURE

public static final double STANDARD_PRESSURE
See Also:
Constant Field Values

STANDARD_TEMPERATURE

public static final double STANDARD_TEMPERATURE
See Also:
Constant Field Values
Constructor Detail

Gas

protected Gas()

Gas

public Gas(Element[] elms,
           int[] stoic,
           double pressure,
           double temperature,
           java.lang.String name)
Constructs a single molecular gas such as N2, O2, Ar, CO2 etc.

Parameters:
elms - The elemental constituents
stoic - The molecular stoiciometry
pressure - in pascal
temperature - in kelvin
name - a human-friendly name
Method Detail

getMassPerSubunit

public double getMassPerSubunit()
getMassPerSubunit - For used with materials defined by stoichiometry. Returns the mass of a single molecular subunit whether it be a gas such as N2 or a crystal unit cell.

Returns:
- The mass in kg per molecular subunit

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

replicate

protected void replicate(Gas gas)

clone

public java.lang.Object clone()
Overrides:
clone in class Material