Cross-checking a GD loop against HEC-RAS 2D, inside one USD file

In short

  • One cross-check of one plan proves little. I compared my GPU solver, NVIDIA Warp, with HEC-RAS 2D on all four plans that compete for the decision: the current plan, the GD-balanced plan, the GA optimum, and the optimum after repair.
  • The danger verdicts agreed at all 56 facility aprons, so the loop's decision holds under the industry-standard solver too: after repair, the current plan A is the cheapest of the cross-checked plans with no danger (plan D, found later by the flood-aware GA, was not cross-checked). HEC-RAS was deeper at every apron, by 0.02–0.12 m on average per facility.
  • Both results live in the same OpenUSD file and sit side by side in Omniverse Kit (280 values read back, 0 mismatches). If the AI training labels were shifted by the measured difference, 0.17 % of them would flip from safe to danger (at most 1.63 %). I did not re-score the surrogates.
  • Why this matters for AI: in the extended GD–AI loop the simulation is the AI's teacher. Checking the solver against HEC-RAS is also checking the training data.

Synthetic site, assumed unit costs, no client data.

Four plans, two solvers

This is a companion note to the plant-layout case. It follows the same frame as the rest of the series: GD alternatives, simulation on what each alternative builds, OpenUSD and Omniverse Kit, and the place of AI.

The question

In the main post, HEC-RAS checked one plan, the GA optimum before repair. The flooded areas overlapped with an IoU of 0.94 (overlap of the two flooded areas, flooded meaning at least 0.10 m deep), and the danger verdicts agreed 14 of 14. That shows the solver can be trusted on one terrain. It does not show that the loop's decision would survive a different solver. The decision was: after repair, the current plan A (1.802 bn KRW) is the cheapest of these plans with no danger, 0.019 bn ahead of the repaired optimum C (1.821 bn KRW).

Criteria fixed before any new run (file hash logged):

  • Per plan:
    • flooded-area IoU ≥ 0.70;
    • apron depth difference within max(0.10 m, 20 % of the HEC-RAS value), where the apron is the 3 m strip around each facility;
    • a danger verdict (apron ≥ 0.30 m) for every facility.
  • Decision: unchanged if every facility of every plan gets the same verdict from both solvers.
  • AI: shift every training label by the measured difference and count flipped verdicts; ≤ 2 % counts as insensitive.

There were three new HEC-RAS runs (A, B and C repaired); C original reuses the main post's run. The flood-aware GA's plan D is not included because its finished terrain was not stored, so the conclusion covers plans A, B and C.

GD: four plans, two solvers

PlanFlooded-area IoUApron within toleranceDanger verdicts
A current0.95112 / 14agree (no danger)
B GD balanced0.93512 / 14agree (no danger)
C optimum, original0.94213 / 14agree (clearwell, sludge basin)
C optimum, repaired0.92813 / 14agree (no danger)
  • The decision holds. No plan gained or lost a danger verdict, so no repair would change and plan A stays ahead.
  • HEC-RAS is deeper at every apron; only shallow ones fall outside tolerance.
    • The 6 aprons outside tolerance all have Warp ≤ 0.15 m.
    • The activated-carbon apron that failed in the main post's check fails again in the repaired C plan, and is within tolerance in A and B. Its cause is still not identified.
  • One near miss. At plan B's washwater basin, Warp gives 0.13 m and HEC-RAS 0.296 m, just under the line. With a slightly different storm, that verdict could split. B is not the cheapest plan, so even a split there would not change the decision.
Four plans as maps

The maps show where the differences are:

  • The channel: agrees in every plan.
  • Wet in HEC-RAS only (orange): thin bands along cut-basin edges and structure walls.
  • Wet in Warp only (purple): just 36–43 cells per plan.
  • Dark-blue squares in the difference column: inside open basins in plans A and C original, where Warp is deeper. On the aprons, which decide the verdicts, HEC-RAS is deeper everywhere.

Omniverse: one file, two solvers

The four plans are variants of one OpenUSD file. Each variant holds:

  • the finished terrain,
  • a Warp max-depth layer and a HEC-RAS max-depth layer,
  • per facility: both apron depths, both verdicts and the tolerance check, as attributes.

Read back in Kit, 280 values matched with 0 mismatches. A reviewer switches the plan, then the layer, and sees where the two solvers disagree without leaving the file. HEC-RAS also leaves a thin film on some roofs that Warp does not; it stays below the 0.10 m threshold, and I have not investigated it.

One plan, two solvers, in Kit

Laid out together on one stage:

  • Rows: Warp at the back, HEC-RAS in the middle, and in front the cells wet in only one solver.
  • Bar height: the number of those cells, 197, 245, 242 and 281 for plans A, B, C original and C repaired.
  • Pads: all green, because the danger verdicts agree.
Four plans × two solvers in one Kit stage

All four plans, layer by layer, on the same stage:

Four plans, two solvers, in Kit

AI: what a different ground truth does to the labels

Label sensitivity

In the extended GD–AI loop, generative design proposes the layouts, the simulation labels them, and the AI learns from those labels. So the solver is not only a checking tool; it decides what the AI is taught. The surrogates in the plant case were trained on Warp. If HEC-RAS is the better reference, how many of their training labels would change? I took each facility's HEC-RAS − Warp difference from the four plans and added it to all 7,784 labels (556 plans × 14 facilities):

  • mean difference: 0.17 % of danger labels flip
  • each facility's smallest difference: 0.05 %; largest: 1.63 %
  • every flip goes from safe to danger

By the pre-set reading, the labels are insensitive to the choice of solver. That is a statement about the labels: I did not retrain or re-score the surrogates. Each difference rests on at most four plans, so the range matters more than the mean.

What this adds to the method

  • Cross-check the decision, not just the solver. Agreement on one terrain is a property of the solver. Agreement across the plans that compete for the decision is what makes the loop's answer trustworthy.
  • Keep both answers in the same file. A second solver as a second layer on the same USD prims makes disagreements visible at review time, instead of in a separate report.
  • Propagate the reference uncertainty into the AI. If the ground truth would change with the solver, the surrogate's labels would too. Here at most 1.63 % would, and that can now be stated with a number.

Appendix: running HEC-RAS 2D without the GUI

HEC-RAS 7.0.2 documents a GUI workflow for 2D meshes. These are the steps I scripted instead:

  1. Write the terrain as a GeoTIFF with an explicit WKT projection (the bundled GDAL cannot look up EPSG codes). Pad it by 4 cells so the perimeter faces sit on terrain.
  2. Build the terrain HDF with RasProcess.exe CreateTerrain units=Meters stitch=true prj=… out=….
  3. Write the geometry file by hand: the 2D area perimeter, computation points at our 2 m cell centres, and boundary lines. Place the boundary lines just outside the perimeter: HEC-RAS rejects them inside it, and also rejects corner faces shared by two lines.
  4. Write the unsteady-flow file: normal-depth outlets, the upstream inflow hydrograph, and a precipitation hydrograph on the 2D area.
  5. Start the plan file from a shipped example plan. Then set the full-momentum (SWE) equation set, a 1 s step, and metric gravity (9.80665, not the template's 32.17).
  6. Compute with Ras.exe -c <project.prj> <plan.p01>. On the first run, HEC-RAS shows a terms dialog once. If the Windows UAC prompt is not answered, the run aborts without an error message.
  7. Read the maximum water surface per cell from the result HDF with h5py.

Process and tools

StepToolWhat it does
DesignPlant-layout GD tool (Python/NumPy)Four plans: A, B, C original, C repaired
CriteriaJSON with hashFixed before any new HEC-RAS run
SimulationNVIDIA Warp 2D (GPU) · HEC-RAS 7.0.2 2D (CPU, scripted)Same terrain, rain, inflow and 2 m cells; three new HEC-RAS runs
ComparisonNumPy, h5pyIoU, apron tolerance, danger verdicts per plan
ReviewOpenUSD, Omniverse Kit 110.3VariantSet "plan", two water layers, 280 values read back
AITraining labels from the plant caseShifted by the measured difference, flipped verdicts counted
Figuresmatplotlib, Kit viewport capturesGenerated from the saved results

Site, terrain and unit costs are synthetic or assumed; no real client or site data.

댓글

이 블로그의 인기 게시물

Structural Analysis Workflow with Dynamo and Robot

Dynamo with the Gemini Vision API test(Nano Banana)

Geometry test 0506 stair and routing