Learn R Programming

AquaEnv (version 1.0-4)

titration: titration

Description

PUBLIC function: creates an object of class aquaenv which contains a titration simulation

Usage

titration(aquaenv, mass_sample, mass_titrant, conc_titrant, S_titrant=NULL, steps, type="HCl", seawater_titrant=FALSE, k_w=NULL, k_co2=NULL, k_hco3=NULL, k_boh3=NULL, k_hso4=NULL, k_hf=NULL, k1k2="lueker", khf="dickson")

Arguments

aquaenv
an object of type aquaenv: minimal definition, contains all information about the system: T, S, d, total concentrations of nutrients etc (Note that it is possible to give values for SumBOH4, SumHSO4, and SumHF in the sample other than the ones calculated from salinity)
mass_sample
the mass of the sample solution in kg
mass_titrant
the total mass of the added titrant solution in kg
conc_titrant
the concentration of the titrant solution in mol/kg-soln
S_titrant
the salinity of the titrant solution, if not supplied it is assumed that the titrant solution has the same salinity as the sample solution
steps
the amount of steps the mass of titrant is added in
type
the type of titrant: either "HCl" or "NaOH", default: "HCl"
seawater_titrant
is the titrant based on natural seawater? (does it contain SumBOH4, SumHSO4, and SumHF in the same proportions as seawater, i.e., correlated to S?); Note that you can only assume a seawater based titrant (i.e. SumBOH4, SumHSO4, and SumHF ~ S) or a water based titrant (i.e. SumBOH4, SumHSO4, and SumHF = 0). It is not possible to give values for SumBOH4, SumHSO4, and SumHF of the titrant.
k_w
a fixed K\_W can be specified
k_co2
a fixed K\_CO2 can be specified; used for TA fitting: give a K\_CO2 and NOT calculate it from T and S: i.e. K\_CO2 can be fitted in the routine as well
k_hco3
a fixed K\_HCO3 can be specified
k_boh3
a fixed K\_BOH3 can be specified
k_hso4
a fixed K\_HSO4 can be specified
k_hf
a fixed K\_HF can be specified
k1k2
either "lueker" (default, Lueker2000) or "roy" (Roy1993a) for K\_CO2 and K\_HCO3.
khf
either "dickson" (default, Dickson1979a) or "perez" (Perez1987a) for K\_HF

Value

object of class aquaenv which contains a titration simulation