Skip to contents

Calculate the weight fraction of each individual ion in the sample (w%), based on ion concentration (ppm or mg/L), volume of water (mL), and the dry mass of the sample (g).

Usage

fun_salt_wt(salt_ppm, dry_g, water_ml)

Arguments

salt_ppm

Ion concentration in ppm or mg/L

dry_g

Dry sample mass in grams

water_ml

Volume of water in millilitres

Value

Numeric value for ion content in the sample expressed as weight percentage (w%)

Details

Eqn 1. Weight fraction (w_i), as preparation for charge balance equations.

The calculation is: $$ w_i = \frac{C_{\mathrm{ppm}} \times V_{\mathrm{water}}}{10000 \times m_{\mathrm{dry}}} $$ where:

  • \(C_{\mathrm{ppm}}\): ion concentration in ppm or mg/L

  • \(V_{\mathrm{water}}\): volume of water in millilitres

  • \(m_{\mathrm{dry}}\): dry mass of the sample in grams

Examples

# Chloride test data with scalar inputs
fun_salt_wt(66.824, 1.128, 100)
#> [1] 0.5924113

# Vectorized usage with salt_test and mol_wts data frames/lists
fun_salt_wt(
  salt_test$chloride_ppm,
  salt_test$dry_g,
  salt_test$water_ml
)
#> [1] 0.5924113