Skip to content

Calcs (ctx.calc) ​

The calculations a script runs with ctx.calc({ calc: "<id>", inputs }): 28 calcs. Each returns its values with their units. ctx.calcs() lists them from inside a script.

CalcTitleDomainWhat it does
mech.duct_frictionDuct friction rate and velocitymechanicalVelocity, velocity pressure and friction rate (in. w.c. per 100 ft) for an airflow in a round or rectangular duct: Darcy–Weisbach with Colebrook (or Altshul–Tsal), the material's roughness, and air density and viscosity at the altitude and temperature. The same engine as the duct pressure report.
mech.duct_system_pressureDuct system static pressure (fan ESP)mechanicalThe kernel's duct pressure report for one system on the plugin interface: friction for every stretch, each fitting's C x VP with its coefficient source, the critical path, and the external static pressure the fan needs. Identical numbers to bim_pressure_report.
mech.makeup_air_heatMakeup air tempering load (1.08 × cfm × ΔT)mechanicalSensible load the unit serving a space carries when makeup air enters untempered or partly tempered: Q (Btu/h) = 1.08 × cfm × (to − from). Heating when the air must be warmed, cooling when cooled. Worked: 2,400 cfm from 80 °F to 92 °F = 31,104 Btu/h.
mech.pressurizationBuilding pressurization (exhaust, makeup air, outdoor air)mechanicalNet air per zone and for the building from the model: exhaust fans and hoods out, makeup air units and rooftop-unit outdoor air in; positive, negative or neutral against each design target (kitchen negative to dining, building slightly positive); the untempered makeup air load on the unit that serves it. Any item with no airflow typed is named and no partial total is given.
mech.ventilation_outdoor_airOutdoor air and exhaust per space and zone (IMC 403.3.1.1 and ASHRAE 62.1)mechanicalBreathing-zone outdoor air Vbz = Rp·Pz + Ra·Az, zone outdoor air Voz = Vbz / Ez and area exhaust for every space in the scope, under IMC and ASHRAE 62.1 side by side with one marked governing, and each zone's total against its serving unit's outdoor air. Spaces that can't be calculated say why.
nec.conductor_ampacityConductor ampacity (NEC 310.16 with corrections)electricalTable 310.16 at the insulation's column, corrected for ambient (Table 310.15(B)(1) / 2023 (B)(1)(1)) and more than three current-carrying conductors (Table 310.15(C)(1)), then limited to the terminations' column (110.14(C)).
nec.conduit_fillConduit size by fill (NEC Chapter 9)electricalSum of conductor areas (Chapter 9 Table 5) against the allowed fill (Table 1: 53% one conductor, 31% two, 40% over two) of each trade size (Table 4) for EMT, PVC Schedule 40 or 80; the smallest that fits.
nec.demand_loadCalculated (demand) load at a panel or service (NEC Article 220)electricalConnected load by class and the demand factor each class gets: general lighting (2020 Table 220.42 / 2023 Table 220.45), non-dwelling receptacles over 10 kVA at 50% (220.44 / 220.47), kitchen equipment by the count at this node (Table 220.56, not less than the two largest), motors and HVAC at 100% plus 25% of the largest (220.50, 430.24), the larger of heating and cooling (220.60). Gives the calculated load, the load conductors and the device are sized for (continuous at 125%), and the smallest standard device. Give the raw inventory below the node, not child panels' demand.
nec.egcEquipment grounding conductor (NEC 250.122)electricalTable 250.122 by the overcurrent device; when the phase conductors were upsized from the minimum that had the ampacity, the EGC grows by the same ratio of circular mils (250.122(B), Chapter 9 Table 8), and is never larger than the phase conductors (250.122(A)).
nec.motor_circuitSize a motor branch circuit (NEC Article 430)electricalFrom horsepower, voltage and phases: the table full-load current (Table 430.248 / 430.250, read by 430.6(A)(1), not the nameplate), conductors at 125% (430.22), the largest short-circuit and ground-fault device Table 430.52 allows for the device type (next standard rating up), then conductor, voltage drop, EGC and conduit as for any branch circuit, with the device protecting the conductors against faults only (240.4(G)).
nec.service_sizeEarly service size from an equipment list (NEC 220, 230.42, 230.79)electricalBefore layout: the kitchen and mechanical equipment (one row per item, VA per unit, the load class the engineer confirmed) through the Article 220 demand calc (220.56 kitchen count, 25% of the largest motor, larger of heating and cooling), then the smallest standard service at or above the load with continuous loads at 125% and any spare the engineer adds. Read a pasted list into rows first with bim_service_from_equipment_list.
nec.size_circuitSize a branch circuit or feeder (NEC)electricalFrom the load (continuous at 125%), length and voltage: overcurrent device (240.6(A)), smallest conductor with the ampacity at the terminations' temperature and the installation's ambient and conductor count (310.16, 310.15, 110.14(C)) and protected by the device (240.4(B)/(D)), voltage drop by Chapter 9 Table 9 upsized to the design target, the EGC from 250.122 grown in proportion when the phase conductors grow, and the conduit (Chapter 9 Tables 1, 4, 5). Every value cites its clause.
nec.voltage_dropVoltage drop (NEC Chapter 9 Table 9)electricalEffective impedance Ze = R x PF + XL x sin(arccos PF) from Chapter 9 Table 9 (75°C, by raceway), then 2 x I x Ze x L single-phase or √3 x I x Ze x L three-phase; percent of the nominal voltage, against the design target.
plumbing.building_sewerBuilding sewer: gravity, backwater valves and drain capacityplumbingWhich floors drain to the sewer by gravity (712.1: the rest need a sewage pump or ejector), which sit below the next upstream manhole cover and need a backwater valve (715.1), and the fixture units at the connection against the building drain's size and slope (Table 710.1(1)).
plumbing.gas_systemGas system sizing by pressure zone (IFGC 402.4)plumbingSizes a drawn gas system zone by zone (each regulator starts a zone at its outlet pressure and allowable drop) from the Table 402.4(n) for the gas, material and pressure, by longest or branch length. Returns each pipe's needed size against the drawn size, findings (undersized pipe, regulator missing between zones, appliance below its minimum inlet), the gas equipment schedule, each outlet's developed length and sizing basis, and total input. Proposes only; bim_size_pipes applies it.
plumbing.grease_interceptorGrease interceptor flow and retentionplumbingRequired flow rating by the PDI G101 fixture-volume method (volume × fill factor / drain-down time) and the grease retention capacity from Table 1003.3.5.1 (twice the rating over 100 gpm); checks a rated unit. Given an interceptor in the model, sizes from the fixtures piped to it. Never names a product.
plumbing.hunter_demandWater demand from fixture units (Hunter curve)plumbingDesign flow (gpm) from water supply fixture units on a chosen curve: ASHRAE modified Curves A–D (default by building type) or the firm's IPC Appendix E import. Returns the chart points and operating point for the printed curve, and how far the old built-in fit was off.
plumbing.pipe_systemPipe system hydraulics (water, drainage, gas)plumbingThe kernel's pipe hydraulics report for one system on the plugin interface: water pressures to the critical fixture, drainage capacity at slope and stacks, or gas drop over the longest run. Identical numbers to bim_pipe_report.
plumbing.pressure_reportDomestic water pressure loss reportplumbingStarts at the design minimum (or flow test) pressure and deducts meter, backflow preventer, tap, PRV, static head (height × 0.433) and the highest fixture pressure from Table 604.3, giving the pressure left to overcome pipe friction (and the allowable loss per 100 ft when the developed length is given).
plumbing.sewage_pumpSewage pump or ejector against its inflowplumbingThe engineer's inflow (gpm) and head against the pump's rating point (712.4.2: capacity and head for the application). Fixture units are shown but not converted to a flow; without a gpm the check asks for one.
plumbing.size_drainDrain sizing by drainage fixture unitsplumbingDFU from Table 709.1 (or given), then the smallest building drain at its slope by Table 710.1(1), or horizontal branch / stack by Table 710.1(2), never under 3 in. when it serves a water closet (Table 710.1(1) note a; 704.2), with the Table 704.1 minimum slope for the size. Answers the size as a number (size_nominal_in) and as printed (size_in). Checks a drawn size.
plumbing.size_gasGas pipe sizing (IFGC 402.4)plumbingSizes each gas segment for the load it carries by the longest length method (402.4.1) or the branch length method (402.4.2): from the matching Table 402.4(n) capacity table (code library or firm import) and from the 402.4 sizing equation, with their agreement. Natural gas or undiluted propane; Schedule 40, copper, CSST, PE.
plumbing.size_systemWater, sanitary, vent and storm system sizing (plumbing code)plumbingSizes a drawn domestic water system (fixture units to gpm on its demand curve; friction within the pressure left after static head and the critical fixture over the developed length; velocity limit; Table 604.5 minimums) or sanitary system (DFU by Table 710.1(1) at slope for the building drain, 710.1(2) for branches and stacks, never smaller downstream), vent system (stack vents and vent stacks by Table 906.1 on DFU vented and developed length; branch vents half the drain they vent, 1-1/4 in. least, a size up over 40 ft, 906.2) or storm system (roof area at the system's design rainfall rate: leaders by Table 1106.2(1), horizontal drains by Table 1106.3 at slope). Returns each pipe's needed size against the drawn size and findings. Proposes only; bim_size_pipes applies it, or auto-sizing when the system is set to auto.
plumbing.size_waterWater pipe sizing (allowable friction)plumbingSizes each water segment as the smallest pipe whose Hazen–Williams friction stays within the allowable loss per 100 ft (available pressure over developed length plus fittings) and whose velocity stays within the limit, with Table 604.5 minimum fixture branch sizes. Fixture units become gpm on the chosen Hunter curve.
plumbing.water_frictionWater pipe friction (Hazen–Williams)plumbingFriction loss per 100 ft and velocity for a water flow in a pipe of a given inside diameter and C factor. The same equation the pipe hydraulics report uses.
plumbing.water_heaterWater heater capacity checkplumbingHot water demand (gal/h, from fixtures × the firm's per-fixture gph × demand factor) against a tank heater's recovery at the rise, or peak hot gpm against a gas or electric tankless heater's flow at the rise. Reports required capacity and pass/fail; never names a product.
plumbing.water_meterWater meter pressure lossplumbingPressure loss through a water meter at the design flow, from its loss curve or by the square law from its rated maximum flow and loss there (manufacturer / AWWA data the engineer gives). Feeds plumbing.pressure_report.
struct.simple_beamSimple beamstructEnd reactions, the largest bending moment and its utilisation for a simply supported beam under a uniform load and point loads (one service-level case).

Apache License 2.0. The reference is generated from the code on every change.