Class KineticReaction
- All Implemented Interfaces:
Serializable
Supports power-law, Langmuir-Hinshelwood-Hougen-Watson (LHHW), and reversible equilibrium rate expressions with Arrhenius temperature dependence. Reaction stoichiometry and kinetic parameters are defined independently, allowing flexible modeling of homogeneous and heterogeneous catalytic reactions.
The rate constant follows the modified Arrhenius form:
k(T) = A * T^n * exp(-Ea / (R*T))
For power-law kinetics the volumetric rate is:
r = k(T) * prod(Ci^alpha_i) for irreversible reactions
r = k(T) * [prod(Ci^alpha_i) - prod(Cj^beta_j) / Keq(T)] for reversible reactions
For LHHW kinetics:
r = k(T) * (driving force) / (adsorption term)^m
Usage example:
KineticReaction rxn = new KineticReaction("NH3 synthesis");
rxn.setRateType(KineticReaction.RateType.POWER_LAW);
rxn.addReactant("nitrogen", 1, 1.0);
rxn.addReactant("hydrogen", 3, 1.5);
rxn.addProduct("ammonia", 2);
rxn.setPreExponentialFactor(8.849e14);
rxn.setActivationEnergy(170000.0);
rxn.setHeatOfReaction(-92400.0);
- Version:
- 1.0
- Author:
- esol
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRate basis for heterogeneous vs homogeneous reactions.static enumRate expression type. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleActivation energy Ea [J/mol].private doubleLHHW adsorption activation energy [J/mol].private intLHHW adsorption exponent m (denominator raised to power m).private doubleLHHW adsorption pre-exponential factor.LHHW adsorption terms: component name to [Ki, adsorption order].private double[]Equilibrium constant correlation coefficients. ln(Keq) = eqCoeffs[0] + eqCoeffs[1]/T + eqCoeffs[2]*ln(T) + eqCoeffs[3]*T.private doubleHeat of reaction [J/mol] based on stoichiometry of first reactant.private StringName of this reaction.private doublePre-exponential factor A in rate constant [units depend on rate law and basis].Reaction orders for products (used in reversible reactions).private static final doubleUniversal gas constant [J/(mol*K)].private KineticReaction.RateBasisRate basis.private KineticReaction.RateTypeRate expression type.Reaction orders (kinetic exponents) for reactants.private booleanWhether the reaction is reversible.private static final longSerialization version UID.Stoichiometric coefficients: negative for reactants, positive for products.private doubleTemperature exponent n in modified Arrhenius k = A * T^n * exp(-Ea/RT). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAdsorptionTerm(String componentName, double kiFactor, double adsorptionOrder) Add an LHHW adsorption term for a component.voidaddProduct(String componentName, double stoichCoeff) Add a product with stoichiometric coefficient.voidaddProduct(String componentName, double stoichCoeff, double reverseOrder) Add a product with stoichiometric coefficient and reverse reaction order.voidaddReactant(String componentName, double stoichCoeff, double order) Add a reactant with stoichiometric coefficient and reaction order.doublecalculateEquilibriumConstant(double temperature) Calculate the equilibrium constant at given temperature.private doublecalculateLHHWRate(SystemInterface system, int phaseIndex, double rateConstant, double temperature) Calculate LHHW rate.private doublecalculatePowerLawRate(SystemInterface system, int phaseIndex, double rateConstant, double temperature) Calculate power-law rate.doublecalculateRate(SystemInterface system, int phaseIndex) Calculate the reaction rate at given conditions.doublecalculateRateConstant(double temperature) Calculate the Arrhenius rate constant at given temperature.doubleGet the activation energy.intGet the adsorption exponent.private doublegetConcentration(SystemInterface system, int phaseIndex, String componentName) Get molar concentration of a component in the specified phase.doubleGet the heat of reaction.getName()Get the name of this reaction.doubleGet the pre-exponential factor.Get the rate basis.Get the rate expression type.doublegetStoichiometricCoefficient(String componentName) Get the stoichiometric coefficient for a component.Get the stoichiometry map.doubleGet the temperature exponent.booleanCheck if reaction is reversible.voidsetActivationEnergy(double activationEnergy) Set the activation energy.voidsetAdsorptionActivationEnergy(double energy) Set the LHHW adsorption activation energy.voidsetAdsorptionExponent(int exponent) Set the LHHW adsorption exponent.voidsetAdsorptionPreExpFactor(double factor) Set the LHHW adsorption pre-exponential factor.voidsetEquilibriumConstantCorrelation(double a, double b, double c, double d) Set equilibrium constant correlation coefficients.voidsetHeatOfReaction(double heatOfReaction) Set the heat of reaction.voidsetPreExponentialFactor(double preExponentialFactor) Set the pre-exponential factor A.voidsetRateBasis(KineticReaction.RateBasis rateBasis) Set the rate basis.voidsetRateType(KineticReaction.RateType rateType) Set the rate expression type.voidsetReversible(boolean reversible) Set whether the reaction is reversible.voidsetTemperatureExponent(double temperatureExponent) Set the temperature exponent for modified Arrhenius.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
R_GAS
private static final double R_GASUniversal gas constant [J/(mol*K)].- See Also:
-
name
Name of this reaction. -
rateType
Rate expression type. -
rateBasis
Rate basis. -
stoichiometry
-
reactionOrders
-
productOrders
-
preExponentialFactor
private double preExponentialFactorPre-exponential factor A in rate constant [units depend on rate law and basis]. -
activationEnergy
private double activationEnergyActivation energy Ea [J/mol]. -
temperatureExponent
private double temperatureExponentTemperature exponent n in modified Arrhenius k = A * T^n * exp(-Ea/RT). -
heatOfReaction
private double heatOfReactionHeat of reaction [J/mol] based on stoichiometry of first reactant. Negative = exothermic. -
reversible
private boolean reversibleWhether the reaction is reversible. -
eqCoeffs
private double[] eqCoeffsEquilibrium constant correlation coefficients. ln(Keq) = eqCoeffs[0] + eqCoeffs[1]/T + eqCoeffs[2]*ln(T) + eqCoeffs[3]*T. -
adsorptionTerms
-
adsorptionExponent
private int adsorptionExponentLHHW adsorption exponent m (denominator raised to power m). -
adsorptionPreExpFactor
private double adsorptionPreExpFactorLHHW adsorption pre-exponential factor. -
adsorptionActivationEnergy
private double adsorptionActivationEnergyLHHW adsorption activation energy [J/mol].
-
-
Constructor Details
-
KineticReaction
Constructor for KineticReaction.- Parameters:
name- the reaction name
-
-
Method Details
-
addReactant
Add a reactant with stoichiometric coefficient and reaction order.- Parameters:
componentName- component name matching NeqSim databasestoichCoeff- positive stoichiometric coefficient (stored internally as negative)order- kinetic order for this species in the rate expression
-
addProduct
Add a product with stoichiometric coefficient.- Parameters:
componentName- component name matching NeqSim databasestoichCoeff- positive stoichiometric coefficient
-
addProduct
Add a product with stoichiometric coefficient and reverse reaction order.- Parameters:
componentName- component name matching NeqSim databasestoichCoeff- positive stoichiometric coefficientreverseOrder- kinetic order in reverse rate expression (for reversible reactions)
-
calculateRate
Calculate the reaction rate at given conditions.For POWER_LAW: r = k(T) * prod(Ci^alpha_i) [- prod(Cj^beta_j)/Keq(T) if reversible]
For LHHW: r = k(T) * drivingForce / (adsorptionTerm)^m
- Parameters:
system- the thermodynamic system with current T, P, compositionphaseIndex- phase to evaluate concentrations in (0=combined, typically 0 or gas phase)- Returns:
- reaction rate in units consistent with rateBasis
-
calculateRateConstant
public double calculateRateConstant(double temperature) Calculate the Arrhenius rate constant at given temperature.k(T) = A * T^n * exp(-Ea / (R*T))
- Parameters:
temperature- temperature in Kelvin- Returns:
- rate constant k(T)
-
calculateEquilibriumConstant
public double calculateEquilibriumConstant(double temperature) Calculate the equilibrium constant at given temperature.ln(Keq) = a + b/T + c*ln(T) + d*T
- Parameters:
temperature- temperature in Kelvin- Returns:
- equilibrium constant Keq
-
calculatePowerLawRate
private double calculatePowerLawRate(SystemInterface system, int phaseIndex, double rateConstant, double temperature) Calculate power-law rate.- Parameters:
system- thermodynamic systemphaseIndex- phase indexrateConstant- pre-calculated k(T)temperature- temperature [K]- Returns:
- rate [units per rateBasis]
-
calculateLHHWRate
private double calculateLHHWRate(SystemInterface system, int phaseIndex, double rateConstant, double temperature) Calculate LHHW rate.- Parameters:
system- thermodynamic systemphaseIndex- phase indexrateConstant- pre-calculated k(T)temperature- temperature [K]- Returns:
- LHHW rate
-
getConcentration
Get molar concentration of a component in the specified phase.- Parameters:
system- thermodynamic systemphaseIndex- phase indexcomponentName- component name- Returns:
- concentration in mol/m3
-
getStoichiometricCoefficient
Get the stoichiometric coefficient for a component.- Parameters:
componentName- component name- Returns:
- stoichiometric coefficient (negative for reactants, positive for products)
-
getStoichiometry
-
getName
-
setRateType
Set the rate expression type.- Parameters:
rateType- POWER_LAW, LHHW, or EQUILIBRIUM
-
getRateType
-
setRateBasis
Set the rate basis.- Parameters:
rateBasis- VOLUME, CATALYST_MASS, or CATALYST_AREA
-
getRateBasis
-
setPreExponentialFactor
public void setPreExponentialFactor(double preExponentialFactor) Set the pre-exponential factor A.- Parameters:
preExponentialFactor- A in k = A*T^n*exp(-Ea/RT)
-
getPreExponentialFactor
public double getPreExponentialFactor()Get the pre-exponential factor.- Returns:
- A
-
setActivationEnergy
public void setActivationEnergy(double activationEnergy) Set the activation energy.- Parameters:
activationEnergy- Ea in J/mol
-
getActivationEnergy
public double getActivationEnergy()Get the activation energy.- Returns:
- Ea [J/mol]
-
setTemperatureExponent
public void setTemperatureExponent(double temperatureExponent) Set the temperature exponent for modified Arrhenius.- Parameters:
temperatureExponent- n in k = A*T^n*exp(-Ea/RT)
-
getTemperatureExponent
public double getTemperatureExponent()Get the temperature exponent.- Returns:
- n
-
setHeatOfReaction
public void setHeatOfReaction(double heatOfReaction) Set the heat of reaction.- Parameters:
heatOfReaction- delta H_rxn in J/mol (negative = exothermic)
-
getHeatOfReaction
public double getHeatOfReaction()Get the heat of reaction.- Returns:
- delta H_rxn [J/mol]
-
setReversible
public void setReversible(boolean reversible) Set whether the reaction is reversible.- Parameters:
reversible- true for reversible reaction
-
isReversible
public boolean isReversible()Check if reaction is reversible.- Returns:
- true if reversible
-
setEquilibriumConstantCorrelation
public void setEquilibriumConstantCorrelation(double a, double b, double c, double d) Set equilibrium constant correlation coefficients.ln(Keq) = a + b/T + c*ln(T) + d*T
- Parameters:
a- constant termb- coefficient for 1/Tc- coefficient for ln(T)d- coefficient for T
-
addAdsorptionTerm
Add an LHHW adsorption term for a component.- Parameters:
componentName- component namekiFactor- relative adsorption constant factoradsorptionOrder- adsorption concentration order
-
setAdsorptionExponent
public void setAdsorptionExponent(int exponent) Set the LHHW adsorption exponent.- Parameters:
exponent- power m for denominator (adsorption term)^m
-
setAdsorptionPreExpFactor
public void setAdsorptionPreExpFactor(double factor) Set the LHHW adsorption pre-exponential factor.- Parameters:
factor- pre-exponential factor for adsorption constant
-
setAdsorptionActivationEnergy
public void setAdsorptionActivationEnergy(double energy) Set the LHHW adsorption activation energy.- Parameters:
energy- activation energy for adsorption [J/mol]
-
getAdsorptionExponent
public int getAdsorptionExponent()Get the adsorption exponent.- Returns:
- m
-