ENKI

Solution Phase Protocolยถ

\({a_i}\) = activity of the ith endmember component
\({n_j}\) = moles of the jth endmember component
G = Gibbs free energy
S = entropy
G = volume
\({C_P}\) = isobaric heat capacity

๐Ÿ”น By default all thermodynamic quantities are calculated to include endmember properties (yesForMixing = NO). Calling this function with YES as an argument converts output to mixing quantities.

-(void)setResultsToMixingQuantities:(BOOL)yesForMixing

๐Ÿ”น Retrieves the number of endmember components in the system

-(NSUInteger)numberOfSolutionComponents

๐Ÿ”น Retrieves superclass instance of PhaseBase object for component at specified index

-(id)componentAtIndex:(NSUInteger)index

๐Ÿ”น Moles of endmember components => validity of input values

-(BOOL)testPermissibleValuesOfComponents:(double *)m

๐Ÿ”น Moles of elements (standard order) => Moles of end member components of the phase

-(DoubleVector )convertElementsToMoles:(double *)e

๐Ÿ”น Moles of elements (standard order) => Total moles of end member components of the phase

-(double)convertElementsToTotalMoles:(double )e

๐Ÿ”น Moles of elements (standard order) => Total mass of the phase (g)

-(double)convertElementsToTotalMass:(double *)e

๐Ÿ”น Moles of endmember components => Mole fractions of endmember components

-(DoubleVector )convertMolesToMoleFractions:(double *)m

๐Ÿ”น Moles of endmember components => Moles of elements (standard order)

-(DoubleVector )convertMolesToElements:(double )m

๐Ÿ”น Moles of endmember components => Molar sum

-(double)totalMolesFromMolesOfComponents:(double *)m

๐Ÿ”น Moles of components, T (K), P (bars) => activities of endmember components

-(DoubleVector )getActivityFromMolesOfComponents:(double *)m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => chemical potentials of endmember components (J)

-(DoubleVector )getChemicalPotentialFromMolesOfComponents:(double )m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => \(\frac{{\partial G}}{{\partial {n_i}}}\)

-(DoubleMatrix )getDaDmFromMolesOfComponents:(double )m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => Gibbs free energy (J)

-(double)getGibbsFreeEnergyFromMolesOfComponents:(double )m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => \(\frac{{\partial G}}{{\partial {n_i}}}\) (J)

-(DoubleVector )getDgDmFromMolesOfComponents:(double )m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => \(\frac{{{\partial ^2}G}}{{\partial {n_i}\partial {n_j}}}\) (J)

-(DoubleMatrix )getD2gDm2FromMolesOfComponents:(double )m andT:(double)t andP:(double)p

๐Ÿ”นMoles of components, T (K), P (bars) => \(\frac{{{\partial ^3}G}}{{\partial {n_i}\partial {n_j}\partial {n_k}}}\) (J)

-(DoubleTensor )getD3gDm3FromMolesOfComponents:(double )m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => enthalpy (J)

-(double)getEnthalpyFromMolesOfComponents:(double *)m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => entropy (J/K)

-(double)getEntropyFromMolesOfComponents:(double )m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => \(\frac{{\partial S}}{{\partial {n_i}}}\) (J/K)

-(DoubleVector )getDsDmFromMolesOfComponents:(double )m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => \(\frac{{{\partial ^2}S}}{{\partial {n_i}\partial {n_j}}}\) (J/K)

-(DoubleMatrix )getD2sDm2FromMolesOfComponents:(double )m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => isobaric heat capacity (J/K)

-(double)getHeatCapacityFromMolesOfComponents:(double )m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => \(\frac{{\partial {C_P}}}{{\partial T}}\) (J/K2)

-(double)getDcpDtFromMolesOfComponents:(double )m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => \(\frac{{\partial {C_P}}}{{\partial {n_i}}}\) (J/K)

-(DoubleVector )getDCpDmFromMolesOfComponents:(double *)m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => volume (J/bar)

-(double)getVolumeFromMolesOfComponents:(double )m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => \(\frac{{\partial V}}{{\partial {n_i}}}\) (J/bar)

-(DoubleVector )getDvDmFromMolesOfComponents:(double *)m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => \(\frac{{{\partial ^2}V}}{{\partial {n_i}\partial {n_j}}}\) (J/bar)

-(DoubleMatrix )getD2vDm2FromMolesOfComponents:(double )m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => \(\frac{{\partial V}}{{\partial T}}\)

-(double)getDvDtFromMolesOfComponents:(double )m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => \(\frac{{\partial V}}{{\partial P}}\) (J/bar2)

-(double)getDvDpFromMolesOfComponents:(double )m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => \(\frac{{{\partial ^2}V}}{{\partial {T^2}}}\) (J/bar-K2)

-(double)getD2vDt2FromMolesOfComponents:(double )m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => \(\frac{{{\partial ^2}V}}{{\partial T\partial P}}\) (J/bar2-K)

-(double)getD2vDtDpFromMolesOfComponents:(double )m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => \(\frac{{{\partial ^2}V}}{{\partial {P^2}}}\) (J/bar3)

-(double)getD2vDp2FromMolesOfComponents:(double )m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => \(\frac{{\partial V}}{{\partial {n_i}\partial T}}\) (J/bar-K)

-(DoubleVector )getD2vDmDtFromMolesOfComponents:(double )m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => \(\frac{{\partial V}}{{\partial {n_i}\partial P}}\) (J/bar2)

-(DoubleVector )getD2vDmDpFromMolesOfComponents:(double *)m andT:(double)t andP:(double)p

๐Ÿ”น Moles of components, T (K), P (bars) => formulae as an NSString object

-(NSString )getFormulaFromMolesOfComponents:(double )m andT:(double)t andP:(double)p

๐Ÿ”น Retrieves the number of species (dependent endmembers with positive mole fractions) in the soluton

-(NSUInteger)numberOfSolutionSpecies

๐Ÿ”น Retrieves the name of the solution species at the specified index

-(NSString )nameOfSolutionSpeciesAtIndex:(NSUInteger)index

๐Ÿ”น Moles of solution species => moles of endmember components

-(DoubleVector )convertMolesOfSpeciesToMolesOfComponents:(double )mSpecies

๐Ÿ”น Retrieves an elemental stoichiometry vector for the species at the specified index

-(DoubleVector )elementalCompositionOfSpeciesAtIndex:(NSUInteger)index

๐Ÿ”น Moles of components, T (K), P (bars) => chemical potentials of solution species (J)

-(DoubleVector )chemicalPotentialsOfSpeciesFromMolesOfComponents:(double )m andT:(double)t andP:(double)p

๐Ÿ”น Chemical potentials of endmembers, T (K), P (bars) => chemical affinity and composition of the phase, etc.

@param chemicalPotentials
Chemical potentials of endmember components in the solution. A zero entry indicates that a component is absent.

@param t
temperature in K

@param p
pressure in bars

@return
NSArray output structure:
- (0): NSNumber object wrapping a double - chemical affinity
- (1โ€ฆNA): NSnumber object wrapping a double - X[0] - X[NA-1], mole fraction compositional variables
- (NA+1): NSNumber object wapping a BOOL - convergence flag
- (NA+2): NSNumber object wrapping an NSUInteger - iteration count
- (NA+3): NSNumber object wrapping a double - number of atoms in formula unit to scale affinity
- (NA+4): NSNumber object wrapping a double - approximate error in calculated affinity

-(NSArray )affinityAndCompositionFromLiquidChemicalPotentialSum:(double *)chemicalPotentials andT:(double)t andP:(double)p

๐Ÿ”น

-(void)incrementInstanceCountOfPhase

๐Ÿ”น

-(void)decrementInstanceCountOfPhase

๐Ÿ”น

-(NSString *)nameOfPhaseWithComposition:(double *)refMoles

๐Ÿ”น

-(NSDictionary *)checkForAndDetermineCompositionOfCoexistingImmisciblePhase:(double *)refMoles andT:(double)t andP:(double)p