diff --git a/research/karman_reproduce/run.py b/research/karman_reproduce/run.py index 4c589d3..a9905ce 100644 --- a/research/karman_reproduce/run.py +++ b/research/karman_reproduce/run.py @@ -34,7 +34,7 @@ import numpy as np L0, U0, NX, NY = 20.0, 0.01, 1280, 512 R, YC = L0 / 2, (NY - 1) / 2 -SI, INTERVALS, WARMUP = 800, 200, int(4 * NX / U0) +SI, INTERVALS, WARMUP, FIFO_LEN = 800, 200, int(4 * NX / U0), 150 BIAS = np.array([0.0, -4.0, 4.0]) @@ -73,7 +73,9 @@ def main(): probes = [sim.add_body("sensor", center=(40 * L0, YC + dy, 0.0), radius=5.0) for dy in (40.0, 0.0, -40.0)] sim.initialize() - sim.run(WARMUP) # Legacy order: disturbance + probes first, then the pinball + # Legacy build_karman_cloak order: stabilize disturbance + probes, then the + # 150-interval zero-action target sampling (kept as flow time), then the pinball. + sim.run(WARMUP + FIFO_LEN * SI) pinball = [sim.add_body("circle", center=c, radius=R) for c in ((30 * L0, YC, 0.0), (626.0, YC + 15, 0.0), (626.0, YC - 15, 0.0))] sim.sync_bodies() @@ -102,7 +104,7 @@ def main(): with open(os.path.join(args.out, "case.json"), "w") as fh: json.dump(dict(celeris=git_head(here), dynamis=git_head(args.dynamis), config=os.path.realpath(args.config), model=os.path.realpath(args.model), - norm=os.path.realpath(args.norm), warmup=WARMUP, interval=SI, intervals=args.intervals, + norm=os.path.realpath(args.norm), warmup=WARMUP, target_sampling=FIFO_LEN * SI, interval=SI, intervals=args.intervals, probe_cells=cells), fh, indent=1) finally: sim.close()