# Engineering assumptions — FCU v0.1

This is an educational and troubleshooting simulator for HVAC/BAS engineers,
programmers, technicians, and students. It is **not physically validated** and is
not an HVAC load-calculation or equipment-selection program. All numerical values
below are simulator teaching defaults or software input limits, not equipment
specifications, ASHRAE provisions, or code/manufacturer requirements.

FCU v0.1 implements the controller, simplified room model, and fixed-step engine
using these assumptions. Software tests do not establish physical validation.

## Default scenario and limits

The executable source of truth is `js/fcu/assumptions.js`. Units are included in
property names. The immutable default template is separate from mutable scenario
copies returned by `createDefaultScenario()`.

| Input | Default | Inclusive bounds / choices |
| --- | --- | --- |
| Initial room temperature | 26°C | 5–40°C |
| Occupied heating / cooling setpoints | 21 / 24°C | Each 5–40°C |
| Unoccupied heating / cooling setpoints | 16 / 28°C | Each 5–40°C |
| Occupancy | OCCUPIED | OCCUPIED / UNOCCUPIED |
| Outdoor temperature | 30°C | −30–50°C |
| Internal heat gain | 0.4 kW | −5–5 kW |
| Heating / cooling capacity at HIGH fan | 4 / 4 kW | Each 0–20 kW |
| Fan selection | AUTO | AUTO / LOW / MEDIUM / HIGH |
| Duration | 120 min | 1–1,440 min |
| Playback speed | 60× | 1× / 10× / 60× / 300× |

Each heating setpoint must be at least 0.5°C below its corresponding cooling
setpoint. Initial temperature bounds are input limits, not limits to impose on
computed room temperature. Configuration validation rejects blank, non-finite,
out-of-range, or overlapping-setpoint submissions while retaining the last valid
configuration. Never silently clamp invalid simulation results: pause and report
non-finite calculations. Keep full precision internally and round only for display.

Both setpoint pairs, occupancy, outdoor temperature, internal heat gain, and fan
selection are live inputs. Initial temperature, heating/cooling capacities, and
duration lock after Start. Speed affects playback only.

## Room heat balance

One well-mixed room has an effective lumped thermal capacitance. Forward Euler
integration uses a fixed one-second timestep:

```text
Qenvelope = UA × (Toutdoor − Troom)
Qheating  = heatingCapacity × (heatingValve / 100) × fanFactor
Qcooling  = coolingCapacity × (coolingValve / 100) × fanFactor
Tnext = Troom + (Qenvelope + Qinternal + Qheating − Qcooling) × dt / C
```

Temperatures use °C; differences use K (numerically equal to °C differences).
Heat flows use kW (= kJ/s), time uses seconds, and capacitance uses kJ/K.
Cooling is a positive magnitude subtracted from the balance. Positive internal
gain adds heat; negative gain removes it. Envelope exchange is separate from
internal gain.

| Model constant | Teaching default |
| --- | --- |
| Effective room capacitance C | 3,000 kJ/K |
| Envelope conductance UA | 0.12 kW/K |
| Fan capacity factors OFF / LOW / MEDIUM / HIGH | 0 / 0.45 / 0.70 / 1.00 |
| Proportional band | 2°C |
| Mode-entry hysteresis | 0.1°C |
| Valve command range | 0–100% |

The room capacitance, conductance, equipment capacities, proportional band, and
fan factors materially affect response and equilibrium. No tuning or calibration
against actual equipment is asserted. Capacitance and conductance remain code
constants rather than advanced UI settings in v0.1.

## Simplifications and limitations

- Linear valve-to-capacity and fan-to-capacity scaling; constant available capacity.
- Instantaneous sensor, valves, and fan response; no actuator travel or noise.
- No humidity, latent load, water temperatures, coil dynamics, ventilation model,
  solar model, fan heat, or central plant limitations.
- No faults, freeze protection, alarms, or equipment safety sequence.
- Default valve control is CO PI. The explicit LEGACY_P comparison can leave a
  steady-state temperature offset. CO behavior operates inside the existing mode
  gates; its effect depends on tuning, loads, capacity, fan staging, and held bias.
- Insufficient capacity can cause continued drift. Reaching a setpoint is not
  guaranteed and must not be enforced by clipping the temperature.

## Simulation and display constants

Fixed timestep: 1 s. Normal history interval: 10 s, with forced initial/final
and live-patch samples. Playback speeds never change numerical timestep.
The scheduler processes at most 500 steps per frame, suspends advancement
while the document is hidden, and discards hidden wall time rather than catching
up on return. It bounds accumulated scheduling debt so an overloaded
browser slows playback rather than changing the physics timestep.

Maximum duration is 24 simulated hours. Display the latest 200 events and label
truncation. Sampling and lifecycle details are in the sequence document.

Rendering is throttled to a centralized 150 ms interval; this display cadence does
not affect numerical advancement. History remains sampled at its simulated-time
interval. Diagram animation represents commands only, not validated air or water
flow. A final shortened integration step ends fractional-minute durations exactly.

## CO controller reference implementation

The three user-supplied Delta CO references govern the current loop interpretation.
See [Delta CO conformance](delta-co-conformance.md) for page references, equations,
and the distinction between documented behavior and simulator choices.

Both loops default to PI. Each uses PB 2°C, integral rate 1%/min, configured Bias
50%, full deadband 0.2°C, reset band 0°C, derivative gain 0 and sample time 1 s.
These are illustrative scenario choices, not required equipment settings.

| CO input | Inclusive software bounds / choices |
| --- | --- |
| Controller type | P / I / PI / PID / LEGACY_P |
| Proportional band | 0.2–50°C |
| Integral rate | 0–100 percentage points/min |
| Configured Bias | 0–100% |
| Full deadband | 0–10°C |
| Full reset band | 0–25°C; positive value must be less than PB |
| Derivative Gain | 0 only; nonzero equation unavailable |
| Derivative sample time | 1–600 s; unused while D is zero |

Effective PB includes deadband. P correction is bounded to −50..+50 percentage
points and added to Bias. All CO types hold their output in deadband. Integral
adjustment stops at output limits; reset band optionally tapers its fixed rate.
LEGACY_P preserves the original zero-bias, 2°C one-sided proportional sequence
only for explicit comparison. It is not the Delta CO P option.

The source does not specify the derivative equation, firmware evaluation ordering,
or all limit-release and startup details. Nonzero D is deliberately unavailable;
other discrete implementation choices are documented rather than claimed as exact
firmware emulation. FCU enable/inhibit and valve exclusion are external sequencing.
Configured Bias is a startup/reset baseline, not a live BACnet object property.

## Estimated supply air temperature (SAT)

A pure algebraic observation adds no extra dynamic state and does not modify the
room heat balance. It assumes recirculated room air, dry sensible-only heat transfer,
instantaneous delivery, no fan heat, no duct loss and no sensor lag.

```text
SAT = Troom + (Qheating - Qcooling) / (rho × cp × airflow)
```

Central teaching constants: rho = 1.2 kg/m³, cp = 1.005 kJ/(kg·K), airflow for
LOW/MEDIUM/HIGH = 0.15/0.23/0.32 m³/s. OFF has no flowing supply stream, so SAT is
null, never zero or an invented room-temperature measurement. Q uses the same
valve/capacity/fan factors as the room heat balance. SAT is evaluated from the
sample's room temperature and commands, including time zero and live-patch samples.
It is an instantaneous estimate, not a dynamic coil model or validated discharge
temperature; it is not clipped to real-equipment limits. Extreme capacity settings
may yield unrealistic SAT. Non-finite calculations throw an error.

CO history is the limited sequence-gated loop command. Valve output currently equals
CO exactly; no separate actuator dynamics are implied. SAT has no control feedback.
