calculate.KH: Calculates equilibrium constants using CHNOSZ

View source: R/calculate.K.R

calculate.KHR Documentation

Calculates equilibrium constants using CHNOSZ

Description

‘calculate.KH()' utilizes the subcrt function from Jeffrey Dick’s CHNOSZ R package to calculate equilibrium constants.

Usage

calculate.KH(reactants, moles, phases, temperature, pressure)

Arguments

reactants

A vector of all components involved in the reaction, both reactants and products.

moles

A vector of the molar coefficients for the reaction, with negative values indicating reactants and positive values indicating products.

phases

A vector of the phases for all components in the reaction, either "aq", "l", or "g".

temperature

Temperature of the system, in Kelvin.

pressure

The pressure of the system, in atm.

Details

For the following chemical equilibrium: \loadmathjax \mjdeqnCO_2(aq)+H_2O(l) \rightleftharpoons HCO_3^2-(aq)+H^+(aq)ASCII representation an example can found below

Examples

calculate_KH(c("CO2","H2O","HCO3-","H+"),c(-1,-1,1,1),c("aq","l","aq","aq"), 273.15+37,1.7)


hoehler-labgroup/methanogenlab documentation built on April 25, 2022, 11:42 a.m.