Getting Started — Multi-Simulation

This guide walks through running a batch of simulation variants at once: compressing 12 different lattice cell designs under the same piston in a single dispatch, so you can compare their performance side by side. The designs were generated using the Metafold API and exported as STL files, then imported into Rhino, where a piston was modeled separately to compress them.

Figure 1:
Figure 1: 12 lattice design variants — the full set of geometries generated via the Metafold API and exported as STL for this batch.
💡 Tip: Most of the components here work exactly as in the single-part guides (see [[Getting Started — Single Lattice Cell Compression]] and the [[Metafold DTB Component Reference]] for the full breakdown of each one). The one genuinely new idea: you bring in all 12 lattice designs, but you only need to model the piston once — Step 5 shows the pattern that automatically matches it to however many designs you're comparing, instead of you having to duplicate it manually.

Step 1: Prepare the Designs

Export each lattice design from the Metafold API as an STL and import all of them into Rhino. Model the piston separately: its bottom face should just rest on top of each lattice block's upper face — touching, not overlapping — so contact starts at essentially zero penetration when the simulation begins.

Figure 2:
Figure 2: Piston resting on a lattice design — the rigid piston modeled to just touch the top face of one lattice block, ready for compression.

Step 2: Open the Grasshopper Script

The canvas is organized into these groups:

  • Lattice Parts — assigns the material to each lattice design (Step 3)
  • Piston — assigns the piston's material and its compression motion (Step 4)
  • Velocity Profile — the shared motion curve feeding the piston
  • converting to multi-sim — broadcasts the single piston across all 12 lattice parts and pairs them up (Step 5)
  • Simulation Setup — the run's numerical parameters (Step 6)
  • Metafold Login and Run Simulation — authenticates and dispatches all 12 variants at once (Step 7)
Figure 3:
Figure 3: Full Grasshopper canvas overview — all groups in one view: Lattice Parts, Piston, Velocity Profile, converting to multi-sim, Simulation Setup, Metafold Login, and Run Simulation.

Step 3: Assign the Lattice Material

parts (the 12 lattice geometries) → Metafold DTB Maxwell-Weichert Material → Metafold DTB Deformable. The same viscoelastic material (Bulk Modulus, Terminal Shear Modulus, and a Modes table — a Prony series of relaxation-time/modulus pairs) is applied to every design, so any performance difference you see afterward comes from the geometry, not the material. When selecting the meshes assigned to parts, make sure to select the Set Multiple Meshes option and choose all the lattice designs from Rhino.

Figure 4:
Figure 4: Set Multiple Meshes — right-click parts and choose this option to select all 12 lattice designs at once.

Step 4: Assign the Piston

piston geometry → Metafold DTB Rigid Material → Metafold DTB Rigid. A Py3 expression (A = 10, T = 0.02, n = 17) generates a symmetric velocity profile — ramping down and back up — feeding the Velocity Profile input to drive the compression stroke. There's only one piston defined here; Step 5 is what lets it act on all 12 lattice parts.

Figure 5:
Figure 5: Velocity Profile and Piston — a Py3 expression generates the compression stroke, feeding Metafold DTB Rigid Material and Metafold DTB Rigid.

Step 5: Convert to Multi-Sim

This is the step that makes a batch run possible. There are 12 lattice parts but only one piston, and each simulation needs both — so:

  • Longest List (in "Repeat Last" mode) takes the single-item piston list and repeats its last (only) entry until it matches the length of the part list — turning 1 piston into 12 identical copies, one per design.
Figure 6:
Figure 6: Converting to multi-sim — Longest List (Repeat Last) turns the single piston into 12 copies, which Merge then pairs one-to-one with each lattice part.
  • Merge then pairs each lattice part with its own copy of the piston, producing 12 separate part-lists (one lattice + one piston each) instead of a single combined list.

Without this step, Grasshopper would either error on mismatched list lengths or silently drop parts — this pattern (Longest List + Repeat Last, then Merge) is the general way to broadcast a shared component across a batch of varying ones.

Step 6: Simulation Setup

Metafold DTB Sim Config sets the shared numerical parameters for every variant in the batch — Max Resolution, Max Time, Delt Min/Max, Output Interval, Mesh Scale, Exp — the same settings used across all 12 simulations. See the [[Metafold DTB Component Reference]] for what each one does.

Figure 7:
Figure 7: Simulation Setup — Metafold DTB Sim Config with Max Resolution set to 32.

Step 7: Authenticate & Run

Metafold Login authenticates as usual, producing a Client. Each of the 12 part-lists is packaged into its own Metafold DTB Simulation, with a distinct Name (e.g. des_1 through des_12) so you can tell the variants apart afterward. All 12 named simulations then feed into Metafold DTB Multiple Simulation Experiment, which dispatches them together as one project. The dispatch log confirms this: "Varying 1 field(s) across 12 simulation(s)" — the one varying field being the lattice geometry itself, since everything else (material, piston, config) is held constant across the batch.

Figure 8: Metafold DTB Multiple Simulation Experiment dispatching all 12 named designs (
Figure 8: Metafold DTB Multiple Simulation Experiment dispatching all 12 named designs (des_1–des_12) as one project, with the full dispatch log.

Step 8: Visualize the Results

Opening the Project URL lands you on the results dashboard, now showing all 12 variants together:

  • Results — one row per design (des_1 through des_12), each with its own Volume. Checking a row's box overlays it (in its assigned color) across the other panels, so you can isolate individual designs instead of comparing all 12 at once.
  • Force-Displacement — every design's compression curve overlaid on one chart, color-matched to the Results table, making it easy to spot which lattice geometries are stiffer or softer relative to the others.
  • Midsole von Mises Stress — a combined stress histogram across the selected design(s).
  • Energy Absorbed-Interior Volume — plots absorbed energy against each design's interior (void) volume, which is exactly what you'd use to compare energy absorption across the 12 geometries at a glance.
  • Simulation Preview — steps through the selected design's compression, color-mapped by a metric (von Mises Stress here), with the usual frame scrubber and FPS control.
Figure 9:
Figure 9: Results dashboard — 12 designs with volumes, overlaid Force-Displacement curves, von Mises Stress histogram, and Simulation Preview; Absorbed/Loading Energy
lattice_design_variaiton.3dm94.3 MiB
lattice_multisim.gh19.8 KiB