addAcid: function to determine the amount of acid to add to reach...

View source: R/addAcid.R

addAcidR Documentation

function to determine the amount of acid to add to reach target tank conditions

Description

starts with a specified volume of water with specified chemistry conditions in then tank then calculates the amount of acid to add to reach target volume and chemistry

Usage

addAcid(
  initVol,
  initS,
  initT,
  initPH,
  targetVol,
  targetS,
  targetT,
  targetAlk,
  acidConc,
  pCO2,
  highSwater
)

Arguments

initVol

intial volume of water in the tank (L)

initS

intial salinity of water in the tank (psu)

initT

intial temperature of water in the tank (degrees C)

initPH

intial pH of water in the tank

targetVol

target volume of water in the tank (L)

targetS

target salinity (psu)

targetT

target temperature (degrees C)

targetAlk

target alkalinity (umol/kg)

acidConc

acid concentration (Normality)

pCO2

atmospheric pCO2 (uatm)

highSwater

salinity of the high salinty water to be added (psu)

Value

A list of the amount of acid to add and the final target pH #'

  • totalAcidAddInit - total vol of acid needed to adjust only the inital water in the tank (ml)

  • aaNewTotal - total vol of acid needed to adjust only the new water added to the tanks (ml)

  • totalAcid

    • total volume of acid to add (= totalAcidAddInit + aaNewTotal) (ml) note: any of the acid additions could be negative (indcating the need to add base), however, the need for base should not occur when using instant ocean to create west coast water

    • finalPH - the target pH for the final solution (this will the the pH feedback setting)


pmcelhany/aws documentation built on Jan. 10, 2023, 8:56 p.m.