|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
chemEquilibria.ChemEquilibria
public class ChemEquilibria
This applet provides a web page interface for the edu.davidson.chm.equilibria package. All references to objects are based upon labels (String). The chemical species H+, OH-, and H2O are predefined for convenience.
Applet Parameters
| NAME | Variable Type | Default | Description |
|---|---|---|---|
| IsIdeal | boolean | true | If true, all activity coefficients are set to unity. If false, activity coefficients are calculated. |
| IsIsobaric | boolean | true | If true, the pressures of all phases are set to the system pressure. The volume of gas phases are adjusted to obtain the specified pressure. If false, the volume of all gas phases are fixed and their pressure may vary. |
| IsReady | String | JavaScript variable that will be set to true when applet has initialized. Must use MAYSCRIPT in APPLET tag to use this feature. | |
| Pressure | double | 1.000 | System pressure in atm. Significant only if isBaric is true. |
| Temperature | double | 298.15 | System temperature in Kelvin |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.BaselineResizeBehavior |
| Field Summary |
|---|
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
ChemEquilibria()
|
|
| Method Summary | |
|---|---|
void |
addAcidBaseSpecies(java.lang.String _baseLabel,
double _baseCharge,
double _baseFW,
int _n,
java.lang.String _solutionLabel,
double _moles)
Creates a series of acid-base species and adds the species to a solution. |
void |
addComplexes(java.lang.String _metalLabel,
double _metalCharge,
double _metalFW,
java.lang.String _ligandLabel,
double _ligandCharge,
double _ligandFW,
int _n,
java.lang.String _solutionLabel,
double _moles)
Creates a series of metal-ligand complexes and adds the species to a solution. |
void |
addDatum(double _Vt,
double _pX)
Adds a Vt, pX data point to the data set. |
void |
addDatum(double _Vt,
double _pX,
double _std)
Adds a Vt, pX data point to the data set. |
boolean |
addHalfReaction(java.lang.String _label,
java.lang.String _rxn,
double _Eo)
Creates a half-reaction and adds it to the chemical system. |
void |
addPar(java.lang.String _type,
java.lang.String _label,
java.lang.String _phaseLabel)
Adds a parameter to be optimized in the curve-fitting procedure. |
boolean |
addReaction(java.lang.String _label,
java.lang.String _rxn,
double _K)
Creates a chemical reaction and adds it to the chemical system. |
void |
addSpecies(java.lang.String _speciesLabel,
double _charge,
java.lang.String _phaseLabel,
double _moles)
Adds the specified amount of a ChemSpecies to a Phase. |
void |
addSpecies(java.lang.String _speciesLabel,
java.lang.String _phaseLabel,
double _moles)
Adds the specified amount of a ChemSpecies to a Phase. |
void |
apply()
Applies the best-fit parameters from the last curve-fitting procedure to the Reaction and Species objects. |
void |
calculate(double _finalVolume)
Calculates a theoretical titration curve |
void |
clear()
Clears the entire chemical system and resets the properties for a new calculation. |
void |
clearData()
Clears the data to be fit in the curve-fitting procedure. |
void |
clearParameters()
Clears the parameters to be optimized in the curve-fitting procedure. |
void |
createAqueousPhase(java.lang.String _solutionLabel,
double _volume)
Creates an aqueous solution phase. |
void |
createChemSpecies(java.lang.String _label,
double _charge,
double _fw)
Creates a new ChemSpecies. |
void |
createGasPhase(java.lang.String _gasLabel,
double _volume)
Creates a gas phase containing no species (i.e., a vacuum). |
void |
createLiquidPhase(java.lang.String _liquidLabel,
java.lang.String _speciesLabel,
double _moles)
Creates a liquid phase (pure substance). |
void |
createSolidPhase(java.lang.String _solidLabel,
java.lang.String _speciesLabel,
double _moles)
Creates a solid phase (pure substance). |
void |
createSolutionPhase(java.lang.String _solutionLabel,
java.lang.String _solventLabel,
double _volume)
Creates an aprotic solution phase. |
void |
createSolutionPhase(java.lang.String _solutionLabel,
java.lang.String _solventLabel,
double _Kauto,
double _volume)
Creates a protic solution phase. |
void |
createSolutionPhase(java.lang.String _solutionLabel,
java.lang.String _solventLabel,
java.lang.String _acidLabel,
java.lang.String _baseLabel,
double _Kauto,
double _volume)
Creates a protic solution phase. |
void |
createTitration(java.lang.String _titrantLabel,
java.lang.String _sampleLabel)
Create a Titration object using the current chemical system. |
void |
destroy()
|
boolean |
fit()
Performs the curve-fitting procedure for titration data. |
double |
getActivity(java.lang.String _speciesLabel,
java.lang.String _phaseLabel)
Returns the activity of the ChemSpecies in the Phase. |
double |
getAnalConc(java.lang.String _speciesLabel,
java.lang.String _phaseLabel)
Returns the analytical molar concentration of the ChemSpecies in the Phase. |
double |
getAnalMoles(java.lang.String _speciesLabel,
java.lang.String _phaseLabel)
Returns the analytical moles of the ChemSpecies in the Phase. |
java.lang.String |
getAppletInfo()
|
java.lang.String |
getChargeBalance(java.lang.String _phaseLabel)
Returns a string representing the charge balance equation for indicated phase. |
double |
getChiSq()
Returns the chi-square value for the last curve-fitting procedure. |
double |
getConc(java.lang.String _speciesLabel,
java.lang.String _phaseLabel)
Returns the molar concentration of the ChemSpecies in the Phase. |
double |
getDensity(java.lang.String _phaseLabel)
Returns the density (in grams/mL) of the Phase. |
double |
getDerivative(int _n)
Returns the derivative of an experimental titration curve at the _n-th point. |
double |
getDerivative2(int _n)
Returns the second derivative of an experimental titration curve at the _n-th point. |
double |
getGoodnessOfFit()
Returns the goodness-of-fit for the curve-fitting procedure. |
double |
getHalfReactionPotential(java.lang.String _rxnLabel)
Returns the potential in volts for the half-reaction. |
double |
getIonicStrength(java.lang.String _phaseLabel)
Returns the ionic strength of the phase in mole/L. |
double |
getK(java.lang.String _label)
Returns the equilibrium constant for the reaction at the reference temperature |
double |
getK(java.lang.String _label,
double _temperature)
Returns the equilibrium constant for the reaction at the indicated temperature |
double |
getMass(java.lang.String _speciesLabel,
java.lang.String _phaseLabel)
Returns the actual mass (in grams) of ChemSpecies in the Phase. |
java.lang.String |
getMassBalance(int idx)
Returns a string containing the mass balance equation |
java.lang.String[] |
getMessages()
Returns an array of strings containing messages from the last analysis of the chemical system using the parse method. |
double |
getMinValue()
Returns the minimum positive value for the moles of any species. |
double |
getMoles(java.lang.String _speciesLabel,
java.lang.String _phaseLabel)
Returns the actual moles of ChemSpecies in the Phase. |
int |
getNbrMassBalance()
Returns the number of mass balance equations for the system |
int |
getNbrParseMessages()
Returns the number of messages from the last parse operation |
int |
getNbrPoints()
Returns the number of points in the calculated titration curve |
double |
getPar(int _idx)
Returns the parameter with index _idx. |
java.lang.String |
getParameter(java.lang.String key,
java.lang.String def)
|
java.lang.String[][] |
getParameterInfo()
|
java.lang.String |
getParseMessage(int _n)
Returns message _n from the last analysis of the chemical system using the parse method. |
double |
getParStd(int _idx)
Returns the standard deviation of parameter with index _idx. |
double |
getpH(java.lang.String _phaseLabel)
Returns the pH of the phase. |
double |
getpK(java.lang.String _label)
Returns pK for the reaction at the reference temperature |
double |
getpK(java.lang.String _label,
double _temperature)
Returns pK for the reaction at the indicated temperature |
double |
getpOH(java.lang.String _phaseLabel)
Returns the pOH of the phase. |
double |
getPotential(java.lang.String _phaseLabel)
Returns the potential in volts for the indicated electrode. |
double |
getPotential(java.lang.String _phase1Label,
java.lang.String _phase2Label)
Returns the potential in volts for the indicated cell. |
double |
getPressure(java.lang.String _phaseLabel)
Returns the pressure (in atm) of the Phase. |
double |
getPressure(java.lang.String _speciesLabel,
java.lang.String _phaseLabel)
Returns the partial pressure (in atm) of the ChemSpecies in the Phase. |
double |
getStandardPotential(java.lang.String _label,
double _temperature)
Returns the standard potential for the half-reaction at the indicated temperature |
double |
getTemperature()
Returns the absolute temperature of the system. |
double |
getTitrationValue(int _index)
Gets the pX or E value in a calculated titration curve |
double |
getVolume(java.lang.String _phaseLabel)
Returns the actual volume (in liters) of the phase. |
double |
getVolumeTitrant(int _index)
Gets the volume (in mL) of titrant added in a calculated titration curve |
void |
init()
|
void |
loadLibrary(java.lang.String _url)
Creates all ChemSpecies defined in a library file. |
boolean |
parse()
Parses the chemical system to identify possible problems. |
void |
removeHalfReaction(java.lang.String _label)
Removes the half-reaction from the chemical system |
void |
removePhase(java.lang.String _label)
Removes the phase from the chemical system. |
void |
removeReaction(java.lang.String _label)
Removes the reaction from the chemical system |
void |
removeSpecies(java.lang.String _speciesLabel,
java.lang.String _phaseLabel)
Removes the species from the phase. |
void |
setAnalConc(java.lang.String _speciesLabel,
java.lang.String _phaseLabel,
double _conc)
Sets the analytical concentration (mole/L) of the ChemSpecies |
void |
setAnalMass(java.lang.String _speciesLabel,
java.lang.String _phaseLabel,
double _mass)
Sets the analytical mass (in grams) of the ChemSpecies in the Phase. |
void |
setAnalMoles(java.lang.String _speciesLabel,
java.lang.String _phaseLabel,
double _moles)
Sets the analytical moles of the ChemSpecies in the Phase. |
void |
setAnalPressure(java.lang.String _speciesLabel,
java.lang.String _phaseLabel,
double _pressure)
Sets the analytical partial pressure of the ChemSpecies in the Phase. |
void |
setAutoChargeBalance(java.lang.String _phaseLabel,
boolean _val)
Sets the autoChargeBalance property for the indicated phase. |
void |
setDensity(java.lang.String _phaseLabel,
double _density)
Sets the density (in grams/mL) of the Phase. |
void |
setDisplayFitIterations(boolean _displayIterations)
If true, the results of each iteration in the fit method are displayed on the Java console. |
void |
setDisplayFitResults(boolean _displayResults)
If true, the final results of the fit method are displayed on the Java console. |
void |
setDisplayIterations(boolean _displayIterations)
If true, the results of each iteration in the solve method are displayed on the Java console. |
void |
setDisplayLinearSystem(boolean _displayLinearSystem)
If true, the linear system of equations are displayed on the Java console at each iteration of the solve method. |
void |
setDisplayResults(boolean _displayResults)
If true, the final results of the solve method are displayed on the Java console. |
void |
setDisplayTime(boolean _displayTime)
If true, the time (in seconds) required to solve the equilibrium problem is displayed on the Java console (but only if the calculation was successful). |
void |
setEquationTolerance(double _eqnTol)
Sets the convergence tolerance for functions used in the solve method. |
void |
setFitChiSqTolerance(double _tol)
Sets the relative tolerance for the minimization of chi-square in the curve-fitting procedure. |
void |
setFitTolerance(double _tol)
Sets the relative tolerance for parameters (ln K or ln n) in the curve-fitting procedure. |
void |
setIonSize(java.lang.String _label,
double _ionSize)
Sets the ion-size parameter (used in the Extended Debye-Huckel Equation) for the chemical species. |
void |
setIsIdeal(boolean _isIdeal)
Sets the isIdeal property. |
void |
setIsIsobaric(boolean _isIsobaric)
Sets the isIsobaric property. |
void |
setK(java.lang.String _label,
double _K)
Sets the equilibrium constant for the reaction identified by the label. |
void |
setLambda(double _lambda)
Sets the initial value of lambda, which controls the transition from the steepest-descent to Hessian methods in the Levenberg-Marquardt algorithm. |
void |
setLambdaScaleFactor(double _factor)
Sets the lambda scaling factor. |
void |
setMaxCnt(int _maxCnt)
Sets the maximum number of iterations to be used in solving the nonlinear system of equations in the solve method. |
void |
setMaxInc(double _maxInc)
Sets the maximum amount a variable can change during a single iteration in the solve method. |
void |
setMonitor(java.lang.String _chemSpecies)
Sets the species whose pX value is monitored during a titration |
void |
setMonitor(java.lang.String _label,
java.lang.String _refLabel)
Sets the electrodes whose potential is monitored during a titration. |
void |
setPressure(double _pressure)
Sets the pressure (in atm) of the system. |
void |
setReferenceTemperature(double _temperature)
Sets the reference potential for all reactions and half-reaction. |
void |
setReferenceTemperature(java.lang.String _label,
double _temperature)
Sets the reference potential for a reaction or half-reaction. |
void |
setStandardDeviation(double _std)
Sets the standard deviation for pX values for the curve-fitting procedure. |
void |
setSVDThreshold(double _svdThreshold)
Sets the threshold value in the solve method for setting the diagonal elements from svd to zero. |
void |
setTargetIncrement(double _target)
Sets the target change for pX or E in a titration. |
void |
setTemperature(double _temperature)
Sets the temperature (in Kelvin) of the system. |
void |
setTemperatureDependence(java.lang.String _rxnLabel,
double _a,
double _b)
Sets the parameters controlling the temperature-dependence of the equilibrium constant for a reaction. |
void |
setTemperatureDependence(java.lang.String _rxnLabel,
double _a,
double _b,
double _c)
Sets the parameters used to determine the temperature-dependence of the standard potential for a half-reaction. |
void |
setTolerance(double _tol)
Sets the relative tolerance in the solve method for convergence of the amounts of each species. |
void |
setUsePrevious(boolean _usePrevious)
Sets the usePrevious property for the solve method. |
void |
setVolume(java.lang.String _phaseLabel,
double _volume)
Sets the volume (in liters) of the phase |
boolean |
solve()
Solves the equilibrium problem. |
void |
start()
|
void |
stop()
|
void |
transferSolution(java.lang.String _solution1,
java.lang.String _solution2,
double _volume)
Transfers a volume of Solution 1 to Solution 2. |
| Methods inherited from class java.applet.Applet |
|---|
getAccessibleContext, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus |
| Methods inherited from class java.awt.Panel |
|---|
addNotify |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ChemEquilibria()
| Method Detail |
|---|
public int getNbrMassBalance()
public int getNbrParseMessages()
public int getNbrPoints()
public double getPar(int _idx)
public double getParStd(int _idx)
public java.lang.String getParameter(java.lang.String key,
java.lang.String def)
public void init()
init in class java.applet.Appletpublic void start()
start in class java.applet.Appletpublic void stop()
stop in class java.applet.Appletpublic void destroy()
destroy in class java.applet.Appletpublic java.lang.String getAppletInfo()
getAppletInfo in class java.applet.Appletpublic java.lang.String[][] getParameterInfo()
getParameterInfo in class java.applet.Applet
public void addAcidBaseSpecies(java.lang.String _baseLabel,
double _baseCharge,
double _baseFW,
int _n,
java.lang.String _solutionLabel,
double _moles)
The _baseLabel is the label for the fully deprotonated base, and the _baseCharge is the charge on the fully deprotonated base. If _baseLabel = "base", _charge = -1, and _n = 3, four chemical species are created with labels "base-1", "Hbase", "H2base+1", and "H3base+2".
The method searches for pre-existing chemical species with the same label. If such a chemical species is found, the pre-existing chemical species is used.
_solutionLabel - label identifying the solution phase_moles - analytical moles of each chemical species to be added_baseLabel - label for the fully deprotonated base_baseCharge - charge on the fully deprotonated base_baseFW - formula weight of the fully deprotonated base_n - number of acidic protons on fully protonated acidsetAnalConc(java.lang.String, java.lang.String, double),
setAnalMoles(java.lang.String, java.lang.String, double),
addSpecies(java.lang.String, java.lang.String, double)
public void addComplexes(java.lang.String _metalLabel,
double _metalCharge,
double _metalFW,
java.lang.String _ligandLabel,
double _ligandCharge,
double _ligandFW,
int _n,
java.lang.String _solutionLabel,
double _moles)
If _metalLabel = "Cu", _metalCharge = +1, _ligandLabel = "L", _ligandCharge = -1, and _n = 4, six chemical species are created with labels "L-", "Cu+2", "CuL-", "Cu(L)2", "Cu(L)3-", and "Cu(L)4-2".
The method searches for pre-existing chemical species with the same label. If such a chemical species is found, the pre-existing chemical species is used.
_solutionLabel - label identifying the solution phase_moles - analytical moles of each chemical species to be added_metalLabel - label for the free metal_metalCharge - charge on the free metal_metalFW - formula weight of the free metal_ligandLabel - label for the free ligand_ligandCharge - charge on the free ligand_ligandFW - formula weight of the free ligand_n - number of ligands on the fully complexed metalsetAnalConc(java.lang.String, java.lang.String, double),
setAnalMoles(java.lang.String, java.lang.String, double),
addSpecies(java.lang.String, java.lang.String, double)
public void addDatum(double _Vt,
double _pX)
public void addDatum(double _Vt,
double _pX,
double _std)
public boolean addHalfReaction(java.lang.String _label,
java.lang.String _rxn,
double _Eo)
Ni+2 (aq) + 2 e- (Pt) = Ni (s)
The syntax rules are the same as those describe for the addReaction method, with the following additional considerations:
The standard potential is the value at the reference temperature. The program automatically adjusts this value for other temperatures using the standard entropy of reaction. By default the standard entropy of reaction is zero, which makes the standard potential independent of temperature.
_label - descriptive label used to identify the reaction_rxn - string representation of the reaction_Eo - standard potential in volts at the reference temperature
addReaction(java.lang.String, java.lang.String, double),
setTemperatureDependence(java.lang.String, double, double)
public void addPar(java.lang.String _type,
java.lang.String _label,
java.lang.String _phaseLabel)
_type = 'R' indicates a Reaction and _label is the label for the Reaction. The curve-fitting procedure optimizes the equilibrium constant for the Reaction. The _phaseLabel is not used, but a dummy value must be provided.
_type = 'S' indicates a Species (or ChemSpecies) in either the titrant or sample solution. The curve-fitting procedure optimizes the analytical moles of this species. The _label is the Species or ChemSpecies label and the _phaseLabel is the label for the phase containing the Species.
public boolean addReaction(java.lang.String _label,
java.lang.String _rxn,
double _K)
Ni+2 (aq) + 4 CN- (aq) = Ni(CN)4-2 (aq)
The following syntax rules apply:
The thermodynamic equilibrium constant is the value at reference temperature. The program automatically adjusts this value for other temperatures using the standard enthalpy of reaction and standard heat capacity change for the reaction. By default these values are zero, which makes the equilibrium constant independent of temperature.
_label - descriptive label used to identify the reaction_rxn - string representation of the reaction_K - thermodynamic equilibrium constant at reference temperature
setTemperatureDependence(java.lang.String, double, double)
public void addSpecies(java.lang.String _speciesLabel,
java.lang.String _phaseLabel,
double _moles)
_phaseLabel - label identifying the phase_speciesLabel - label identifying the species_moles - moles of the species to be addedcreateSolidPhase(java.lang.String, java.lang.String, double),
createSolutionPhase(java.lang.String, java.lang.String, double),
createGasPhase(java.lang.String, double),
createLiquidPhase(java.lang.String, java.lang.String, double),
createAqueousPhase(java.lang.String, double),
createChemSpecies(java.lang.String, double, double)
public void addSpecies(java.lang.String _speciesLabel,
double _charge,
java.lang.String _phaseLabel,
double _moles)
If a new ChemSpecies is created, the formula weight is set to 100.0
_phaseLabel - label identifying the phase_charge - charge on the ChemSpecies_speciesLabel - label identifying the species_moles - moles of the species to be addedcreateSolidPhase(java.lang.String, java.lang.String, double),
createSolutionPhase(java.lang.String, java.lang.String, double),
createGasPhase(java.lang.String, double),
createLiquidPhase(java.lang.String, java.lang.String, double),
createAqueousPhase(java.lang.String, double),
createChemSpecies(java.lang.String, double, double)public void apply()
public void calculate(double _finalVolume)
_finalVolume - final volume (in mL) of titrant to be addedcreateTitration(java.lang.String, java.lang.String)public void clear()
public void clearData()
public void clearParameters()
public void createAqueousPhase(java.lang.String _solutionLabel,
double _volume)
_solutionLabel - descriptive label for the solution phase_volume - volume in liters of the solutioncreateChemSpecies(java.lang.String, double, double)
public void createChemSpecies(java.lang.String _label,
double _charge,
double _fw)
_label - descriptive label used to identify the chemical species_charge - species charge_fw - species formula weight (g/mole)
public void createGasPhase(java.lang.String _gasLabel,
double _volume)
_gasLabel - descriptive label used to identify the gas_volume - volume of the phase (a fixed value if isIsobaric is false)createChemSpecies(java.lang.String, double, double)
public void createLiquidPhase(java.lang.String _liquidLabel,
java.lang.String _speciesLabel,
double _moles)
_liquidLabel - descriptive label used to identify the phase_speciesLabel - label of the ChemSpecies making up the liquid_moles - analytical moles of liquid to be formedcreateChemSpecies(java.lang.String, double, double)
public void createSolidPhase(java.lang.String _solidLabel,
java.lang.String _speciesLabel,
double _moles)
_solidLabel - descriptive label used to identify the phase_speciesLabel - label of the ChemSpecies making up the solid_moles - analytical moles of solid to be formedcreateChemSpecies(java.lang.String, double, double)
public void createSolutionPhase(java.lang.String _solutionLabel,
java.lang.String _solventLabel,
double _volume)
_solutionLabel - descriptive label for the solution phase_solventLabel - label identifying the solvent species_volume - volume in liters of the solutioncreateChemSpecies(java.lang.String, double, double)
public void createSolutionPhase(java.lang.String _solutionLabel,
java.lang.String _solventLabel,
double _Kauto,
double _volume)
_solutionLabel - descriptive label for the solution phase_solventLabel - label identifying the solvent species_volume - volume in liters of the solution_Kauto - autodissociation constant for the solventcreateChemSpecies(java.lang.String, double, double)
public void createSolutionPhase(java.lang.String _solutionLabel,
java.lang.String _solventLabel,
java.lang.String _acidLabel,
java.lang.String _baseLabel,
double _Kauto,
double _volume)
_solutionLabel - descriptive label for the solution phase_solventLabel - label identifying the solvent species_acidLabel - label identifying the solvent conjugate acid species_baseLabel - label identifying the solvent conjugate base species_volume - volume in liters of the solution_Kauto - autodissociation constant for the solventcreateChemSpecies(java.lang.String, double, double)
public void createTitration(java.lang.String _titrantLabel,
java.lang.String _sampleLabel)
public boolean fit()
addDatum(double, double),
addPar(java.lang.String, java.lang.String, java.lang.String),
clearData(),
clearParameters(),
createTitration(java.lang.String, java.lang.String),
setStandardDeviation(double)
public double getActivity(java.lang.String _speciesLabel,
java.lang.String _phaseLabel)
_phaseLabel - label identifying the phase_speciesLabel - label identifying the speciessolve()
public double getAnalMoles(java.lang.String _speciesLabel,
java.lang.String _phaseLabel)
_phaseLabel - label identifying the phase_speciesLabel - label identifying the species
public double getAnalConc(java.lang.String _speciesLabel,
java.lang.String _phaseLabel)
_phaseLabel - label identifying the phase_speciesLabel - label identifying the speciespublic java.lang.String getChargeBalance(java.lang.String _phaseLabel)
public double getChiSq()
public double getConc(java.lang.String _speciesLabel,
java.lang.String _phaseLabel)
_phaseLabel - label identifying the phase_speciesLabel - label identifying the speciessolve()public double getDensity(java.lang.String _phaseLabel)
_phaseLabel - label identifying the phasesolve()public double getDerivative(int _n)
public double getDerivative2(int _n)
public double getGoodnessOfFit()
public double getHalfReactionPotential(java.lang.String _rxnLabel)
_rxnLabel - label identifying the half-reactionaddHalfReaction(java.lang.String, java.lang.String, double),
solve()public double getIonicStrength(java.lang.String _phaseLabel)
_phaseLabel - label identifying the phasesolve()public double getK(java.lang.String _label)
public double getK(java.lang.String _label,
double _temperature)
public double getMass(java.lang.String _speciesLabel,
java.lang.String _phaseLabel)
_phaseLabel - label identifying the phase_speciesLabel - label identifying the speciessolve()public java.lang.String getMassBalance(int idx)
idx - number of the mass balance equationpublic double getMinValue()
public double getMoles(java.lang.String _speciesLabel,
java.lang.String _phaseLabel)
_phaseLabel - label identifying the phase_speciesLabel - label identifying the speciessolve()public java.lang.String getParseMessage(int _n)
parse()public java.lang.String[] getMessages()
parse()public double getPotential(java.lang.String _phaseLabel)
_phaseLabel - label identifying the electrode phasesolve()public double getpH(java.lang.String _phaseLabel)
_phaseLabel - label identifying the phasesolve()public double getpK(java.lang.String _label)
public double getpK(java.lang.String _label,
double _temperature)
public double getpOH(java.lang.String _phaseLabel)
solve()
public double getPotential(java.lang.String _phase1Label,
java.lang.String _phase2Label)
_phase1Label - label identifying the electrode1 phase_phase2Label - label identifying the electrode2 phasesolve()public double getPressure(java.lang.String _phaseLabel)
_phaseLabel - label identifying the phasesolve()
public double getPressure(java.lang.String _speciesLabel,
java.lang.String _phaseLabel)
_phaseLabel - label identifying the phase_speciesLabel - label identifying the speciessolve()
public double getStandardPotential(java.lang.String _label,
double _temperature)
public double getTemperature()
public double getTitrationValue(int _index)
public double getVolume(java.lang.String _phaseLabel)
_phaseLabel - label identifying the phasesolve()public double getVolumeTitrant(int _index)
public void loadLibrary(java.lang.String _url)
The library file is a text (ASCII) file in which each line describes the properties of a single ChemSpecies. The syntax is
label, charge, formula weight[, ion-size parameter];
All information after the ; is disregarded, and all spaces are disregarded.
_url - URL for the librarypublic boolean parse()
solve()public void removeHalfReaction(java.lang.String _label)
_label - label identifying the half-reactionpublic void removePhase(java.lang.String _label)
_label - label identifying the phasepublic void removeReaction(java.lang.String _label)
_label - label identifying the reaction
public void removeSpecies(java.lang.String _speciesLabel,
java.lang.String _phaseLabel)
_phaseLabel - label identifying the phase_speciesLabel - label identifying the species
public void setAnalConc(java.lang.String _speciesLabel,
java.lang.String _phaseLabel,
double _conc)
_phaseLabel - label identifying the phase, which must be a solution_speciesLabel - label identifying the chemical species_conc - analytical concentration of species in solution in mole/L
public void setAnalMass(java.lang.String _speciesLabel,
java.lang.String _phaseLabel,
double _mass)
_phaseLabel - label identifying the phase_speciesLabel - label identifying the species_mass - analytical mass in grams of species in phase
public void setAnalMoles(java.lang.String _speciesLabel,
java.lang.String _phaseLabel,
double _moles)
_phaseLabel - label identifying the phase_speciesLabel - label identifying the species_moles - analytical moles of species in phase
public void setAnalPressure(java.lang.String _speciesLabel,
java.lang.String _phaseLabel,
double _pressure)
_phaseLabel - label identifying the phase_speciesLabel - label identifying the species_pressure - analytical partial pressure of species in phase
public void setAutoChargeBalance(java.lang.String _phaseLabel,
boolean _val)
_phaseLabel - label identifying the phase
public void setDensity(java.lang.String _phaseLabel,
double _density)
_phaseLabel - label identifying the phase_density - density in grams/mL of the phasepublic void setDisplayFitIterations(boolean _displayIterations)
fit(),
createTitration(java.lang.String, java.lang.String)public void setDisplayFitResults(boolean _displayResults)
fit(),
createTitration(java.lang.String, java.lang.String)public void setDisplayIterations(boolean _displayIterations)
solve()public void setDisplayLinearSystem(boolean _displayLinearSystem)
solve()public void setDisplayResults(boolean _displayResults)
solve()public void setDisplayTime(boolean _displayTime)
public void setEquationTolerance(double _eqnTol)
solve()public void setFitChiSqTolerance(double _tol)
public void setFitTolerance(double _tol)
public void setIonSize(java.lang.String _label,
double _ionSize)
_label - label of the chemical species_ionSize - ion-size parameter in angstromspublic void setIsIdeal(boolean _isIdeal)
public void setIsIsobaric(boolean _isIsobaric)
public void setK(java.lang.String _label,
double _K)
public void setLambda(double _lambda)
public void setLambdaScaleFactor(double _factor)
public void setMaxCnt(int _maxCnt)
solve()public void setMaxInc(double _maxInc)
solve()public void setMonitor(java.lang.String _chemSpecies)
_chemSpecies - label identifying the chemical species
public void setMonitor(java.lang.String _label,
java.lang.String _refLabel)
public void setPressure(double _pressure)
public void setReferenceTemperature(double _temperature)
public void setReferenceTemperature(java.lang.String _label,
double _temperature)
public void setStandardDeviation(double _std)
public void setSVDThreshold(double _svdThreshold)
solve()public void setTargetIncrement(double _target)
public void setTemperature(double _temperature)
public void setTemperatureDependence(java.lang.String _rxnLabel,
double _a,
double _b)
ln[K(T)/K] = a(1/T - 1/Tref) + b ln[T/Tref]
Tref is the reference potential
By default, a = b = 0, which produces a temperature-independent equilibrium constant.
_rxnLabel - label identifying the reactionaddReaction(java.lang.String, java.lang.String, double)
public void setTemperatureDependence(java.lang.String _rxnLabel,
double _a,
double _b,
double _c)
E = Er + t (a + t ( b + t c))
where E is the standard potential at temperature T, Er is the standard potential at the reference temperature (Tref), t = T - Tref, and a, b, and c are the parameters set by this method.
_rxnLabel - label identifying the reactionaddHalfReaction(java.lang.String, java.lang.String, double)public void setTolerance(double _tol)
solve()public void setUsePrevious(boolean _usePrevious)
solve()
public void setVolume(java.lang.String _phaseLabel,
double _volume)
public boolean solve()
public void transferSolution(java.lang.String _solution1,
java.lang.String _solution2,
double _volume)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||