- 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: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:
- Add a Lab Analysis event type (slug:
lab-analysis) with 4 datapoints:
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 5: Net carbon sequestered (tCO2e)
product Children:- Intermediate: feedstock carbon content (from Step 2)
- Intermediate: permanence factor (from Step 4)
- Constant: 3.67
net-carbon-tco2eExpected result: 8.16 × 0.9 × 3.67 = 26.95 tCO2eStep 3: Test with varied data
- Create test events — add events for each of the 3 event types with the following test data:
- 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