Getting Started — Shoe Stack Simulation

This guide walks through the Grasshopper definition for a multi-material shoe stack simulation: preparing the Rhino geometry, assigning a material model to each part, merging them, configuring the simulation, and dispatching it to Metafold.

💡 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.

Step 1: Prepare the Rhino File

Open the Rhino file (generic_gh). Each component of the shoe lives on its own layer:

  • upper_sole
  • midsole
  • piston (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.

Figure 1:
Figure 1: Preparing the Model in Rhino — the assembled shoe mesh, with the Layers panel showing each part (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)
Figure 2:
Figure 2: Full Grasshopper canvas overview (wide layout) — same canvas as above, laid out for a wider screen.

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.

Figure 3:
Figure 3: Upper Midsole material assignment — Metafold DTB Maxwell-Weichert Material (viscoelastic, with a relaxation Modes table) feeding Metafold DTB Deformable.

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).

Figure 4:
Figure 4: Lower Midsole material assignment — MF Mooney Mat (C1, C2, Poisson Ratio) feeding Metafold DTB Deformable.

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.

Figure 5: Outsole material assignment
Figure 5: Outsole material assignment — Metafold DTB Mooney-Rivlin Material feeding Metafold DTB Deformable.

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.

Figure 6:
Figure 6: Last (Piston) — material + velocity profile — a 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.

Figure 7:
Figure 7: Merge — combines all part outputs (D1–D7) into the single list the simulation step consumes.

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 when exporting your Rhino meshes
  • Exp — a true/false toggle (not a numeric input) that switches this run to the GPU (experimental) solver. Leave it False here — this file uses the standard solver. It's still wired in so it's easy to flip on later if needed: right-click the Exp input → Set Boolean → True (only required if you're using a GPU-only material like Orthotropic or Hyperfoam).
Figure 8:
Figure 8: Metafold DTB Sim Config — sets the numerical parameters for the run: Max Resolution, Max Time, Delta Min/Max, Output Interval, Mesh Scale, Exp.

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.

Figure 9:
Figure 9: Metafold DTB Simulation — combines the merged Parts, the Sim Config, and a Name into the simulation definition.

Step 6: Authenticate & Run

Metafold Login takes a Login URL and returns a Client object (your authenticated session) and Status.

Figure 10:
Figure 10: Metafold Login — authenticates with a Login URL and outputs a Client object 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
Figure 11:
Figure 11: Run Simulation — dispatches the experiment: exports meshes, zips and posts to the Metafold API, and returns the Project URL once accepted. The log panel shows the full dispatch sequence.

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.
Figure 12:
Figure 12: Results dashboard — Force-Displacement curve, per-part von Mises Stress tabs, Energy Absorbed–Interior Volume, and animated Simulation Preview for the shoe stack run.
generic_stack.gh27 KiB
generic_shoe.3dm30.6 MiB