summaryrefslogtreecommitdiff
path: root/db/seeds/5_fertilizer_components.rb.bkp
blob: 8a1fc54333734bfcec0ec6ad7d67862ac326abff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FERTILIZER_COMPONENTS = [
  # Macros / bases
  { name: "Potassium Nitrate",        formula: "KNO3",            nno3: 13.50, k: 38.60 },
  { name: "Calcium Nitrate",          formula: "Ca(NO3)2·xH2O",   nno3: 15.50, ca: 18.94 },
  { name: "Ammonium Nitrate",         formula: "NH4NO3",          nno3: 13.50, nnh4: 13.50 }, # total N ≈ 27
  { name: "Diammonium Phosphate",     formula: "(NH4)2HPO4",      p: 21.00 },                 # NH4 can be added later if desired

  # Acids / buffers
  { name: "Nitric Acid 53%",          formula: "HNO3",            nno3: 11.70 },
  { name: "Potassium Bicarbonate",    formula: "KHCO3",           k: 39.05 },
  { name: "Calcium Carbonate",        formula: "CaCO3",           ca: 38.00 },

  # K–Mg–S complex (Patentkali-type blend)
  { name: "Potassium Sulfate blend (K–Mg–S + NaCl)", formula: "K2SO4+MgSO4+NaCl",
    p: 0.44, k: 22.66, mg: 6.16, s: 17.77, na: 2.16, cl: 3.34 },

  # Sulfates (micros / secondary)
  { name: "Magnesium Sulfate",        formula: "MgSO4·7H2O",      mg: 9.648, s: 13.016 },
  { name: "Manganese Sulfate",        formula: "MnSO4",           s: 7.17,  mn: 12.00 },
  { name: "Zinc Sulfate (Fiza Zinc)", formula: "ZnSO4",           zn: 12.00 },

  # Chelates / traces
  { name: "Iron DTPA 11.8%",          formula: "Fe-DTPA",         fe: 11.80 },
  { name: "HelioCopper (Cu chelate)", formula: "Cu-chelate",      cu: 40.00 },

  # Boron & Mo sources
  { name: "Boron–Molybdenum (Boronia LS)", formula: "B+Mo",       b: 13.50, mo: 0.028 },
  { name: "Boronia MO12 (10L)",           formula: "B+Mn+Cu",     b: 8.90, mn: 0.089, cu: 0.89 },
  { name: "Sodium Molybdate",             formula: "Na2MoO4",     mo: 39.50 }
]

FERTILIZER_COMPONENTS.each do |attrs|
  FertilizerComponent.find_or_create_by!(name: attrs[:name]) do |c|
    c.attributes = attrs
  end
end

puts "Fertilizer components: #{FertilizerComponent.count}"
Copyright 2019--2025 Marius PETER