edu.davidson.chm.equilibria
Class Species

java.lang.Object
  extended by edu.davidson.chm.equilibria.Species
All Implemented Interfaces:
PhysicalConstants

public class Species
extends java.lang.Object
implements PhysicalConstants

A Species object contains the information necessary to describe a chemical species

Copyright: Copyright (c) David N. Blauch

Version:
2.0
Author:
David N. Blauch

Field Summary
 
Fields inherited from interface edu.davidson.chm.equilibria.PhysicalConstants
F, k, No, perm, qe, R, RJ
 
Constructor Summary
Species()
          The default constructor should never be used.
Species(ChemSpecies _chemSpecies, Phase _phase)
          Creates a species consisting of the indicated ChemSpecies in the indicated Phase.
Species(ChemSpecies _chemSpecies, Phase _phase, double _moles)
          Creates a species consisting of the indicated ChemSpecies in the indicated Phase.
 
Method Summary
 double getActivity()
          Returns the activity of the species.
 double getActivityCoefficient()
          Returns the activity coefficient for the species.
 double getAnalConc()
          Returns the analytical concentration (mole/L)
 double getAnalMass()
          Returns the analytical mass in grams
 double getAnalMoles()
          Returns the analytical number of moles
 double getAnalPressure()
          Returns the analytical partial pressure.
 double getCharge()
          Returns the charge on the species.
 ChemSpecies getChemSpecies()
          Returns the ChemSpecies for this Species.
 ChemSystem getChemSystem()
          Returns the chemical system in which the species exists
 double getConc()
          Returns the molar concentration.
 double getFW()
          Returns the formula weight of the species
 java.lang.String getInfo()
          Returns information about this class
 double getIonSize()
          Returns the Debye-Huckel ion size parameter in angstroms
 java.lang.String getLabel()
          Returns the phase label
 double getMass()
          Returns the mass in grams
 double getMoles()
          Returns the moles of the species.
 Phase getPhase()
          Returns the phase in which the species exists
 char getPhysicalState()
          Returns the physical state of the species.
 double getPressure()
          Returns the partial pressure of the species in atmospheres.
 boolean isEquivalent(Species _sp)
          Returns true if the Species is equivalent to the user-supplied Species.
 void setAnalConc(double _analConc)
          Sets the analytical concentration (moles/L).
 void setAnalMass(double _analMass)
          Sets the analytical mass of the species
 void setAnalMoles(double _analMoles)
          Sets the analytical number of moles.
 void setAnalPressure(double _analPressure)
          Sets the analytical partial pressure in atmospheres.
 void setFW(double _fw)
          Sets the formula weight of the species by calling the setFW method of the ChemSpecies.
 void setIonSize(double _ionSize)
          Sets the Debye-Huckel ion size parameter in angstroms by calling the setIonSize method of the ChemSpecies.
 void setLabel(java.lang.String _label)
          Sets the label for the species by calling the setLabel method of the ChemSpecies.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Species

public Species()
The default constructor should never be used.


Species

public Species(ChemSpecies _chemSpecies,
               Phase _phase)
Creates a species consisting of the indicated ChemSpecies in the indicated Phase.


Species

public Species(ChemSpecies _chemSpecies,
               Phase _phase,
               double _moles)
Creates a species consisting of the indicated ChemSpecies in the indicated Phase.

Parameters:
_moles - amount of species
Method Detail

getActivityCoefficient

public double getActivityCoefficient()
Returns the activity coefficient for the species.


getActivity

public double getActivity()
Returns the activity of the species.


getAnalConc

public double getAnalConc()
Returns the analytical concentration (mole/L)


getAnalMass

public double getAnalMass()
Returns the analytical mass in grams


getAnalMoles

public double getAnalMoles()
Returns the analytical number of moles


getAnalPressure

public double getAnalPressure()
Returns the analytical partial pressure. Returns the system pressure if the species is not in the gas phase.


getCharge

public double getCharge()
Returns the charge on the species.


getChemSpecies

public ChemSpecies getChemSpecies()
Returns the ChemSpecies for this Species.


getChemSystem

public ChemSystem getChemSystem()
Returns the chemical system in which the species exists


getConc

public double getConc()
Returns the molar concentration.


getFW

public double getFW()
Returns the formula weight of the species


getInfo

public java.lang.String getInfo()
Returns information about this class


getIonSize

public double getIonSize()
Returns the Debye-Huckel ion size parameter in angstroms


getLabel

public java.lang.String getLabel()
Returns the phase label


getMass

public double getMass()
Returns the mass in grams


getMoles

public double getMoles()
Returns the moles of the species. The number of moles cannot be set; it is always calculated.


getPhase

public Phase getPhase()
Returns the phase in which the species exists


getPhysicalState

public char getPhysicalState()
Returns the physical state of the species.

s = solid (this must be the same as the phase and this species is the only species in the phase)

l = liquid (either the phase is a pure liquid, or this species is the solvent in a solution)

g = gas (this must be the same as the phase)

d = solute


getPressure

public double getPressure()
Returns the partial pressure of the species in atmospheres. Returns the system pressure if the species is not in the gas phase. For gas-phase species, the ideal gas law is employed. To employ a different equation of state, override the getPressure(double _moles, double _volume) method in the associated Phase class.

See Also:
Phase.getPressure(), Gas.getPressure()

isEquivalent

public boolean isEquivalent(Species _sp)
Returns true if the Species is equivalent to the user-supplied Species. To be equivalent, both Species must be the same ChemSpecies. Both Species must also have the same physical state. If the Species are solutes, both solvents must have the same ChemSpecies.


setAnalConc

public void setAnalConc(double _analConc)
Sets the analytical concentration (moles/L). The volume of the phase is used to set the analytical moles; thus the volume should be set before setting the analytical concentration.


setAnalMass

public void setAnalMass(double _analMass)
Sets the analytical mass of the species


setAnalMoles

public void setAnalMoles(double _analMoles)
Sets the analytical number of moles.


setAnalPressure

public void setAnalPressure(double _analPressure)
Sets the analytical partial pressure in atmospheres. The temperature of the system and the volume of the phase are used to set the analytical moles; thus these values should be set prior to setting the analytical partial pressure. This method does nothing if the species is not in the gas phase.


setFW

public void setFW(double _fw)
Sets the formula weight of the species by calling the setFW method of the ChemSpecies.

See Also:
ChemSpecies.setFW(double)

setIonSize

public void setIonSize(double _ionSize)
Sets the Debye-Huckel ion size parameter in angstroms by calling the setIonSize method of the ChemSpecies.

See Also:
ChemSpecies.setIonSize(double)

setLabel

public void setLabel(java.lang.String _label)
Sets the label for the species by calling the setLabel method of the ChemSpecies.

See Also:
ChemSpecies.setLabel(java.lang.String)