DeepONet-FPO-demo / README.md
arabeh's picture
minor edits
f849e12
|
raw
history blame
1.76 kB
metadata
title: DeepONet FPO Demo
colorFrom: green
colorTo: green
sdk: gradio
sdk_version: 6.1.0
app_file: app.py
pinned: false
license: mit
short_description: Demo of unsteady flow around varied geometries

DeepONet FPO Demo (FlowBench)

This Space runs time-dependent DeepONet checkpoints (s ∈ {1,4,8,16}) to generate auto-regressive rollouts of 2D velocity fields (u, v) around complex geometries (FPO / FlowBench).

You have two runnable apps:

  • app_v1.py (GT + metrics)

    • Uses sample_cases/ containing the full target sequence.
    • Produces:
      • Ground truth vs prediction GIFs for u and v
      • Relative L2 error vs time plot + CSV, where [ \mathrm{rel}_L_2(t) = \frac{\lVert \hat{y}(t) - y(t) \rVert_2}{\lVert y(t) \rVert_2}. ]
  • app_v2.py (prediction-only, arbitrary rollout length)

    • Uses sample_cases/few_timesteps/ containing only the first 16 GT frames (enough to seed any checkpoint).
    • Produces:
      • Prediction GIFs for u and v for any number of rollout steps
    • User chooses rollout length N (seeding uses only the first s frames).

Sample format

Each sample uses two files:

  • sample_{id}_input.npy → SDF geometry: [1, H, W]
  • sample_{id}_output.npy → velocity sequence: [T, 2, H, W] (channels are u, v)

For v2, T = 16 and files must be located in:

  • sample_cases/few_timesteps/

Checkpoints

Checkpoints are downloaded from the Hub at runtime:

  • checkpoints/time-dependent-deeponet_1in.ckpt
  • checkpoints/time-dependent-deeponet_4in.ckpt
  • checkpoints/time-dependent-deeponet_8in.ckpt
  • checkpoints/time-dependent-deeponet_16in.ckpt

Repo ID used by both apps:

arabeh/DeepONet-FlowBench-FPO