Li-Reactive-Water-Group / BioRT-HBV

BioRT-HBV is a catchment scale reactive transport model that can simulate a variety of biogeochemical processes using hydrology as simulated by HBV-light model.
MIT License
2 stars 4 forks source link

Stream Chemistry Calculation for Speciation Reactions #34

Closed BrynStewart closed 3 years ago

BrynStewart commented 3 years ago

I am able to run the calcite weathering reaction with just the primary species (Ca2+ and CO32-), but the stream chemistry for DIC does not look correct when I add in secondary species (HCO3- and CO2(aq)).

I have a base case with just the primary species, and a speciation case with the secondary species included. The inclusion of secondary species should allow more calcite to dissolve as CO32- can change species depending on pH conditions, meaning that the [DIC] and [Ca2+] should increase. However, the results of the case with speciation have lower [DIC] in the stream than the base case, but higher [Ca2+] in the stream. This seems to only be an issue with the stream chemistry, as the [DIC] in the UZ and LZ behaves as expected.

Model version: HBV-BioRT - Numexp branch (no surface reactions, last updated 10/17/2021)

To reproduce: Calcite_Speciation.zip

KayalvizhiSadayappan commented 3 years ago

The stream chemistry calculation in code was incorrect due to two reasons:

  1. Primary concentration in different zones were used to calculate total concentration of solutes contributed by them to stream.
  2. The solute accumulation in each zone due to reaction was not updated correctly.

After correcting for these two errors, the code is now correctly calculating stream chemistry.