This guide walks through the Grasshopper definition for a multi-material shoe stack simulation run on the GPU (experimental solver): preparing the Rhino geometry, assigning a material model to each part, merging them, configuring the simulation, and dispatching it to Metafold. It's identical to the standard [[Getting Started — Shoe Stack Simulation]] guide except for one setting in Step 5, where Exp is switched on to enable the GPU solver.
💡 Tip: Work through the steps in order — the simulation step depends on every part having a material assigned, and the merge step depends on all parts existing first. Enabling the GPU solver (Step 5) is also required if you swap in a GPU-only material like Orthotropic or Hyperfoam.
Step 1: Prepare the Rhino File
Open the Rhino file (generic_gh). Each component of the shoe lives on its own layer:
upper_solemidsolepiston(also called the Last — the foot-shaped rigid form that drives the simulation)outsole
Grasshopper references geometry by layer, so before anything else, confirm each part is sitting on the correct layer — if a part is on the wrong layer (or Default), the corresponding Grasshopper reference block downstream will pick up nothing or the wrong geometry.
upper_sole, midsole, piston, outsole) split onto its own layer so Grasshopper can reference each one correctly.Step 2: Open the Grasshopper Script
Open the .gh file alongside the Rhino model. At a glance, the canvas is organized into purple groups, each one doing one job:
- Upper Midsole / Lower Midsole / Outsole / Last — one material-assignment group per part (Step 3)
- Merge — combines all parts into one list (Step 4)
- Simulation Setup — the simulation's numerical parameters (Step 5)
- Metafold Login and Run Simulation — authenticates and dispatches the job (Step 6)
Step 3: Assign a Material Model to Each Part
Every part needs two things wired together: a material component (defines how it physically behaves) and a Deformable or Rigid wrapper (attaches that material to the actual geometry). Metafold uses this pairing to know how each part should respond during the simulation.
Upper Midsole
Midsole geometry → Metafold DTB Maxwell-Weichert Material → Metafold DTB Deformable
The Maxwell-Weichert model is a viscoelastic material (time-dependent stiffness) — inputs include Bulk Modulus, Terminal Shear Modulus, and a Modes table (relaxation time/modulus pairs, e.g. {0.0025, 3.5e4}), plus Density, Thermal Conductivity, and Specific Heat.
Lower Midsole
Midsole2 geometry → MF Mooney Mat → Metafold DTB Deformable
A Mooney-Rivlin hyperelastic material, driven by C1 and C2 (stiffness constants — here 658000 and 356000) and Poisson Ratio (0.48, near-incompressible, typical for foam/rubber).
Outsole
Outsole geometry → Metafold DTB Mooney-Rivlin Material → Metafold DTB Deformable
Same material family as the lower midsole (Constant 1, Constant 2, Poisson Ratio, Density, Thermal Conductivity, Specific Heat) — outsole-specific values go here since it's typically a stiffer rubber compound than the midsole foam.
Last (Piston)
last geometry → Metafold DTB Rigid Material + Metafold DTB Rigid
Unlike the other three, the Last doesn't deform — it's the rigid body that drives the compression. A small Py3 expression block generates a velocity profile (a time-series of Z-displacement values) that's fed into the Rigid component's Velocity Profile input, controlling how the Last moves down into the stack over the course of the simulation.
Py3 expression generates a time-series velocity table, fed into Metafold DTB Rigid alongside Metafold DTB Rigid Material.Step 4: Merge the Parts
All four parts feed into a single Merge component (inputs D1–D4 used here; D5–D7 are spare inputs if you add more parts later). The output, R, is the combined part list the simulation step needs.
Step 5: Simulation Setup
Metafold DTB Sim Config sets the numerical parameters for the run:
- Max Resolution — mesh/voxel resolution (
64) - Max Time — total simulated time (
0.068) - Delta Min / Delta Max — solver time-step bounds
- Output Interval — how often results are written out
- Mesh Scale — geometry scaling applied on export
- Exp — the switch that puts this run on the GPU (experimental solver). It's a true/false toggle, not a numeric input: right-click directly on the Exp input → Set Boolean → True to enable it (leave it False for the standard CPU solver). This is also required if you're using a GPU-only material (Orthotropic or Hyperfoam) — without it, those materials won't run at all.
This config, together with the merged Parts list and a Name (e.g. generic midsole), feeds into Metafold DTB Simulation, which packages everything into the simulation definition used in the next step.
Step 6: Authenticate & Run
Metafold Login takes a Login URL and returns a Client object (your authenticated session) and Status.
Metafold DTB Multiple Simulation Experiment ("Run Simulation") takes that Client, the Simulation(s), and a Project Name, and dispatches the job:
- Exports meshes and builds manifests
- Zips the experiment and POSTs it to the Metafold API
- On success (
202 Accepted), returns a Project URL — a link to the running experiment in the DTB dashboard - Log streams the full dispatch sequence for troubleshooting if something fails
- Open Project opens the result in your browser once dispatch completes
Step 7: Visualize the Results
Once the run completes, opening the Project URL lands you on the results dashboard, laid out as four linked panels plus a results table:
- Results — one row per simulation (here,
generic midsole), with Volume, Absorbed Energy, Loading Energy, and Unloading Energy. Use Download Results to export the numbers or Apply Filter to narrow the table when comparing multiple runs. - Force-Displacement — the overall compression curve for the assembled shoe stack: force (N) against piston (Last) displacement (mm).
- Von Mises Stress — since the shoe has multiple deformable parts, this panel is tabbed per part (Midsole von Mises Stress / Midsole2 von Mises Stress / Outsole von Mises Stress), each showing a histogram of stress distribution across that part individually — useful for spotting which layer is carrying the most load.
- Energy Absorbed-Interior Volume — plots the stack's absorbed energy against its interior (void) volume.
- Simulation Preview — an animated, color-mapped playback of the compression (switchable between metrics like Effective Strain via the dropdown), with a frame scrubber and FPS control at the bottom. The adjacent Part Preview tab shows the geometry with the animation.