DEV Community

Cody Churchwell
Cody Churchwell

Posted on

How I Built a Digital Twin for NASA's $3M Lunar Waste Recycling Challenge

Eight kilograms.

That's how much trash a single astronaut generates per day on a space mission. Food packaging, worn-out clothing, hygiene products, equipment foam. On the ISS, most of it gets stuffed into a cargo vehicle and burned up in the atmosphere.

On the Moon? There's no convenient disposal method 384,000 kilometers from Earth.

NASA's LunaRecycle Challenge is a $3 million competition to solve this problem. I've been working on it solo for months, and today I'm open-sourcing my entire solution.

The Problem Is Harder Than It Sounds

At first glance, recycling seems straightforward. Heat things up, melt them down, reshape them. That works for most materials.

Then I discovered PVDF.

Zotek F30 is a polyvinylidene fluoride foam used extensively in spacecraft for insulation and cushioning. It's lightweight, durable, and perfect for space applications.

It's also a nightmare to recycle.

Heat PVDF above 300°C and it undergoes thermal decomposition, releasing hydrogen fluoride gas. HF is immediately dangerous to life—it penetrates skin on contact and can cause systemic fluoride poisoning. In an enclosed lunar habitat, even small amounts could be catastrophic.

Most thermal recycling approaches simply can't handle PVDF safely.

The Solution: Don't Heat It

After weeks of research into polymer chemistry, the answer became obvious: if heating is the problem, don't heat it.

ARTEMIS-R (Advanced Recycling Technology for Extraterrestrial Material Integration System) uses a hybrid approach:

For safe materials (food packaging, clothing, paper):

  • Thermal pyrolysis at 350-450°C
  • Produces syngas (fuel), biochar, and recovered water
  • Melt extrusion for thermoplastics → 3D printer filament

For PVDF foam:

  • Cold mechanical shredding (never exceeds 50°C)
  • Particle size reduction to 5mm
  • Mixed with biochar and lunar regolith simulant
  • Low-temperature pressing (150°C) into composite tiles

The composite tiles serve as radiation shielding—PVDF actually has decent radiation attenuation properties, so we're turning a waste problem into a protective asset.

Building the Digital Twin

Before building physical prototypes (budget: ~$32K), I needed to validate the design. That meant building a complete physics simulation.

The Architecture

┌──────────────────────────────────────────────┐
│            ARTEMIS-R Digital Twin            │
├──────────────────────────────────────────────┤
│                                              │
│  ┌─────────────┐     ┌─────────────────────┐ │
│  │ Waste Input │────▶│  IHA-100 Classifier │ │
│  └─────────────┘     │  (AI + NIR Spectro) │ │
│                      └──────────┬──────────┘ │
│                    ┌────────────┼────────────┐
│                    ▼            ▼            ▼
│              ┌─────────┐  ┌─────────┐  ┌─────────┐
│              │ TPR-200 │  │ MEX-300 │  │ MSH-400 │
│              │ Thermal │  │ Extruder│  │ Shredder│
│              └────┬────┘  └────┬────┘  └────┬────┘
│                   └────────────┼────────────┘
│                                ▼
│                      ┌─────────────────┐
│                      │ CPR-500 Press   │
│                      └────────┬────────┘
│                               ▼
│                      ┌─────────────────┐
│                      │ Products Output │
│                      └─────────────────┘
└──────────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

Physics Modeling

The simulation needed to capture real thermodynamics. For pyrolysis, I implemented Arrhenius kinetics:

def calculate_reaction_rate(self, temperature: float) -> float:
    """
    Arrhenius equation: k = A * exp(-Ea / RT)

    Parameters:
        temperature: Reactor temperature in Kelvin

    Returns:
        Reaction rate constant
    """
    R = 8.314  # Universal gas constant (J/mol·K)
    return self.pre_exponential * math.exp(
        -self.activation_energy / (R * temperature)
    )
Enter fullscreen mode Exit fullscreen mode

Heat transfer through reactor walls uses conduction equations. Energy balance tracks every joule in and out. Mass balance ensures we're not creating or destroying matter (physics tends to complain about that).

The Classification System

Waste arrives mixed. The system needs to identify what it's looking at before routing to the correct processor.

I simulated an NIR spectroscopy + computer vision pipeline:

class WasteClassifier:
    def classify(self, sample: WasteSample) -> ClassificationResult:
        # NIR spectral analysis
        spectral_match = self.match_spectrum(sample.nir_signature)

        # Visual classification (contamination detection)
        visual_result = self.cnn_classify(sample.image)

        # Confidence-weighted fusion
        combined = self.fuse_results(spectral_match, visual_result)

        # Route to appropriate processor
        return self.determine_route(combined)
Enter fullscreen mode Exit fullscreen mode

Current simulation accuracy: 99.2% correct classification.

Real-Time Dashboard

All this data needed visualization. I built a web dashboard using Dash/Plotly:

python -m lunarecycle.dashboard.app --web
Enter fullscreen mode Exit fullscreen mode

It shows:

  • Current processing state of each module
  • Energy balance (spoiler: we're net positive!)
  • Mass flow through the system
  • Safety interlock status
  • 7-day production history

The Numbers

After running thousands of simulation cycles:

Metric Target Achieved
Mass Recovery >80% 90%+
Net Energy Positive +44 kWh/week
Crew Time <1 hr/week <30 min/week
PVDF Safety Zero HF Zero HF
Throughput 8 kg/day 8 kg/day

The energy surplus comes from syngas. Pyrolysis of organic waste produces a hydrogen/carbon monoxide mix that can be burned for power. We generate more energy than the processing consumes.

What I Learned

1. Domain expertise isn't always required to start.
I had zero aerospace background. I learned polymer chemistry from papers, thermodynamics from textbooks, and NASA requirements from the challenge documentation. The knowledge is out there.

2. Simulation before fabrication saves money.
Finding the PVDF decomposition problem in simulation cost me time. Finding it after building a $32K prototype would have cost much more.

3. The hard problems are often at the edges.
The core recycling tech is well-understood. The challenge was handling edge cases—PVDF foam, contaminated mixed waste, failure modes. That's where the competition is won.

4. Open source accelerates everything.
By sharing this publicly, I've already gotten feedback that improved the design. Even if I don't win, maybe this helps someone who does.

Try It Yourself

The entire project is MIT licensed:

git clone https://github.com/consigcody94/lunarecycle-challenge.git
cd lunarecycle-challenge
pip install -e .
python -m lunarecycle.dashboard.app --web
Enter fullscreen mode Exit fullscreen mode

The repo includes:

  • Complete simulation code (Python)
  • 109 automated tests
  • Technical documentation
  • CAD specifications for prototype
  • Full bill of materials

Submission deadline is January 22, 2026. I'm still iterating.

What's Next

  • Physical prototype construction (early 2025)
  • Regolith simulant testing for composite tiles
  • Optimizing the classification model with real waste samples
  • Documentation for NASA submission

If you're working on space sustainability, ISRU, or polymer recycling—I'd love to connect. The problems are too big for any one person.

Let's go recycle some astronaut trash.


GitHub: consigcody94/lunarecycle-challenge

Questions? Find me in the comments or open an issue on the repo.

Top comments (0)