|
Equilibria |
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--edu.davidson.chm.equilibria.Equilibria
Sets up the mathematical description of a arbitrary equilibrium problems
Copyright (c) David N. Blauch
| Fields inherited from interface edu.davidson.chm.equilibria.PhysicalConstants |
F,
k,
No,
perm,
qe,
R,
RJ |
| Constructor Summary | |
Equilibria()
|
|
Equilibria(ChemSystem _chemSystem)
This constructor defines the chemical system. |
|
| Method Summary | |
void |
clearMessages()
Clears the message list |
protected boolean |
createEquations()
Constructs the mass balance, charge-balance, and equilibrium equations for this chemical system. |
java.lang.String |
getChargeBalance(Phase _soln)
Returns a string representing the charge balance relation for the phase. |
java.lang.String |
getInfo()
Returns information about this class |
java.lang.String[] |
getMassBalance()
Returns an array of strings representing the mass balance relations for the chemical system. |
java.lang.String[] |
getMessages()
Returns the last set of messages generated by the parse method. |
double |
getMinValue()
Returns the minimum positive value for the moles of any species. |
int |
getNbrMassBalance()
Returns the number of mass balance equations for the system |
double |
getTolerance()
Returns the tolerance for convergence of variables |
boolean |
parse()
Parses a chemical system to determine if it a solution exists. |
void |
printMessages()
Prints parse messages on the Java console. |
void |
setChemicalSystem(ChemSystem _chemSystem)
Sets the chemical system |
void |
setDisplayIterations(boolean _displayIterations)
If true, the results of each iteration in the solve() method are displayed. |
void |
setDisplayLinearSystem(boolean _displayLinearSystem)
If true, the linear system of equations are displayed at each iteration of the solve method. |
void |
setDisplayResults(boolean _displayResults)
If true, the final results of the solve method are displayed. |
void |
setDisplayTime(boolean _displayTime)
If true, the time in seconds required to solve an equilibrium problem via the solveProblem method is displayed on the Java console. |
void |
setEquationTolerance(double _eqnTol)
Sets the convergence tolerance for functions. |
void |
setMaxCnt(int _maxCnt)
Sets the maximum number of iterations to be used in solving the nonlinear system of equations. |
void |
setMaxInc(double _maxInc)
Sets the maximum amount a variable can change during a single iteration. |
void |
setRedundantTolerance(double _tol)
Sets the tolerance for aborting analysis when redundant chemical equations are encountered. |
void |
setSVDThreshold(double _svdThreshold)
Sets the threshold value for setting the diagonal elements from svd to zero. |
void |
setTolerance(double _tol)
Sets the relative tolerance for convergence of the amounts of each species |
void |
setUsePrevious(boolean _usePrevious)
Sets the usePrevious property. |
protected boolean |
solve()
Solves the mathematical problem and automatically updates number of moles for all species. |
boolean |
solveProblem()
Solves the equilibrium problem. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public Equilibria()
public Equilibria(ChemSystem _chemSystem)
| Method Detail |
public boolean parse()
public java.lang.String getInfo()
public void clearMessages()
public java.lang.String getChargeBalance(Phase _soln)
public java.lang.String[] getMassBalance()
public java.lang.String[] getMessages()
public double getMinValue()
public int getNbrMassBalance()
public double getTolerance()
getTolerance()public void printMessages()
public void setChemicalSystem(ChemSystem _chemSystem)
public void setDisplayIterations(boolean _displayIterations)
public void setDisplayLinearSystem(boolean _displayLinearSystem)
The condition number for the Jacobian is also displayed for each iteration. The numbers in brackets indicate the index of the element with the smallest diagonal element and the value of that element.
public void setDisplayResults(boolean _displayResults)
public void setDisplayTime(boolean _displayTime)
solveProblem()public void setEquationTolerance(double _eqnTol)
public void setMaxCnt(int _maxCnt)
public void setMaxInc(double _maxInc)
public void setRedundantTolerance(double _tol)
public void setSVDThreshold(double _svdThreshold)
public void setTolerance(double _tol)
public void setUsePrevious(boolean _usePrevious)
public boolean solveProblem()
protected boolean createEquations()
protected boolean solve()
|
Equilibria |
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||