org.jscience.chemistry.vapor
Class VLEContext

java.lang.Object
  extended by org.jscience.chemistry.vapor.VLEContext

public class VLEContext
extends java.lang.Object

This class provides the context for the application.


Constructor Summary
VLEContext()
           
 
Method Summary
 double calcBUBLP(double T)
          Calculates the BUBL P at the given temperature.
 double calcBUBLT(double P)
          Calculates the BUBL T at the given pressure.
 double calcDEWP(double T)
          Calculates the DEW P at the given temperature.
 double calcDEWT(double P)
          Calculates the DEW T at the given pressure.
 double calcFlashPoint(double P, double T)
          Calculates the flash point compositions at given P and T.
static IActivityCalculator getActivityCalculator(int activityMethod)
          Returns the instance of actual activity calculator class given the method ID.
 int getActivityMethod()
          Returns the currently selected activity method.
static java.util.ArrayList getActivityMethodList()
          Returns the list of activity methods supported by application.
 ComponentData[] getComponents()
          Returns the list of components in the current system.
static IFugacityCalculator getFugacityCalculator(int fugacityMethod)
          Returns the instance of actual fugacity calculator class given the method ID.
 int getFugacityMethod()
          Returns the currently selected fugacity method.
static java.util.ArrayList getFugacityMethodList()
          Returns the list of fugacity methods supported by application.
 double[] getLiquidMoleFractions()
          Returns the liquid mole fractions of the components.
 int getNumOfComps()
          Returns the number of components in current system.
 double[] getVapourMoleFractions()
          Returns the vapour mole fractions of the components.
static void initialize()
          Initialize the context for the application.
 void setActivityMethod(int method, java.lang.Object[] params)
          Sets the activity method for calculations.
 void setComponents(ComponentData[] compData)
          Sets the list of components for the current system.
 void setFugacityMethod(int method)
          Sets the fugacity method for calculations.
 void setLiquidMoleFractions(double[] fractions)
          Sets the liquid mole fractions of the components.
 void setVapourMoleFractions(double[] fractions)
          Sets the vapour mole fractions of the components.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VLEContext

public VLEContext()
Method Detail

initialize

public static void initialize()
Initialize the context for the application.


getActivityMethodList

public static java.util.ArrayList getActivityMethodList()
Returns the list of activity methods supported by application.

Returns:
DOCUMENT ME!

getFugacityMethodList

public static java.util.ArrayList getFugacityMethodList()
Returns the list of fugacity methods supported by application.

Returns:
DOCUMENT ME!

getNumOfComps

public int getNumOfComps()
Returns the number of components in current system.

Returns:
DOCUMENT ME!

getActivityMethod

public int getActivityMethod()
Returns the currently selected activity method.

Returns:
DOCUMENT ME!

setActivityMethod

public void setActivityMethod(int method,
                              java.lang.Object[] params)
                       throws VLEException
Sets the activity method for calculations.

Parameters:
method - Method ID
params - Optional parameter list for the methods
Throws:
VLEException - DOCUMENT ME!

getFugacityMethod

public int getFugacityMethod()
Returns the currently selected fugacity method.

Returns:
DOCUMENT ME!

setFugacityMethod

public void setFugacityMethod(int method)
Sets the fugacity method for calculations.

Parameters:
method - Method ID

getComponents

public ComponentData[] getComponents()
Returns the list of components in the current system.

Returns:
DOCUMENT ME!

setComponents

public void setComponents(ComponentData[] compData)
Sets the list of components for the current system.

Parameters:
compData - DOCUMENT ME!

getVapourMoleFractions

public double[] getVapourMoleFractions()
Returns the vapour mole fractions of the components.

Returns:
DOCUMENT ME!

setVapourMoleFractions

public void setVapourMoleFractions(double[] fractions)
Sets the vapour mole fractions of the components.

Parameters:
fractions - DOCUMENT ME!

getLiquidMoleFractions

public double[] getLiquidMoleFractions()
Returns the liquid mole fractions of the components.

Returns:
DOCUMENT ME!

setLiquidMoleFractions

public void setLiquidMoleFractions(double[] fractions)
Sets the liquid mole fractions of the components.

Parameters:
fractions - DOCUMENT ME!

calcBUBLP

public double calcBUBLP(double T)
Calculates the BUBL P at the given temperature.

Parameters:
T - DOCUMENT ME!
Returns:
DOCUMENT ME!

calcDEWP

public double calcDEWP(double T)
Calculates the DEW P at the given temperature.

Parameters:
T - DOCUMENT ME!
Returns:
DOCUMENT ME!

calcBUBLT

public double calcBUBLT(double P)
Calculates the BUBL T at the given pressure.

Parameters:
P - DOCUMENT ME!
Returns:
DOCUMENT ME!

calcDEWT

public double calcDEWT(double P)
Calculates the DEW T at the given pressure.

Parameters:
P - DOCUMENT ME!
Returns:
DOCUMENT ME!

calcFlashPoint

public double calcFlashPoint(double P,
                             double T)
                      throws VLEException
Calculates the flash point compositions at given P and T.

Parameters:
P - DOCUMENT ME!
T - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
VLEException - DOCUMENT ME!

getActivityCalculator

public static IActivityCalculator getActivityCalculator(int activityMethod)
Returns the instance of actual activity calculator class given the method ID.

Parameters:
activityMethod - DOCUMENT ME!
Returns:
DOCUMENT ME!

getFugacityCalculator

public static IFugacityCalculator getFugacityCalculator(int fugacityMethod)
Returns the instance of actual fugacity calculator class given the method ID.

Parameters:
fugacityMethod - DOCUMENT ME!
Returns:
DOCUMENT ME!