Class GibbsReactor.GibbsComponent
java.lang.Object
neqsim.process.equipment.reactor.GibbsReactor.GibbsComponent
- Enclosing class:
GibbsReactor
Inner class representing a component in the Gibbs reaction database.
Each GibbsComponent stores thermodynamic properties needed for Gibbs energy calculations:
- Elemental composition (O, N, C, H, S, Ar, Z)
- Heat capacity polynomial coefficients (A, B, C, D)
- Standard formation properties at 298.15 K (ΔHf°, ΔGf°, ΔSf°)
- Optional polynomial coefficients for direct Gibbs/enthalpy calculations
- Version:
- $Id: $Id
- Author:
- Sviatoslav Eroshkin
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate double[]private double[]private String -
Constructor Summary
ConstructorsConstructorDescriptionGibbsComponent(String molecule, double[] elements, double[] heatCapacityCoeffs, double deltaHf298, double deltaGf298, double deltaSf298, double coeffAg, double coeffBg, double coeffCg, double coeffDg, double coeffEg, double coeffFg, double coeffAh, double coeffBh, double coeffCh, double coeffDh, double coeffEh, double coeffGh) Constructs a GibbsComponent. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]calculateCorrectedHeatCapacityCoeffs(int compNumber) Calculate corrected heat capacity coefficients dA, dB, dC, dD by subtracting elemental contributions. dA = A - nO*AO - nN*AN - nC*AC - nH*AH - nS*ASdoublecalculateEnthalpy(double temperature, int compNumber) Calculates enthalpy for a component.doublecalculateEntropy(double temperature, int compNumber) Calculates entropy for a component.doublecalculateGibbsEnergy(double temperature, int compNumber) Calculates Gibbs energy for a component.doublecalculateHeatCapacity(double temperature, int compNumber) Calculates heat capacity for a component.doublecalculateI(int compNumber) Calculate the I term for thermodynamic calculations.doublecalculateJ(int compNumber) Calculate the corrected formation enthalpy term J.doubledoubledoubleGet the entropy of formation at 298K (deltaSf298) in J/(mol·K).double[]double[]
-
Field Details
-
molecule
-
elements
private double[] elements -
heatCapacityCoeffs
private double[] heatCapacityCoeffs -
deltaHf298
private double deltaHf298 -
deltaGf298
private double deltaGf298 -
deltaSf298
private double deltaSf298 -
coeffAg
private double coeffAg -
coeffBg
private double coeffBg -
coeffCg
private double coeffCg -
coeffDg
private double coeffDg -
coeffEg
private double coeffEg -
coeffFg
private double coeffFg -
coeffAh
private double coeffAh -
coeffBh
private double coeffBh -
coeffCh
private double coeffCh -
coeffDh
private double coeffDh -
coeffEh
private double coeffEh -
coeffGh
private double coeffGh
-
-
Constructor Details
-
GibbsComponent
public GibbsComponent(String molecule, double[] elements, double[] heatCapacityCoeffs, double deltaHf298, double deltaGf298, double deltaSf298, double coeffAg, double coeffBg, double coeffCg, double coeffDg, double coeffEg, double coeffFg, double coeffAh, double coeffBh, double coeffCh, double coeffDh, double coeffEh, double coeffGh) Constructs a GibbsComponent.- Parameters:
molecule- the molecule nameelements- array of element countsheatCapacityCoeffs- array of heat capacity coefficientsdeltaHf298- standard enthalpy of formation at 298 KdeltaGf298- standard Gibbs energy of formation at 298 KdeltaSf298- standard entropy at 298 KcoeffAg- coefficient Ag for Gibbs calculationscoeffBg- coefficient Bg for Gibbs calculationscoeffCg- coefficient Cg for Gibbs calculationscoeffDg- coefficient Dg for Gibbs calculationscoeffEg- coefficient Eg for Gibbs calculationscoeffFg- coefficient Fg for Gibbs calculationscoeffAh- coefficient Ah for Gibbs calculationscoeffBh- coefficient Bh for Gibbs calculationscoeffCh- coefficient Ch for Gibbs calculationscoeffDh- coefficient Dh for Gibbs calculationscoeffEh- coefficient Eh for Gibbs calculationscoeffGh- coefficient Gh for Gibbs calculations
-
-
Method Details
-
getDeltaSf298
public double getDeltaSf298()Get the entropy of formation at 298K (deltaSf298) in J/(mol·K).- Returns:
- Entropy of formation at 298K
-
getMolecule
-
getElements
public double[] getElements() -
getHeatCapacityCoeffs
public double[] getHeatCapacityCoeffs() -
getDeltaHf298
public double getDeltaHf298() -
getDeltaGf298
public double getDeltaGf298() -
calculateGibbsEnergy
public double calculateGibbsEnergy(double temperature, int compNumber) Calculates Gibbs energy for a component.- Parameters:
temperature- temperature in KcompNumber- component index- Returns:
- Gibbs energy
-
calculateCorrectedHeatCapacityCoeffs
public double[] calculateCorrectedHeatCapacityCoeffs(int compNumber) Calculate corrected heat capacity coefficients dA, dB, dC, dD by subtracting elemental contributions. dA = A - nO*AO - nN*AN - nC*AC - nH*AH - nS*AS- Parameters:
compNumber- component index- Returns:
- array of corrected coefficients [dA, dB, dC, dD]
-
calculateJ
public double calculateJ(int compNumber) Calculate the corrected formation enthalpy term J. J = ΔH°f - ΔA*TR - ΔB/2*TR² - ΔC/3*TR³ - ΔD/4*TR⁴ where TR is the reference temperature and ΔA, ΔB, ΔC, ΔD are corrected heat capacity coefficients.- Parameters:
compNumber- component index- Returns:
- corrected formation enthalpy term J
-
calculateI
public double calculateI(int compNumber) Calculate the I term for thermodynamic calculations. I = (1/R) × [J/TR + ΔA×ln(TR) + ΔB/2×TR + ΔC/6×TR² + ΔD/12×TR³] where R is the gas constant, TR is the reference temperature, and J is the corrected formation enthalpy term.- Parameters:
compNumber- component index- Returns:
- the I term
-
calculateEnthalpy
public double calculateEnthalpy(double temperature, int compNumber) Calculates enthalpy for a component.- Parameters:
temperature- temperature in KcompNumber- component index- Returns:
- enthalpy
-
calculateEntropy
public double calculateEntropy(double temperature, int compNumber) Calculates entropy for a component.- Parameters:
temperature- temperature in KcompNumber- component index- Returns:
- entropy in J/(mol·K)
-
calculateHeatCapacity
public double calculateHeatCapacity(double temperature, int compNumber) Calculates heat capacity for a component.- Parameters:
temperature- temperature in KcompNumber- component index- Returns:
- heat capacity in J/(mol·K)
-