Skip to content

3D layout

The optional files layout/site-plan.yaml (kind site_plan: site box, plot areas, roads, pipe racks), layout/building.yaml (kind building: buildings, levels, column grid) and layout/equipment-placement.yaml (kind placement: position, rotation, mount: {building | structure, level}, nozzle overrides and declared access platforms of each equipment-list tag) describe the plant in 3D, in metres, x east, y north, z up, origin at the site's south-west corner (see the template's layout/README.md). An item's shape and size come from the equipment list: its DEXPI type picks a parametric family (domains/spatial/shapes.py: vessel, column, tank, shell-and-tube or plate exchanger, air cooler, pump, compressor, turbine, filter, silencer, stack, generic) and its dimensions the overall size; the placement's shape overrides the shape and its size is only a fallback for an item without dimensions. Each file is checked against its schema, then:

rule level finds
cheme.layout-outside-site error an area, road, rack, building or equipment item extending outside the site box
cheme.layout-clash error two equipment items intersecting (plan outlines, and the parts standing out of them such as a tank's stair); equipment intersecting a building it is not placed in; equipment on a road (or road area); equipment reaching into a rack's height band (lowest tier - 0.5 m to top tier + 0.5 m) under its footprint; a building on a road, a rack running through a building below its top + 0.5 m, or two buildings overlapping
cheme.layout-unknown-tag error a placed tag that is not in the equipment list (or piping/special-items.yaml)
cheme.layout-not-placed info an equipment-list item without a placement (only when a placement file exists)
cheme.layout-level error an unknown building or level, z more than 0.05 m from its level's elevation, or an item outside its building's footprint; as a warning, an item taller than its level's clear height, or placed in a building with levels but without a level
cheme.layout-area-overlap warning two plot areas overlapping (roads excepted)
cheme.layout-duplicate warning an id or tag listed twice
cheme.layout-line-route warning a line of piping/line-list.yaml whose ends lie in different areas, or further apart than max_unsupported_length (site plan, default 30 m), and that no rack carries: an end further than rack_reach (default: max_unsupported_length, as the run from an end to the rack is unsupported) from every rack centreline, or the racks at its two ends not connected; names the ends, their areas, the distance and the nearest rack
cheme.layout-line-length info such a line that racks do carry, with its length estimated along the rack centrelines
cheme.layout-line-unrouted info a line one of whose ends is a tag of the equipment or piping-items list, or a tag drawn on a sheet, that is not placed, so its route cannot be checked
cheme.layout-separation warning a declared separation (site plan separations) not kept, e.g. K-4101 to CB-1: 32.3 m < 50.0 m (1 x height 50 m; D-026; toppling); or one naming an id that is not on the plot plan
cheme.layout-size-from-placement info items sized by the placement's size instead of dimensions in the equipment list (one finding listing them)
cheme.layout-size-ignored warning a placement size for an item that has dimensions
cheme.layout-size-missing warning an item with neither, drawn at its family's assumed size
cheme.layout-nozzle-unknown error a nozzle override naming a nozzle the item's P&ID does not draw
cheme.layout-unreadable error (cheme serve only) a layout file that exists but cannot be read, e.g. a symlink out of the repository

A line's end is a placed tag (K-4101/N2 counts as K-4101; a piping item of piping/special-items.yaml may be placed too), an area id, the line's from_area / to_area (an end that is no placed item, e.g. a vent area), or another line's number, then the point of that line (the straight run between its own ends) nearest the other end. Racks are connected where their strips touch or cross. A separation is {from, to, min_m | min_factor_of_height, height_of: max|from|to, measure: footprint|centre, reason, basis} between placed tags, areas, buildings, roads, racks or site-boundary; the height is the top of the item (a building's highest level), and distances are horizontal, between footprints unless measure: centre. cheme show <tag> --layout prints the measured distances from an item (or building, area, road, rack) to the nearest items, buildings, roads, racks and areas and to the site boundary, so DESIGN.md can quote measured values. GET /api/layout returns each line's route as lines: [{number, from, to, from_point, to_point, distance, length_est, racks, finding}].

The generated model. cheme layout build [--check] [--force] derives layout/plant-model.yaml (kind layout_model) from the layout files, the equipment list (type, dimensions), the line list and the P&IDs: every placed item's parts (cylinders, heads, cones, boxes with a material hint), its nozzles from the P&ID (point, outward direction, DN, lines and segments; placed from the side of the symbol they are drawn on, or overridden in the placement) and its maintenance envelopes (bundle pull, motor removal, pump access), plus the site geometry. Commit it with its inputs. cheme validate reports cheme.layout-model-edited (error), -version, -outdated (warnings) and -missing (info); cheme impact lists an outdated model. The format and the /api/layout contract: docs/framework/layout-model.md.

Cable trays. With electrical/electrical-list.yaml (rooms in buildings, the motor list's powers, junction boxes) the build cables the plant: a motor for every driven item, instruments where the P&IDs measure, junction boxes, power and instrument trays from the rooms along the racks' own tray tier to the loads, sized by their cables, and the cable schedule (cheme layout cables). Rules, rooms and the schedule: docs/framework/electrical.md.

HVAC ducts. With layout/hvac.yaml (air handling units, rooms with their air changes) the build ventilates the buildings: terminals in each room, supply and extract ducts from the unit routed inside the building, the intake and exhaust to their louvres, each duct sized within its velocity limit (findings layout-hvac-capacity, -duct-unrouted, -clash-duct; skill hvac-ducts). The sections and rules: docs/framework/layout-model.md.

Access and lifting. The rules on the model check headroom over every walking surface (stairs, landings, platforms, structure floors), a free standing space in front of valves, transmitters and casing hatches (a stair flight is no operating position), the walk beside a stacked stair's next flight, ways off a roof inside a vent zone, and the operators piping/routing.yaml declares for what stays out of reach (operators: chain wheel, extension spindle, remote operator, remote-mounted transmitter, each within an ASSUMED limit). cheme layout lifting gives the lifting study of the heavy items: working radius, gross load, load moment, capacity needed, lift and hook height, lane and laydown, checked against crane load charts in layout/crane-chart.yaml when the project has chosen a crane (gate lifting-study). Details: docs/framework/layout-model.md.

Material take-off and estimate. cheme assess mto counts the model's bulk materials (pipe by DN, class and insulation; elbows, tees, reducers, flanges, gaskets; valves by type and DN; steel tonnage by section; grating, insulation and concrete); cheme assess estimate prices them with the project's estimate/rates.yaml (every rate with status, source and year; cheme-as-code ships no prices, the template's file is an example) by the factor method. --write puts them into estimate/; the gate kind: mto checks they are current. cheme assess equipment costs the equipment list from the published purchased and bare module cost correlations of Turton et al. (CAPCOST, 5th ed. 2018, Appendix A; package data with the table of every row), escalated by the CEPCI value the project gives with its year and source in estimate/cost-basis.yaml; an item outside a correlation's range or without its size or factors is a finding, never extrapolated, and the report states its AACE 18R-97 class. Rows, rules and GET /api/mto: docs/framework/mto.md.

A design case's LCI dataset. cheme assess lca --dataset|--write|--check --case <id> derives the unallocated LCI dataset of another computed flowsheet case. It uses the study's scope, reference product and functional unit, and an id (<dataset id>-<case>), title (<title>, case <case>) and uuid (uuid5(<base uuid>, "case:<case>")) that name the case. --write writes it to lca/datasets/<dataset id>-<case>.yaml (generated: a header comment and provenance; never over a file it did not generate, cheme.lca-dataset-not-generated). --check exits 1 with cheme.lca-dataset-stale when that file is missing or differs. An undeclared case exits 2 and lists the declared ones. The study's own case is lca/dataset.yaml, unchanged. Details: docs/framework/lci-scenarios.md, ADR 0045.

Techno-economic analysis. cheme assess tea evaluates the economics against the decision estimate/tea.yaml states (npv, irr, lcop or cash cost and a threshold). It works for continuous and batch plants, in one or several operating cases, for material and energy main products.

  • Capital: built up from the equipment or take-off estimate, or from a reference cost scaled to the plant's capacity (ISBL, then OSBL, owner's cost and contingency). Its AACE class is checked against the stage.
  • What the plant buys and sells: the flowsheet's feeds and products, their components, consumables it does not carry, and emissions with a carbon price and free allocation. Each is priced with the project's prices (status, source and year on each; cheme ships none), with price paths over the life.
  • Fixed cost and periodic events: replacements, turnarounds and grants.

The result is the discounted cash flow (NPV, IRR, LCOP and cash cost of the main product, payback; tax losses credited or carried forward), plus:

  • the cost of production per unit;
  • scenarios;
  • a tornado and the break-even value of every input, i.e. what would change the decision;
  • with uncertainty:, a seeded Monte Carlo (P10/P50/P90, P(meets), Spearman drivers).

--compare REV lists the premises two analyses do not share (product, specification, boundary, scale, location, currency and cost year, case, operation, discount and tax rate) before their results. Gate kind: tea, GET /api/tea and the viewer's TEA page: docs/framework/tea.md.

The model also holds steel (layout/structures.yaml frames and generated rack bents), access platforms (declared in the placement's access:, or proposed with review_needed), zones (layout/zones.yaml) and a pipe route for every P&ID segment. The router is deterministic: a line goes over the racks when its ends lie in different areas, its straight run would cross a road or another area, or it is longer than local_max_m (15 m); it rises near the equipment, enters the rack at the point nearest each end and takes a lane of its own. Local lines run at the pipe-way elevation (local_elevation_m, 3.5 m), pump suction and discharge runs at grade. Battery-limit ends (BL, CW, CWR) go to a battery_limits: point or rack end of piping/routing.yaml, else the nearest rack end; a line with battery limits at both ends (a header) runs along a rack from end to end, or between the points of two matching rules. Each pipe records how (method) and why (reason) it was routed. cheme layout report lists every line routed, skipped or unrouted with the reasons and the counts per method and reason; layout route --line L reroutes some lines, layout pin keeps a route or platform, layout render --plan | --section x=.. [--png] draws plans and sections. Gates of kind layout-model (template: layout-plot-plan, layout-3d, layout-detail) turn this into stage requirements, and the skills layout-yaml, pipe-routing, structures-access, area-classification and review say how to work with it. What the layout does not do (pipe stress, supports, isometrics, structural design, HVAC and cable trays, dispersion, CAD export beyond glTF and STL) is listed in domains/spatial/README.md.

Equipment is compared by its outline in plan over the height of its box: a circle for a vertical cylinder or sphere, else its rectangle turned with it; against other equipment also by the solid parts standing out of that outline (a tank's stair, a base plate, a plinth); buildings turn in steps of 90 degrees; roads and racks are strips of their width along their centrelines, closed at the bends. A level is as high as its height, else up to the next level, else 4 m (a floor) or a 0.2 / 0.3 m slab (platform / roof); a building without levels is 6 m high. Touching is not a clash. Numbers must be finite (no .inf / .nan), ids not empty, and a round shape takes size: {diameter, ...} (a list is for box only). The layout rules run only when every layout file present passes its schema. Further reading: the generated model and its rules in Layout model, cable trays in Electrical, and every cheme layout subcommand in the CLI reference.