8000 Package owner-approved stock solubility data for 20 products by rafatahmed · Pull Request #95 · rafatahmed/Flahax · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- Package sourced stock solubility for 20 products (owner approval 2026-10-23), so `flahax mix` and `flahax batch` check that each concentrate dissolves at the entered temperature. Values are the CRC Handbook aqueous solubility table (18 products, 0-40 °C), Yara's CALCINIT sheet for calcium nitrate (ag grade; its 20 °C value is a floor from 20 to 40 °C, not checked below 20 °C) and the U.S. Coast Guard CHRIS compilation for urea, converted to grams of product as sold per litre at a density of 1 g/cm3: a lower bound, so a stock that would not dissolve is never passed. The six chelates, CH - micro and potassium citrate have no sourced data and stay `not_checked`. Checks remain single-salt in pure water, with no safety margin.
- Accept correctly printed supplier labels (#93, owner decision 2026-10-23). A label's charge balance against its chemical may now differ by up to 1 % (was 0.1 %): printed values are rounded and commercial grades are not the pure salt, so Yara's YaraLiva Calcinit label (N-NO3 14.4 %, N-NH4 1.1 %, CaO 26.3 %; -0.56 %) was refused. A one-point typing error (Ca 19.8 % for 18.8 %) moves the balance by about 2 % and is still refused. One limit now serves supplier grades and materials defined by formula or ions. An old magnesium nitrate analysis (N 11.0 %, Mg 9.65 %; 0.55 %) is no longer flagged.
- Open FlahaX to growers and agronomists with `flahax mix`, an interactive five-step entry (specification, water analysis, crop formula, fertilizers available, pH requirement) that saves waters, formulas, product stores, acids and sessions under `$FLAHAX_HOME` (default `~/.flahax`) in the formats `flahax batch` reads, and writes a batch sheet at the chosen depth: grower (tank A and tank B cards with prepared litres and grams, the acid container, checks after mixing), agronomist (adds the nutrient table: target, from water, required, achieved, final, difference; limits; pH path) or developer and manager (adds the full report). Lab reports are typed in their own units (mg/L, meq/L, mmol/L, alkalinity as CaCO3, micronutrients in mg/L or µmol/L); Enter is not measured, 0 a measured zero, `<DL` below detection; missing alkalinity is flagged at entry. Stock volumes follow the fill mode: fill the tanks full (the smallest container sets the irrigation volume) or make one irrigation (`stock_volumes.prepare_stocks`, `tank_too_small`). Two concentrate tanks (owner decision 2026-10-22): magnesium sulfate shares tank B with the phosphates, a waiver of Yara p. 65 listed on the report; a compound containing phosphate goes to tank B; more than two tanks is refused (`too_many_tanks`). Supplier label grades enter the chemistry and pH stages (graded id `<catalogue id>+<grade_id>`; an inconsistent label is `identity_inconsistent`), and compounds are declared from their data sheet (`declared_ions`: nitrogen forms, oxides, micronutrients, chelating agent, optional Na and Cl; checked by implied protons per phosphate between HPO4 2- and H2PO4-; one flag per unstated ion; their chelate sodium counted in the Na row); a product that cannot be modelled is formulated but gets no pH plan (`ph_not_planned_for_product`). Stock solubility is checked per product at the entered temperature from sourced data (`stock_solubility.check_stock_solubility`); no data is packaged yet, so every product shows not checked until the owner approves the sourced table. The review reasons on every output now quote the recipe that is weighed (#91).
- A material is defined by what it puts in the water, not by its catalogue name (owner decision 2026-10-22). `material_chemistry(record)` resolves a compound from its stated `ions` (with `chelating_agent` for chelates) or its `formula` (fertilizer ion table plus hydrate water), and a blend from its analysis by nutrient form (declared-ions grade); a record with only a name stops with `material_undefined` and says what to give. The 32 catalogue products are pre-filled materials whose ions are their identities' `ion_forms`; counterions and ligands follow the ions, so the name-based special cases (potassium carbonate and bicarbonate, macro-salt formula counterions) are gone. `chemistry_for_product`, `PRODUCT_CHEMISTRY` and `convert_catalogue_product_dose` remain as views. Every catalogue product converts bit for bit as before at five doses, and the 26 packaged formulas in RO water give identical recipes, pH and reagent decisions; a material list that shares no names with the catalogue gives the same recipe, pH and acid dose as the catalogue. Urea's component list was a string (a missing tuple comma) and is now a tuple.
Expand Down
11 changes: 8 additions & 3 deletions docs/site/guide/grower-outputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,14 @@ dissolves at its strength and temperature; `plan_stocks` does this with your
sourced solubility limits, and `default_compatibility_rules(products)` gives it
the same rules as records. `summarize_batch(..., temperature_c=25)` also lists
each concentrate against sourced single-salt solubility at that temperature
(`summary['solubility']`); a stock that does not dissolve blocks the batch. No
solubility data are packaged yet, so every product shows "not checked" until a
sourced table is approved. Your own `compatibilityRule` records (`--rules`, or
(`summary['solubility']`); a stock that does not dissolve blocks the batch. The
packaged table (`data/solubility.json`) covers 20 products at 0-40 °C: 18 from
the CRC Handbook aqueous solubility table, calcium nitrate (ag grade) from
Yara's CALCINIT sheet (its 20 °C value used as a floor from 20 to 40 °C) and
urea from the U.S. Coast Guard CHRIS compilation. Mass percent is converted to
grams per litre at a density of 1 g/cm3, which understates solubility, so a
stock that would not dissolve is never passed. The chelates, CH - micro and
potassium citrate have no sourced data and show "not checked". Your own `compatibilityRule` records (`--rules`, or
`rules=` in Python) separate further products and override the micronutrient
rule.

Expand Down
Loading
Loading
0