Cross-Domain Workflows
The actual reason for one runtime: a room’s geometry becomes a CFD domain becomes a live control loop, without leaving the script.
BIM Room → CFD → HVAC Controller
NEW BIM PROJECT UNITS "mm" SET ?bim
AFTER BIM ?bim WALL FROM 0,0 TO 6000,0 HEIGHT 3000 THICKNESS 200 SET ?wall1
AFTER BIM ?bim WALL FROM 6000,0 TO 6000,4000 HEIGHT 3000 THICKNESS 200 SET ?wall2
AFTER BIM ?bim WALL FROM 6000,4000 TO 0,4000 HEIGHT 3000 THICKNESS 200 SET ?wall3
AFTER BIM ?bim WALL FROM 0,4000 TO 0,0 HEIGHT 3000 THICKNESS 200 SET ?wall4
AFTER BIM ?bim ROOM BOUNDARY [?wall1 AND ?wall2 AND ?wall3 AND ?wall4] NAME "Ward A" SET ?ward
AFTER CAD ?ward FACE AT 100,2000,1500 SET ?supplyFace
AFTER CAD ?ward FACE AT 5900,2000,1500 SET ?returnFace
AFTER SIM MESH ?ward ELEMENT SIZE 300 SET ?air
AFTER NEW SIM FLUID "Air" DENSITY 1.225 VISCOSITY 0.0000181 SET ?airFluid
AFTER SIM ?air ASSIGN FLUID ?airFluid
AFTER SIM ?air VELOCITY INLET 0.2,0,0 ON FACE ?supplyFace
AFTER SIM ?air PRESSURE OUTLET 0 ON FACE ?returnFace
AFTER NEW SIM STUDY "cfd_steady" ON ?air SET ?study
AFTER SIM ?study SOLVE SET PROMISE ?results
AFTER WAIT FOR ?results SET ?solution
AFTER SIM ?solution EXTRACT CONCENTRATION "co2" SET ?co2
AFTER NEW BLOCK DIAGRAM SET ?model
AFTER BLOCK ?model ADD "constant" VALUE ?co2("relative_max") SET ?model
AFTER BLOCK ?model ADD "pid_controller" P 1.2 I 0.05 D 0.01 SET ?model
AFTER BLOCK ?model CONNECT 0 TO 1 SET ?model
AFTER BLOCK ?model SIMULATE DURATION 600 STEP 1 SET ?trace
AFTER EMIT "Stalest air: " & ?co2("relative_max") & " x well mixed; fan demand " & ?trace("final")
Room → mesh → fluid solve → controller, and every arrow is a value one verb answers and the next one takes, not a new integration. The room is the void its walls enclose, so it meshes as the air in it; air enters across one wall and leaves across the opposite one. EXTRACT CONCENTRATION answers how stale the air is, relative to a perfectly mixed room (see Simulation, FEA & CFD), and the controller's output is the fan demand that answer calls for.