membrane-pretreatment
RO/NF pretreatment chain — feed type architectures (SWRO open/beach well, BWRO well/surface, tertiary reuse), pretreatment KPI targets (SDI, turbidity, AOC, Fe/Mn, free Cl2), coagulation chemistry (FeCl3/PAC/alum dose math), antiscalant selection by scaling species, dechlorination (SBS stoichiometry + chloramine handling), CO2/pH management for 2-pass RO and EDI feed, biocide strategy (oxidizing pre-membrane vs non-oxidizing on-membrane), monitoring instrumentation. Use when designing or auditing what sits upstream of RO/NF/EDI.
What this skill does
# RO/NF Pretreatment
Reference for what feeds the membrane train, with KPI targets, chemistry, and instrumentation. The 80 % rule: most RO/NF/EDI problems originate upstream.
Convention markers:
- `⚠️` — likely bug or incorrect assumption in calling code
- `💡` — enhancement opportunity (new alert, new monitoring point, new dosing logic)
---
## §1 — Pretreatment Chain Overview
### 1.1 SWRO open intake
```
Sea intake (screen 5–25 mm)
→ Travelling band / drum screen (~1–3 mm)
→ In-line coagulation (FeCl3 0.5–5 mg/L as Fe) + flash mix (G ≈ 700–1000 s⁻¹, 30–60 s)
→ Flocculation tank (G ≈ 30–80 s⁻¹, 15–30 min) [optional with inline coag]
→ DAF (HABs/algae/oil) OR direct media filtration
→ Dual / Multimedia gravity filter (5–15 m/h) OR pressure MMF (15–25 m/h)
→ [Optional] UF 0.02 µm for SDI₁₅ ≤ 2
→ Cartridge filter 5 µm absolute (ΔP fresh < 0.3 bar; change at 1.0–1.5 bar)
→ Antiscalant injection
→ SBS dechlorination (only if Cl2 used pre-filter)
→ Acid dosing (H2SO4 or HCl) for LSI control
→ HPP → SWRO 1st pass
```
### 1.2 SWRO beach well (subsurface intake)
```
Beach well / infiltration gallery (natural aquifer filtration)
→ Cartridge filter 5 µm
→ Antiscalant injection
→ SBS only if shock-chlorination at wellhead
→ Acid dosing
→ HPP → SWRO
```
Subsurface intakes naturally deliver SDI₁₅ < 3 in most geologies → skip coagulation and media filtration. Yield (m³/h per well) and risk of Fe/Mn intrusion from anoxic strata are the practical limits.
### 1.3 BWRO well (saline groundwater)
```
Well pump → aeration / oxidation (Cl2, KMnO4, or O2) if Fe/Mn > 0.05 mg/L
→ Manganese greensand / pyrolusite filter (Fe/Mn removal)
→ MMF polishing
→ Cartridge filter 5 µm
→ SBS (if Cl2 residual present)
→ Antiscalant
→ Acid (for high alkalinity / LSI)
→ BWRO
```
### 1.4 BWRO surface water
Same architecture as SWRO open intake but lower TDS, lower turbidity peaks. pH control more critical (CaCO3 dominant scaling vs Mg-sulfate).
### 1.5 Tertiary reuse → BWRO
```
Biological secondary effluent → MBR or tertiary UF/MF
→ break tank
→ cartridge filter 5 µm
→ DBNPA continuous low-dose (1 mg/L) optional
→ antiscalant (low-P or P-free)
→ BWRO 1st pass
```
MBR/tertiary UF typically produces SDI₁₅ 0.5–2.0; secondary effluent may exceed 3 in some months.
---
## §2 — Pretreatment KPI Targets (pre-RO)
| Parameter | SWRO open | SWRO beach well | BWRO well | BWRO surface | Tertiary reuse |
|---|---|---|---|---|---|
| SDI₁₅ target | ≤ 3 | ≤ 2 | ≤ 3 | ≤ 3 | ≤ 3 |
| SDI₁₅ max | 5 | 3 | 4 | 5 | 5 |
| SDI₁₅ with UF | ≤ 2 | n/a | ≤ 2 | ≤ 2 | ≤ 2 |
| Turbidity (NTU) target | < 0.1 | < 0.1 | < 0.1 | < 0.1 | < 0.2 |
| Turbidity (NTU) max | 1.0 | 0.5 | 1.0 | 1.0 | 1.0 |
| Free Cl₂ pre-membrane | 0 ppm | 0 ppm | 0 ppm | 0 ppm | 0 ppm |
| ORP post-dechlor | < 200 mV | n/a | < 200 mV | < 200 mV | < 200 mV |
| AOC (µg C/L) | < 50 excellent / < 100 acceptable | < 50 | < 50 | < 100 | < 100 |
| BGP (µg/L) | < 70 | < 70 | n/a | n/a | n/a |
| Iron (mg/L) | < 0.05 | < 0.05 | < 0.05 | < 0.05 | < 0.1 |
| Manganese (mg/L) | < 0.02 | < 0.02 | < 0.02 | < 0.02 | < 0.05 |
| Aluminum residual (mg/L) | < 0.05 | < 0.05 | < 0.05 | < 0.05 | < 0.05 |
| Operating pH | 6.5–7.5 | 6.5–7.5 | 5.5–7 | 5.5–7.5 | 6–7.5 |
| Cartridge ΔP fresh | < 0.3 bar | < 0.3 bar | < 0.3 bar | < 0.3 bar | < 0.3 bar |
| Cartridge ΔP change-out | 0.7–1.0 bar | 0.7–1.0 bar | 0.7–1.0 bar | 0.7–1.0 bar | 0.7–1.0 bar |
⚠️ SDI₁₅ > 5 voids most OEM warranties. SDI₁₅ ≤ 5 is the absolute hard limit.
AOC threshold from Vrouwenvelder / Weinrich biofouling correlation studies. Raw seawater commonly 30–400 µg C/L (Tampa Bay 360 ± 180 µg/L; Monterey 30 ± 20 µg/L).
⚠️ Heavy metals (Fe³⁺, Mn²⁺, Cu²⁺, Co²⁺) catalyse SBS → oxidant conversion under O₂. Keep trace metals low and minimize SBS overdose (see §5.4).
---
## §3 — Coagulation / Flocculation Chemistry
### 3.1 Coagulant comparison
| Coagulant | Formula | Dose (as product) | Dose (as metal) | Optimal pH | Notes |
|---|---|---|---|---|---|
| Ferric chloride | FeCl₃·6H₂O | 5–40 mg/L | 1–10 mg/L Fe | 5.0–8.5 (best 5–7) | Wide pH; dense floc; residual Fe³⁺ accepted < 0.05 ppm; preferred for SWRO |
| Ferrous sulfate | FeSO₄·7H₂O | 10–50 mg/L | 2–10 mg/L Fe | 8.5–11 + Cl₂ oxidize Fe²⁺→Fe³⁺ | Cheap; needs alkaline conditions |
| Alum | Al₂(SO₄)₃·14–18H₂O | 5–60 mg/L | 0.4–5 mg/L Al | 6.0–7.5 (narrow) | Al residual → AlPO₄/Al(OH)₃ fouling on RO; avoid for RO when possible |
| PAC | Al_n(OH)_m Cl_{3n-m} | 5–30 mg/L | 0.5–3 mg/L Al | 5.5–9 (wide) | Lower residual Al than alum; less pH depression; efficient at cold T |
### 3.2 Polymer flocculant aids
- Type: anionic / cationic / nonionic polyacrylamide (PAM); also tannin-based natural polymers
- Dose 0.05–1 mg/L. Under-dose → no benefit; over-dose → carryover, RO fouling
- Cationic PAM acts as primary coagulant in low-turbidity surface waters
⚠️ Cationic polymer + anionic antiscalant → precipitate → RO fouling. Always jar-test the combination before deployment.
### 3.3 Jar test methodology
1. **Setup**: 6 paddle jars × 1 L; coagulant in dilute solution (1–10 % w/v)
2. **Flash mix**: 100–200 rpm × 30–60 s (G ≈ 700–1 000 s⁻¹)
3. **Flocculation**: 30 rpm × 15–30 min (G ≈ 30–80 s⁻¹, tapered if possible)
4. **Settling**: 30 min undisturbed
5. **Sampling**: supernatant at fixed depth; measure turbidity, TOC, SDI, residual coagulant metal, pH
G value:
```
G = sqrt(P / (μ · V)) # P = power (W), μ = dynamic viscosity (Pa·s), V = volume (m³)
```
### 3.4 Pros/cons for downstream RO
| Aspect | Iron-based (FeCl₃) | Aluminum-based (alum, PAC) |
|---|---|---|
| Residual carryover risk | Fe³⁺ acceptable up to 0.05 ppm | Al³⁺-phosphate fouling, severe at > 0.05 ppm |
| Floc strength | Dense, settle easily | Lighter |
| pH window | Wide | Narrow (alum); wider (PAC) |
| Cold water | Good | Good (PAC) / poor (alum) |
| TOC removal | Excellent | Moderate |
| SWRO compatibility | Preferred | Avoid alum; PAC OK with caution |
---
## §4 — Antiscalant Selection and Dose Math
### 4.1 Chemistry families
| Family | Examples | Best for | Typical dose | Notes |
|---|---|---|---|---|
| Phosphonate | HEDP, PBTC, ATMP, DTPMP, BHMTPMP | CaCO₃, CaSO₄, BaSO₄, SrSO₄, CaF₂ | 2–5 mg/L | Workhorse; P discharge constraints |
| Polyacrylate / acrylic homo & copolymer | PAA, AA-MA | BaSO₄, SrSO₄, suspended solids dispersion | 1–5 mg/L | P-free; lower Ca tolerance |
| Sulfonated copolymer | AA-AMPS, AA-AMPS-HPA terpolymer | High Ca, CaPO₄, ZnCO₃ | 2–5 mg/L | High Ca + alkaline tolerance |
| Maleic-based | MA-AA, polymaleic | CaCO₃, CaSO₄ broad | 2–5 mg/L | P-free; used in P-restricted discharges |
| Polymeric silica dispersant | PEG, PEGD, PVA, PAMAM, PEI | SiO₂, colloidal silica | 1–5 mg/L | For SiO₂ > 100 ppm in concentrate |
| Dendrimer / latest-gen | Polyaspartate, dendrimer-based | Broad multi-species | 1–4 mg/L | Biodegradable; premium |
### 4.2 Selection by scaling species
| Scaling species | Antiscalant of choice |
|---|---|
| CaCO₃ | Phosphonate (HEDP, PBTC) OR maleic-based (P-free) |
| CaSO₄ (gypsum) | Phosphonate + polyacrylate blend |
| BaSO₄, SrSO₄ | Polyacrylate or AA-AMPS (phosphonates can co-precipitate with Ba) |
| CaF₂ | Phosphonate |
| SiO₂ amorphous | Polymeric silica inhibitor (PEG/PEGD) + pH adjustment |
| Ca₃(PO₄)₂ | AA-AMPS terpolymer — **NOT** phosphonate |
| Fe / Mn fouling | Specialised dispersant blend |
### 4.3 Dose calculation
Three approaches:
1. **Vendor projection software** (preferred): DuPont WAVE, Hydranautics IMSDesign, Toray DS-Design, Veolia Winflows, Avista AdvisorCi, Genesys Genesys Member. Software computes LSI / S&DSI / IP-Ksp per stage and recommends dose.
2. **LSI-driven empirical**: target concentrate LSI ≤ +1.8 (conservative) or ≤ +2.5 (premium antiscalant). Typical dose 2–5 mg/L product.
3. **Jar-tested matrix**: when projection unavailable.
### 4.4 Compatibility traps
⚠️ Cationic biocide + anionic antiscalant → precipitate.
⚠️ Phosphonate + Ba²⁺ → BaSO₄ co-precRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.