December 2, 2026 · Ben Reilly

Accurate Fluid Dynamics for Autonomous Wet-Lab Simulations

At Gamow Labs, we are building an autonomous wet-lab to accelerate rare disease research and biological knowledge creation. A core focus of this is improving the fidelity of our simulators. Our recent efforts in this vein have been directed toward the Hamilton Vantage: a workhorse automated liquid handler across modern genomics and drug-discovery labs, trusted for precise, high-throughput microlitre transfers across 96- and 384-well plates. We’ve modeled the Vantage in MuJoCo, and it now powers real experimentation and assays, as well as more advanced evaluations.

One of the primary capabilities of the Vantage is its ability to precisely handle fluids. In order to effectively model agent failure modes in our simulator, this required us to build advanced fluid dynamics simulations into our in-silico environment. In this blog, we discuss how we hill-climbed this problem, using our observations from real hardware.

Hill-climbing curve on held-out Channels 5-8 across five model iterations: per-shot 1-Wasserstein distance drops from 0.81 mg to 0.17 mg (below the 0.23 mg hardware repeatability limit) as passing gates climb from 2/24 to 22/24.
Figure 1. Hill-climbing our pipetting simulator on held-out Channels 5–8. Left: mean distribution error (1-Wasserstein distance) for single-shot masses and shot-to-shot changes drops below the real machine’s own repeatability limits. Right: total passing checks (6 distributions × 4 held-out channels) climb from 1/24 for deterministic physics to 22/24 once shot-to-shot correlation is captured.
  • We evaluate our liquid simulator against real hardware weighings from our Hamilton Vantage, scoring full dispense distributions against real channel-to-channel repeatability.
  • Hill-climbing moves our twin from 1/24 to 22/24 held-out gates, cutting per-shot 1-Wasserstein error from 0.77 mg to 0.165 mg (below the 0.227 mg hardware limit), and generalizes to unseen forward runs at 0.113 mg.
  • The fluid model runs natively inside MuJoCo at rigid-body speed by mapping internal pipe flow, droplet air drag, drop retention, and moving liquid inertia onto lightweight mechanical primitives instead of full 3D fluid meshes.

Why full computational fluid dynamics is impractical

When an autonomous agent operates a liquid handler like the Hamilton Vantage, the interesting failure modes are physical. Trapped air in the barrel compresses behind a viscous reagent and lags behind the plunger. A small dispense clings to the tip orifice and gets shaken off over the wrong well during a fast move. Liquid shifts inside a tilted microplate as a robot arm carries it. If our simulator simply teleports volumes from source to destination, none of these failure modes exist, and policies trained or tested in simulation will miss them.

The textbook way to simulate liquid physics is computational fluid dynamics, where you divide the 3D volume into a grid of tiny cubes and solve the Navier–Stokes equations for air, water, and surface tension. At pipette length scales, two physical scaling laws make full computational fluid dynamics impractical for a real-time workcell twin:

  • Grid size scales as \(\Delta x^{-3}\). A 50 µL tip opening is about 0.4 mm wide, and the liquid neck where a drop detaches shrinks to roughly 10–20 µm. Even meshing a small 5 cm × 1 cm × 1 cm region around a single tip and well at 20 µm resolution takes about \(6 \times 10^8\) cells, and the Vantage has eight independent channels.
  • Surface tension caps the timestep. Capillary ripples cross a grid cell of width \(\Delta x\) in:
$$\Delta t_{\text{cap}} \lesssim \sqrt{\frac{\rho \, \Delta x^3}{2\pi \gamma}}$$

For water (\(\gamma = 0.072\text{ N/m}\)) at \(\Delta x = 20\ \mu\text{m}\), that requires timesteps around 4 µs, or more than 250,000 full-grid pressure solves per simulated second. Running a single 10-minute wet-lab protocol with full multiphase computational fluid dynamics would take days on a GPU cluster. Our workcell twin needs to run full protocols faster than real time on a CPU so we can iterate on agents and run large verification suites.

Building from MuJoCo’s primitives

Our simulator runs in MuJoCo, which avoids this bottleneck by dropping the 3D fluid grid altogether. When you enable MuJoCo’s built-in density and viscosity options, MuJoCo approximates each rigid body as a box or ellipsoid \((r_x, r_y, r_z)\) moving through an infinite still fluid and computes closed-form forces directly from its instantaneous local velocity \((\mathbf{v}, \boldsymbol{\omega})\):

$$\mathbf{f}_V = -6\pi \mu r_{\text{eq}}\,\mathbf{v}, \qquad \mathbf{g}_V = -8\pi \mu r_{\text{eq}}^3\,\boldsymbol{\omega}$$ $$\mathbf{f}_D = -\rho \Big[C_{D,\text{blunt}} A_{\text{proj}} + C_{D,\text{slender}}\big(A_{\max} - A_{\text{proj}}\big)\Big]\|\mathbf{v}\|\,\mathbf{v}$$

The linear Stokes terms \((\mathbf{f}_V, \mathbf{g}_V)\) dominate for slow, small droplets; the quadratic term \(\mathbf{f}_D\) blends blunt pressure drag with slender skin friction at higher speeds. MuJoCo’s ellipsoid model also includes added mass (virtual inertia from pushing surrounding fluid out of the way), angle-of-attack (Kutta) lift, and spin (Magnus) lift.

Because these forces have exact velocity derivatives, MuJoCo’s implicit integrator folds them directly into the rigid-body equations in microseconds per body. The limitation is that MuJoCo only models external flow around a solid in open space. It has no pipe walls, no compressible air cushion, no surface tension at a tip rim, and no tracked liquid volumes inside vessels. To capture real Vantage failure modes, we split the pipette into four physical zones (Figure 2) and model each zone with the simplest faithful representation.

Cutaway of a robotic pipette channel split into four physical regimes: internal hydraulics, capillary retention, external drop flight, and receiver well hydrostatics.
Figure 2. Four physical zones of a pipette. Rather than running a 3D fluid mesh, our simulator maps each zone onto a lightweight physical model inside MuJoCo.

Setting up the verifier from real hardware data

To hill-climb simulator fidelity without fooling ourselves, we need a measurement grounded in real hardware. Checking only whether the average dispensed volume matches the target is not enough. A trivial simulator that outputs a constant mass on every dispense can match the average exactly while missing every real spread, drift, and failure mode.

We built our verifier from archived Hamilton Vantage liquid-class verification runs, pairing every raw TCP motor command sent to the pipette with its corresponding weight measurement from an analytical balance.

Diagram of the simulator hill-climbing protocol: archived hardware traces split into calibration channels 1-4 and held-out test channels 5-8, replayed through the MuJoCo twin and scored by 24 1-Wasserstein checks plus a mandatory negative control.
Figure 3. Our hill-climbing protocol. Hardware logs are split chronologically by physical pipette channel. Channels 1–4 calibrate the model and establish the real hardware repeatability bar; Channels 5–8 are held out for evaluation.
Split Hardware Evidence Role in Calibration & Verification
Metering fit Earlier weighed partial dispenses across all 8 channels (viscous master mix, 1.006 g/mL) Fits the basic stroke-to-liquid ratio (0.9301 µL delivered per µL swept by the plunger)
Calibration split Channels 1–4 (earlier in the verification run) Fits variance and correlation parameters and measures how much real channels differ from each other
Held-out test Channels 5–8 (later in the verification run) Evaluated once without refitting across 24 pass/fail gates (6 distributions × 4 channels)
Forward transfer Separate later verification runs Tests whether the calibrated model holds up out of sample on unseen runs

To score each iteration, we replay the exact motor commands (repeating 12-shot cycles of 2.6, 2.7 and 2.8 µL) and compare six distributions—single-shot mass, shot-to-shot changes, 12-shot totals, and the three per-step buckets—using 1-Wasserstein distance (the average milligrams you have to slide one histogram to reshape it into the other). The pass threshold for each metric is the largest distance between any two real calibration channels on Channels 1–4. In other words, the twin passes on held-out Channels 5–8 only if it is statistically indistinguishable from another real channel on the same machine. A mean-only baseline is required to fail, every wire reply must match hardware, and total liquid volume must conserve to better than 10−7 µL.

Hill-climbing from 1/24 to 22/24 held-out gates

Scoring each iteration of our model on the held-out channels (Channels 5–8) gave us a clear curve to climb and pointed directly to what our deterministic model was missing.

Model Iteration (Held-Out Ch 5–8) Single-shot W1
(lim 0.227)
Shot-to-shot Δ W1
(lim 0.512)
12-shot total W1
(lim 1.240)
Lag-1 Cov
(real −0.401)
Cycle SD
(real 2.17)
Gates Passed
0. Mean-only baseline (dummy average) 0.808 mg 1.360 mg 1.408 mg 0.000 mg² 0.00 mg 2 / 24 (rejected)
1. Deterministic MuJoCo 0.770 mg 1.281 mg 1.650 mg 0.000 mg² 0.00 mg 1 / 24
2. + Partial physical variance 0.462 mg 0.839 mg 1.299 mg −0.002 mg² 1.59 mg 7 / 24
3. + Independent Gamma noise 0.227 mg 0.319 mg 1.891 mg −0.005 mg² 3.37 mg 15 / 24
4. + Shared serial covariance 0.165 mg 0.212 mg 1.312 mg −0.373 mg² 1.81 mg 22 / 24
Reference: Real hardware (Channels 5–8) — — — −0.401 mg² 2.17 mg 24 / 24
Left: empirical histogram of 288 real held-out balance shots overlaid with the narrow deterministic MuJoCo prediction and the calibrated twin plus serial covariance model. Right: normalized W1 distance divided by hardware limit across all 6 metrics and 4 held-out channels showing 22 of 24 gates passing.
Figure 4. Held-out distributions and per-channel gate breakdown. Left: deterministic MuJoCo matches the average (2.53 vs. 2.59 mg) but is too narrow (SD = 0.067 mg vs. real 1.02 mg); adding the calibrated serial model matches the real spread (pooled shot W1 = 0.079 mg). Right: error divided by hardware limit across all 24 gates. Every single-shot, shot-to-shot and per-step check passes across all four held-out channels.

Why independent noise fails 12-shot totals

When we added independent Gamma metering noise tuned to match the single-shot spread (0.972 mg vs. real 1.021 mg), single-shot error dropped sharply and passing gates jumped from 1/24 to 15/24. However, that model failed 0 out of 4 channels on the 12-shot cycle total.

Left: lag-1 serial covariance comparing real hardware (-0.401 mg^2), deterministic MuJoCo (0), independent gamma metering (-0.005), and physics plus serial covariance (-0.373). Right: resulting 12-shot cycle-total standard deviation showing independent metering over-dispersing to 3.37 mg while the serial model recovers 1.81 mg close to the 2.17 mg hardware value.
Figure 5. Why independent noise fails 12-shot totals. Consecutive balance readings on real hardware have strong negative lag-1 covariance (−0.401 mg²): a heavy reading on shot t is usually followed by a light reading on shot t+1. Independent noise misses that cancellation, inflating 12-shot cycle SD to 3.37 mg.

Adding a shared opposite-sign error term between adjacent shots recovered the −0.373 mg² covariance, brought 12-shot cycle SD down to 1.81 mg, and moved us to 22/24 held-out gates—generalizing to unseen forward runs at 0.113 mg per-shot error.

The MuJoCo modeling approaches underneath the twin

Matching gravimetric spreads on one verification run is only part of modeling real agent failure modes. The simulator also needs to respond physically when an agent does something unexpected, such as plunging too fast, using a narrower tip, braking sharply over a neighbouring well, or tilting a filled plate. We built four lightweight mechanisms directly on MuJoCo’s native solver to cover these behaviours.

1. Internal pipe hydraulics as a MuJoCo mass-spring-damper

Inside an air-displacement pipette, three physical effects govern how liquid follows the plunger. The trapped air cushion compresses like a spring (stiffness \(\propto P_0 / V_{\text{air}}\)). The liquid column’s inertia resists sudden acceleration like a mass. Viscous friction against the narrow tip walls resists flow like a damper, scaling steeply with tip radius as \(1/r^4\).

Because a mass, a spring, and a damper are native MuJoCo elements, we model each channel’s liquid column as a horizontal slide joint (axis="1 0 0", so gravity does not add a false vertical pressure head) with nominal area \(A = 10^{-6}\text{ m}^2\) (1 mm of motion equals 1 µL of fluid), coupled to the physical plunger piston by a <fixed> tendon spring:

$$m = L_{\text{hyd}} A^2, \qquad b = R_{\text{hyd}} A^2, \qquad k = \frac{P_0 A^2}{V_{\text{air}}}$$
Side-by-side mapping from a physical air-displacement pipette channel to native MuJoCo primitives: piston slide joint, fixed tendon spring for air-cushion compliance, horizontal column slide joint with mass equal to fluid inertance times A squared, and joint damping equal to Poiseuille resistance times A squared.
Figure 6. Hydraulics as mechanics. Mapping fluid inertia, viscous wall resistance and air-cushion compressibility onto a horizontal slide joint and fixed tendon lets MuJoCo’s implicit solver integrate the coupled plunger–air–liquid dynamics automatically.

2. Sampling MuJoCo’s ellipsoid air drag in a 1-sphere wind tunnel

Once a droplet leaves the tip, both linear Stokes drag (\(\propto \mu r v\)) and quadratic air resistance (\(\propto \rho r^2 v^2\)) slow its fall. Adding hundreds of free sphere bodies into the main workcell scene would slow collision detection and force a single air density across the room.

Instead, once at startup, we construct a tiny 1-DoF MuJoCo model of a single 1 mm sphere with fluidshape="ellipsoid", density="1.2" and air viscosity viscosity="1.8e-5", sample qfrc_fluid at wind speeds of 1 m/s and 2 m/s, and extract the exact Stokes coefficient \(a\) and quadratic coefficient \(b\). Individual droplet flights are then integrated on demand with an exponential midpoint step that stays stable even for sub-microlitre drops:

$$\frac{F(v)}{v} = a r + b r^2 v, \qquad \mathbf{v}_{n+1} = e^{-k h}\mathbf{v}_n - \mathbf{g}\,\frac{1 - e^{-k h}}{k}$$
Left: native MuJoCo hydraulic column air-cushion lag over 250 ms for tip radii 0.20 mm (199 Pa, 0.020 uL lag) vs 0.15 mm (629 Pa, 0.062 uL lag). Right: MuJoCo ellipsoid air-drag flight delay for 0.25, 1.0 and 2.5 uL droplets over a 10 mm fall.
Figure 7. Native MuJoCo mechanism sweeps. Left: narrowing tip radius by 25% (0.20 → 0.15 mm) triples viscous resistance (\(R \propto r^{-4}\)), tripling trapped air pressure (199 → 629 Pa) and air-cushion lag (0.020 → 0.062 µL). Right: air drag slows a 0.25 µL droplet by +0.236 ms over a 10 mm drop, 3.1× more than a 2.5 µL drop because drag-per-mass scales as \(r^{-2}\).

3. Accelerometer-driven drop pinch-off and live moving inertia

Small dispenses frequently cling to the pipette tip until either the tip touches a well wall or liquid surface, or a sharp motion shakes them loose. Rather than simulating a 10 µm neck pinching off, we place a native MuJoCo accelerometer sensor at each tip outlet and detach the hanging drop into flight whenever the outward axial load exceeds the rim’s surface-tension holding force:

$$m_{\text{drop}} \max\!\big(0,\, a_{\text{specific}, z}\big) \ge F_{\text{capillary}}$$

Because \(a_{\text{specific}, z}\) combines gravity and tip deceleration, braking a channel too aggressively can fling a hanging drop into the wrong well. Liquid weight also feeds back into the rigid-body dynamics: inside each tip, we track the ordered stack of liquid slugs and air gaps from seal to outlet and update the tip body’s mass, center of mass, and 3×3 inertia tensor (including any hanging drop) at every step. Inside microplates, we compute the exact gravity-normal water surface inside each tapered square well so that tilting or carrying a filled plate updates its physical mass and balance accurately.

How fluid physics improves agent evaluation and RL

All of this liquid physics feeds directly into the grading and reward signals for autonomous agents operating in our RL environments. Rather than checking whether an agent sent syntactically valid commands, the simulator evaluates what physically happened to every microlitre of reagent across the workcell. That surfaces real wet-lab failure modes that a simplified simulator would silently ignore:

Agent mistake Physical consequence in our simulator
Fixed aspiration height Source tubes start at different liquid levels and drop as plates are processed. Ignoring liquid-level detection or dipping too shallow draws air slugs into the tip and under-delivers to target wells.
Off-center dispense or closed lid Every dispense projects the 3D tip outlet onto the live pose of the 384-well plate and its lid. Missing a 3.3 mm well mouth or dispensing onto a lidded plate routes liquid into a tracked deck spill.
Wrong plate orientation Because well fills resolve in the plate’s actual 3D body frame, forgetting a 180° plate handoff from the robot arm lands reagents in the opposite corner of the 384-well plate.
Tip reuse or wrong source dip Each tip tracks its own internal liquid segments, residual wall film, and hanging drop, so reusing a tip across reagents immediately flags cross-contamination in the wells and source tubes.
Unsealed tip or over-aspiration Aspirating without a seated tip—or drawing past the tip’s volume limit—wets the internal pipette barrel, flagging hardware contamination.
Off-axis plunge or wrong eject height Driving off-center into a 3 mm-radius tube wall or too deep into a well floor triggers a MuJoCo contact collision, while ejecting at the wrong height leaves tips loose, crooked, or still mounted.

We are using this simulator to build bespoke, end-to-end wet-lab environments specifically designed to test frontier agentic reasoning under real physical constraints. In multi-step biology protocols, failures rarely happen in isolation—an agent that stalls mid-dispense and leaves loaded tips hanging on the pipette channels, then drives a shared plate gripper across the same carriage, triggers a real 3D collision that knocks tips crooked and contaminates the run. Evaluating agents against that level of physical fidelity is what separates toy lab benchmarks from systems that can safely operate real automated laboratories, and it is a core pillar of our work at Gamow Labs.

For RL training and agent benchmarking, this closes a major sim-to-real gap: an agent cannot pass a task by issuing plausible-looking commands if the underlying physics results in air aspiration, cross-contamination, or a spill. At the same time, testing protocols and recovery policies against these failure modes in silico makes our physical lab more robust, catching brittle liquid-handling sequences before they ever run on real hardware.

Conclusion

At Gamow Labs, building reliable autonomous wet labs depends on simulators that reproduce the real failure modes agents encounter on physical instruments. For liquid handling on the Hamilton Vantage, full 3D computational fluid dynamics is far too slow, while instant volume transfers miss the physics that actually matters.

By pairing a hardware-grounded distributional verifier (real Vantage wire logs, analytical scale weighings, held-out channels, and negative controls) with lightweight mechanical abstractions built directly on MuJoCo, we can systematically hill-climb fluid fidelity and verify that our in-silico environment holds up against real hardware.