Documentation Index
Fetch the complete documentation index at: https://docs.mangrovesystems.com/llms.txt
Use this file to discover all available pages before exploring further.
- Add 2 new event types (Feedstock Receipt, Lab Analysis) with appropriate datapoints
- Expand your model to a 5-step calculation pipeline with intermediate outputs
- Test the pipeline with varied data and verify intermediate and final results
Part 1: Design (30 min)
Before building in Mangrove, design the expanded model on paper or in a spreadsheet.1. Identify additional event types
Your project needs data from two new operational activities:Feedstock Receipt
- Feedstock type (text)
- Wet mass in tonnes (number)
- Moisture content as % (number)
- Receipt date (date)
Lab Analysis
- Sample ID (text)
- Carbon content as % (number)
- H:C molar ratio (number)
- Analysis date (date)
2. Map the 5-step calculation flow
For each step, identify the inputs and the formula:| Step | Calculation | Inputs | Formula |
|---|---|---|---|
| 1 | Dry feedstock mass | wet_mass, moisture_content | wet_mass × (1 - moisture/100) |
| 2 | Feedstock carbon content | dry_mass, carbon_pct | dry_mass × (carbon_pct / 100) |
| 3 | Biochar yield | feedstock_carbon, biochar_mass | biochar_mass / feedstock_carbon (efficiency ratio) |
| 4 | Permanence factor | hc_ratio | If H:C < 0.4 → 0.9; < 0.7 → 0.8; else → 0.7 |
| 5 | Net carbon sequestered | feedstock_carbon, permanence, factor_3.67 | feedstock_carbon × permanence × 3.67 |
3. Identify validation rules
Think about what values should be flagged or rejected:- Moisture content must be between 0% and 100%
- Carbon content must be between 0% and 100%
- H:C ratio for biochar is typically 0.1–1.0
- Wet mass must be positive
Part 2: Build in Mangrove (1.5 hrs)
Step 1: Add 2 new event types
- Open your Mangrove Biochar project and go to Data Inputs > Input Settings.
- Add a Feedstock Receipt event type (slug:
feedstock-receipt) with 4 datapoints:
| Datapoint | Slug | Value Type |
|---|---|---|
| Feedstock type | feedstock-type | text |
| Wet mass (tonnes) | wet-mass-tonnes | number |
| Moisture content (%) | moisture-content-pct | number |
| Receipt date | receipt-date | date |
- Add a Lab Analysis event type (slug:
lab-analysis) with 4 datapoints:
| Datapoint | Slug | Value Type |
|---|---|---|
| Sample ID | sample-id | text |
| Carbon content (%) | carbon-content-pct | number |
| H:C molar ratio | hc-ratio | number |
| Analysis date | analysis-date | date |
Step 2: Expand your model with a 5-step pipeline
- Open the Models section and the Model Editor .
- Build the multi-step calculation tree:
Step 1: Dry feedstock mass
product Children:- Input node:
wet-mass-tonnes(from Feedstock Receipt) - Calculated node:
1 - moisture/100(use a Keisan expression or intermediate nodes)
Step 2: Feedstock carbon content
product Children:- Intermediate: dry feedstock mass (from Step 1)
- Input node:
carbon-content-pct(from Lab Analysis, divided by 100)
Step 3: Biochar yield efficiency
quotient Children:- Input node:
biochar-mass-tonnes(from Biochar Delivery) - Intermediate: dry feedstock mass (from Step 1)
Step 4: Permanence factor
keisan Expression: Conditional based on H:C ratio from Lab AnalysisStep 3: Test with varied data
- Create test events — add events for each of the 3 event types with the following test data:
| Event Type | Key Values |
|---|---|
| Feedstock Receipt | wet mass = 12 t, moisture = 15% |
| Lab Analysis | carbon content = 80%, H:C ratio = 0.35 |
| Biochar Delivery | mass = 8 t, carbon content = 80% |
- Run the model in the Console and verify each intermediate step:
- Dry mass: 12 × 0.85 = 10.2 t
- Carbon mass: 10.2 × 0.80 = 8.16 t C
- Yield: 8 / 10.2 = 0.784
- Permanence: 0.9 (H:C < 0.4)
- Net carbon: 8.16 × 0.9 × 3.67 ≈ 26.95 tCO2e
- Test with edge cases — create additional events with:
- High moisture (50%) — dry mass should drop significantly
- High H:C ratio (0.75) — permanence should be 0.7 (lowest tier)
- Different carbon content — verify proportional impact on output
Success criteria
You have completed the Module 2 exercise when:- Two new event types exist — Feedstock Receipt and Lab Analysis — each with appropriate datapoints in Data Inputs > Input Settings
- Model expanded to a 5-step pipeline with visible intermediate calculations
- Intermediate outputs are verifiable — dry mass, carbon content, yield, permanence factor all produce expected values
- Final output (net carbon in tCO2e) matches manual calculation for your test data
- Edge cases tested — varied moisture, H:C ratios, and carbon content produce correct adjusted results