Skip to content

Main content

Mineral Site Valence Budget Tool

Calculate mineral site valence budget from explicit caller-supplied inputs.

Loading tool…

Description

Sum occupancy times signed valence for charge, then subtract targetCharge for residual.

Stoichiometric calculations translate supplied amounts, formula counts, site occupancies, and valences into a common formula-unit basis. Arithmetic charge or occupancy balance does not prove that a mineral composition is chemically realizable.

Sum occupancy times signed valence for charge, then subtract targetCharge for residual.

When to use this tool

Use Mineral Site Valence Budget when you need one supplied-formula, charge, or occupancy term.

How to use the tool and how it works

  1. Enter occupancies, valences, targetCharge. Keep parallel arrays aligned. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read charge, residual. Use the output convention below.

Require equally long occupancies and valences with nonnegative occupancies. Sum occupancy times signed valence for charge, then subtract targetCharge for residual.1

Input fieldMeaning and unitsAccepted input
occupanciesOccupanciesRequired. Array of finite number; maximum items 256.
valencesValencesRequired. Array of finite number; maximum items 256.
targetChargeTarget ChargeRequired. Finite number.
Output fieldInterpretationReturned shape
chargeChargeRequired. Finite number.
residualResidualRequired. Finite number.
json
{
  "input": {
    "occupancies": [
      1,
      2
    ],
    "valences": [
      2,
      -1
    ],
    "targetCharge": 0
  },
  "output": {
    "charge": 0,
    "residual": 0
  }
}

Limitations and assumptions

  • Occupancies, valences, and target must refer to the same formula-unit basis. The tool does not infer oxidation states, enforce integer occupancies, or validate a complete mineral formula.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Normalize and evaluate the complete mineral analysis using the intended chemical model. Verify formulas, molar masses, oxidation states, site capacities, and analytical uncertainty independently.

References

  1. Calculation and input contract: geochemistry/mineral-site-valence-budget — tool.io

Similar or alternative tools