Inside the plant: the same GD–simulation–AI loop, one level down

In short

  • The earlier posts simulated what each plant layout does to the ground. This one goes inside the facilities. The same loop applies: generative-design parameters, a GPU simulation of what each variant builds, OpenUSD and Omniverse Kit to look at it, and an AI that learns from the simulated variants.
  • A first check needed no GPU at all. With the textbook backwash assumptions, the washwater basin overflows 7.3 hours into the first day: ten washes produce about 12,900 m³ a day, and a 5 % return pump moves 6,250 m³.
  • For the clearwell, I simulated 198 baffle layouts with NVIDIA Warp in 120 seconds. More baffles mostly raise the contact-time ratio T10/T, from 0.29 without baffles to 0.58 for the design and up to 0.84. But whether the clearwell could be made smaller depends on a turbulence setting I cannot calibrate without a field tracer test, so by the rule I fixed beforehand, I make no claim that it can.
  • The 198 simulated layouts became training data. A surrogate learned T10/T from the design parameters and, on a plan shape it had never seen, made 10 wrong calls at the decision line where a fitted path-ratio line made 23.

Synthetic plant, assumed unit costs and rates, no client data. Every pass/fail rule was written to a file before its run.

A dye pulse through three clearwells in Omniverse Kit

This is a companion to the plant-layout case and the method post. The batch side of all the cases, this clearwell stage included, is collected in Every alternative, at once.

Why go inside the facility

The layout tool already draws each facility in detail, from the design standard: compartments, serpentine baffles, perforated walls, filter cells, pipes, all at the computed water levels.

The detailed plant model in Omniverse Kit

The flood studies in this series never used that detail. On the finished ground, a basin is a block with a wall height. The detail matters for a different question: what happens to the water inside the plant. Two checks follow from the model's own numbers.

A check that needs no GPU: the backwash water balance

Filters are washed with treated water, and the wash water goes to a washwater basin, from which a pump returns it to the head of the plant. The tool sized this from textbook rules: ten filter cells, each washed once a day at 50 m/h for 15 minutes, and a return pump at 5 % of the plant flow.

A three-day tank balance, minute by minute:

  • Ten washes produce 12,862 m³ a day, about 10 % of production. The return pump moves 6,250 m³ a day.
  • The washwater basin (2,652 m³ usable) overflows 7.3 hours into the first day and spills about 6,600 m³ every day after.
  • The smallest return pump that never overflows, with the washes spread over the day: 10 % at these rates, 5 % if the wash is 40 m/h for 10 minutes, 15 % and 8 % if the activated-carbon cells are washed too. With all washes in the day shift, even 15 % is not enough at 50 m/h.
  • Washing all ten filters in the day shift also draws the clearwell down to 0.09 m above its floor, below the pump suction limit of 0.5 m.
Backwash water balance

This is not a defect of a real plant; every rate here is an assumption. It is a case of assumptions that disagree, found by putting the design numbers through time. It took a few lines of NumPy and no GPU. I include it because a detailed model should be run as a system, not only drawn.

The clearwell: does the baffle layout change the size you need?

A clearwell holds treated water long enough for disinfection to work. What counts is not the average time but the time by which the first 10 % of the water has left, T10. The ratio T10/T, where T is volume divided by flow, measures how close the tank is to plug flow. Baffles are how designers raise it.

The question for the loop: if a different baffle layout raises T10/T, the same contact time fits in a smaller tank. I fixed the rule before running: claim it only if some layout reaches the design's T10 with at most 85 % of its volume, at all three turbulence settings tested.

The model, and checking it

  • Flow: 2D depth-averaged flow, solved with a lattice Boltzmann scheme in NVIDIA Warp on the GPU, many layouts at once. Walls, an inlet and an outlet; bottom friction; an eddy viscosity for turbulence.
  • Dye: particles released as a pulse at the inlet, carried by the flow with random-walk mixing. Their exit times give the residence-time curve, T10 and T10/T.
Checking the clearwell model

The first run failed one of my checks: the mean exit time came out between 1.22 and 1.47 T on the three grids, instead of about 1.0. The inlet boundary was passing only 77 % of the design flow, and the particles were reporting it faithfully. I now calibrate the inlet velocity per layout until the measured flow is within 2 % of the design flow. After that:

Check (set before the run)Pre-setResult
Mean exit time ÷ T, at 0.5 / 0.25 / 0.125 m grids0.95–1.051.011 / 0.989 / 0.982
T10/T, 0.25 m vs 0.125 m grid≤ 0.02 apart0.008
Dye recovered≥ 98 %100 %
No baffles below the designyes0.28 < 0.58 (check run)

198 layouts in two minutes

The batch covered three plan shapes of the same area, one to nine channels, end gaps of 2 to 5 m, and two inlet positions: 198 layouts, 120 seconds on the GPU, including the flow calibration. The maps show where the water moves and where it sits.

16 clearwell layouts as flow maps

In Omniverse Kit, the same particles show the difference at a glance. Without baffles the dye short-circuits along the diagonal and leaves a dead corner; with nine channels it moves as a front.

A dye pulse through three clearwells, rendered in Omniverse Kit

30 of them on one stage

A chart of 198 numbers hides the reason behind each one. So I put 30 of the layouts on one Omniverse Kit stage, each with its own dye pulse from the same Warp particle run: three plan shapes of the same area, one to nine channels, end gaps of 2 m and 5 m. Each tank sits on a pad coloured by its verdict, with a bar and the number for its T10/T.

30 clearwell layouts on one Omniverse Kit stage: dye pulse and verdict

What the stage shows, with the numbers from the batch run:

  • Without baffles the dye cuts across. All three plan shapes short-circuit along the diagonal: T10/T 0.285 (design plan), 0.242 (square) and 0.371 (long, which has the longest natural path).
  • With 2 m gaps, nine channels beat no baffles on every shape, but at different rates. The square plan clears the line at five channels (0.769) and reaches 0.839 at nine. The design plan needs seven (0.726). The long plan needs nine (0.718), and three channels in it scored lower than no baffles (0.334 against 0.371).
  • With 5 m gaps, the gain stalls or reverses. On the design plan, nine channels score 0.635, below seven (0.643). On the square plan the value falls from 0.704 (five) to 0.687 (seven) and 0.650 (nine). I have not traced why; the flow maps above are where I would look first. The long plan never reaches the line.
  • 8 of the 30 tanks clear the line, 6 with 2 m gaps and 2 with 5 m gaps. On the stage the effect of the gap is visible at once, where the table only lists it.

These verdicts use the base turbulence setting. As shown below, the decision to shrink the tank does not survive the turbulence check; the ordering on this stage is what the model supports.

What the batch says

T10/T across the layouts, and the turbulence check
  • Baffles mostly help. On the design plan, T10/T rises from 0.29 with no baffles to 0.58 for the 5-channel design and 0.79 with nine channels and 2 m gaps. A square plan with nine channels reached 0.84. Wide end gaps flatten the gain: at 5 m, nine channels reach only 0.63.
  • At the base turbulence setting, a smaller tank looks possible. Nine channels on the same plan reach the design's T10 with 74 % of the volume; the square plan with nine channels, 69 %.
  • But the claim does not survive the turbulence check. At the higher eddy viscosity (0.01 m²/s), the design itself reaches 0.68, and neither nine-channel layout clears the line (93 % and 88 % of the volume). Three of the six runs at the other two settings also fell outside the mean-time band of the first check: the square plan at both (1.46 and 1.05) and nine channels on the design plan at 0.01 (0.93). By the rule I wrote before running: no claim that the clearwell can shrink.
  • What holds, more weakly, is the direction. At all three settings, nine channels gave a higher T10/T than the five-channel design. This was not a pre-set test, and only five against nine channels was compared at the other settings.

The model can order these layouts; it cannot size them without calibration. The step that would settle it is a tracer test on a real clearwell, used to pick the eddy viscosity. That is a normal commissioning measurement, not a research project.

The layouts as training data

The 198 simulated layouts are a labelled dataset that the design process produced by itself: design parameters in, T10/T out. This is the extended GD–AI loop at facility scale.

A surrogate taught by the simulated layouts
  • Baseline: a straight line in the logarithm of the flow-path length-to-width ratio, fitted to the training rows: the shape of the classic rule of thumb.
  • Surrogate: gradient boosting on the GD parameters (plan size, channels, gap, inlet) and two values derived from them, channel width and the log path ratio. The two derived values carry 91 % of the importance.
  • Tests fixed beforehand: shuffled 5-fold cross-validation, and a plan shape the model never saw (trained on the other two shapes, tested on the square).
  • Result: cross-validated error 0.009 against 0.056 for the line. On the unseen shape, error 0.042 against 0.070, and 10 wrong calls at the decision line out of 66, against 23. The surrogate met the pre-set rule (at least 20 % better, and better on the unseen shape).

The surrogate learns what its teacher knows. Its labels carry the same turbulence uncertainty as the simulation, so it inherits the "ordering yes, sizing not yet" verdict.

What this adds to the method

  • Run the detailed model as a system. The backwash imbalance appears only when design quantities are put through a day of operation.
  • Check the boundary condition before the physics. The mean residence time must equal volume over flow; my first run broke that, and the fix was at the inlet, not in the solver.
  • Separate ranking from sizing. A model can be trusted to order alternatives long before it can be trusted for absolute values. Say which one you claim.
  • The GPU's role here is breadth. Two minutes for 198 layouts is what makes the map, the dataset and the surrogate possible.

Process and tools

StepToolWhat it does
Design modelPlant-layout tool (Python/NumPy)Facility templates from the design standard: compartments, baffles, levels
CriteriaJSON with hashFixed before each run (backwash, clearwell, surrogate)
Backwash balanceNumPy3-day minute-by-minute tank balance, schedule and rate sensitivity
Clearwell flowNVIDIA Warp on an NVIDIA GB102D lattice Boltzmann, batched layouts, CUDA graphs, inlet-flow calibration
Residence timeNVIDIA WarpParticle tracking with random-walk mixing, T10/T50/T90
ReviewOpenUSD, Omniverse Kit 110.3 (RTX, headless)Walls from the simulation grid, dye particles per time step
AIscikit-learnGradient boosting vs the path-ratio line, cross-validation and unseen-shape test
Figuresmatplotlib, Kit viewport capturesGenerated from the saved results

Site, terrain, rates and unit costs are synthetic or assumed; no real client or site data. The 2D clearwell model compares layouts; it does not certify disinfection contact time.

In this series: The "optimal" plant layout flooded on its own ground · Linking generative design to simulation (method) · Design review in Omniverse Kit · Cross-checking against HEC-RAS 2D · Case 2: the road alignment · Every alternative, at once · LinkedIn newsletter (all seven posts)

댓글

이 블로그의 인기 게시물

Structural Analysis Workflow with Dynamo and Robot

Dynamo with the Gemini Vision API test(Nano Banana)

Geometry test 0506 stair and routing