EnergyAE / Knowledge Base

TRNSYS / TRNAUS Component Reference

TYPE 11 - Flow Controller (Mode 4/5: Tempering Valve)

Source: TRNSYS15 index.html Note: Standard TRNSYS15 component. This reference covers Mode 4/5 only — the temperature-controlled flow diverter used as a tempering valve in HP water heater decks.


1. Introduction

TYPE 11 Mode 4/5 is a temperature-controlled flow diverter that blends a hot fluid stream with a cold bypass stream to achieve a target mixed outlet temperature (Tset). In HP water heater rating decks it is used as the tempering valve: it mixes hot tank water with cold mains water to deliver a controlled temperature to the load, and its outlet flow rate [unit,2] is used as the load draw-off flow rate for the tank and energy balance.

Mode 4 recalculates the mixing fraction g on every iteration. Mode 5 freezes g after NSTK iterations at the same timestep, preventing oscillation. Use Mode 4 unless convergence problems occur.


2. Parameters

No.SymbolDescription
1ModeSpecify 4 or 5.
2NSTKNumber of iterations at the same timestep before g is frozen (Mode 5 only). Typical value: 8. Not used by Mode 4.

3. Inputs

No.SymbolUnitsDescription
1Ti°CCold bypass inlet temperature. Typically cold mains water (Tcold).
2mikg/hrCold bypass inlet flowrate. Typically the scheduled load draw-off flow (ldflw).
3Th°CHot source temperature. Typically the tank hot water outlet temperature (Tout = [60,5] or [104,21]).
4Tset°CDesired mixed outlet temperature. Typically the auxiliary element set point (Tset1).

4. Outputs

No.SymbolUnitsDescription
1T1°CMixed outlet temperature at outlet 1.
2m1kg/hrMass flowrate at outlet 1. This is the delivered load flow rate — used as the draw-off flow rate connected to the tank input.
3T2°CTemperature at outlet 2.
4m2kg/hrMass flowrate at outlet 2.
5g-Control fraction (0-1). Fraction of flow diverted to outlet 2.

5. Notes

  • Output [unit,2] (m1) is the delivered load flow rate. This is the value connected to tank input 1 (m1in) and used in the energy balance and load calculations.
  • When the tank temperature Th equals or exceeds Tset, g approaches 0 and all flow passes through at the tank temperature.
  • When Th is below Tset the tempering valve cannot boost — the delivery temperature equals the tank temperature.
  • The second pair of outputs (T2, m2) represents the unmixed hot bypass; these are typically not used in HP decks.

6. Example .dck Code

UNIT 25 TYPE 11  Tempering valve
* Mode 4 (temp-controlled diverter), NSTK=8
PARAMETERS 2
4  8

* Inputs: Ti(cold_mains)  mi(load_flow)  Th(tank_hot_out)  Tset(delivery_setpoint)
INPUTS 4
Tcold   ldflw   Tout   0,0
20       0      Tset1  TLOAD

* Key outputs:
* [25,1] = T1: mixed delivery temperature (°C)
* [25,2] = m1: delivered load flow rate (kg/hr) -- connect to tank input 1 and Type 55

EQN 3
volx       = [25,2]                              ! load flow from tempering valve (kg/hr)
Load_Temp  = Tout*GT([25,2],0) + Tset1*EQL([25,2],0)   ! delivery temp (avoids zero when no flow)
load_less45 = energy * LT(Tout,45) * GT([25,2],0) / 1000

Source: TRNSYS15 index.html. Last updated: 2026-04-30

TYPE 14 - Time-Dependent Forcing Function

Source: TRNSYS15 index.html (Standard TRNSYS15 component)

Generates a time-varying signal defined by piecewise linear interpolation between user-specified (time, value) pairs. The function repeats every 24 hours throughout the simulation year. Commonly used in heat pump decks to define daily operating schedules (e.g., heat pump on-peak/off-peak hours, continuous operation, or demand-responsive control).

Parameters

Define the piecewise linear function as pairs of (time, value):

No.SymbolUnitsDescription
1t0hrTime at first point (typically 0)
2V0-Value at t0
3t1hrTime at second point
4V1-Value at t1
2N+1tNhrTime at last point (should be 24 to complete 24-hour cycle)
2N+2VN-Value at last point

Total number of parameters = 2 * (number of breakpoints)

Between any two breakpoints, the function interpolates linearly. The function repeats exactly on a 24-hour cycle.

Output

No.SymbolUnitsDescription
1V-Time-averaged value of the function over the current timestep

Important: The output is the average value over the timestep, not the instantaneous value. For a step function (0 or 1), the output is the fraction of the timestep during which the signal equals 1. For example, if a step rises from 0 to 1 at hour 9 and the timestep is 8:00-10:00 (2 hours), the output is 0.5.

Notes on Schedule Definition

  • Define time in hours (0 to 24).
  • The function repeats daily at the same times every day of the simulation year.
  • Use breakpoints at the transition times to create on/off schedules.
  • For step functions, place two identical time values at the transition point (or define the step at the hour before and hour of transition).

DCK Examples

Example 1: Continuous Operation (24-hour Heat Pump On)

UNIT 26 TYPE 14  Schedule: HP on 24h
PARAMETERS 4
0  1  24  1

* [26,1] = 1 at all times

Example 2: Daily Operating Window (9 am to 5 pm Only)

UNIT 26 TYPE 14  Schedule: HP on 9am-5pm
PARAMETERS 6
0   0
9   1
17  0
24  0

* [26,1] = 0 from 00:00-09:00
*         = 1 from 09:00-17:00
*         = 0 from 17:00-24:00

Example 3: Off-Peak Electricity Tariff (10 pm to 7 am)

UNIT 26 TYPE 14  Schedule: Off-peak 10pm-7am
PARAMETERS 6
0   1
7   0
22  1
24  1

* [26,1] = 1 from 00:00-07:00 (midnight to 7am)
*         = 0 from 07:00-22:00 (7am to 10pm)
*         = 1 from 22:00-24:00 (10pm to midnight)

Example 4: Multi-Segment Daily Schedule

UNIT 26 TYPE 14  Schedule: On-peak avoidance
PARAMETERS 10
0   1   ! Off-peak 00:00-07:00
7   0   ! Peak 07:00-17:00
17  1   ! Off-peak 17:00-21:00
21  0   ! Shoulder/peak 21:00-22:00
22  1   ! Off-peak 22:00-24:00
24  1

* [26,1] varies throughout the day based on tariff windows

Integration into Control Logic

Typical use in heat pump control equations:

EQUATIONS 3
! HP operates if ambient is suitable AND within scheduled window
hp_onoff = GT(Tamb, Taux) * min([26,1], 1)

! Auxiliary heater activates when HP is off or insufficient heating
aux_onoff = NOT(hp_onoff) + MAX(0, Tdemand - Tsupply_hp)

! Damped HP modulation (example: ramp up slowly)
hp_capacity = [26,1] * min((Tset - Troom) / 5, 1)

Common Mistakes

  1. Forgetting the final value at hour 24: Always include a value at t=24 to complete the 24-hour cycle. This value will wrap to t=0 of the next day.

  2. Using instantaneous instead of average: Remember that [26,1] returns the time-average over the timestep. For hourly timesteps and a sharp step at 9:00, if the timestep includes that transition, the output will be between 0 and 1 (not exactly 0 or 1).

  3. Incorrectly spacing breakpoints: Ensure breakpoints are in increasing order (0 < t1 < t2 < … < 24) and use appropriate time resolution for the desired schedule sharpness.

  4. Mixing with other control types: Type 14 schedule outputs can be multiplied by other control signals (temperature-based, load-based) to create hybrid control strategies.

TYPE 24 - Quantity Integrator

Source: TRNSYS15 index.html Note: Standard TRNSYS15 component.


1. Introduction

TYPE 24 integrates one or more input quantities with respect to time over the simulation period (or a specified reset interval). It accumulates the running total of each input, optionally resetting to zero at regular intervals. Used in HP decks to compute annual (or periodic) totals of energy consumed, energy delivered, and load sub-quantities for performance reporting.


2. Parameters

No.SymbolUnitsDescription
1 (optional)DtRhrReset interval. The integrated outputs Yi are reset to zero after each DtR interval. If DtR < 0, units of |DtR| months are assumed. If omitted, outputs accumulate for the entire simulation.

Common Usage

  • DtR = 8760 to integrate over a full year without intermediate reset.
  • DtR = -1 to integrate month by month (monthly totals).
  • Omitting the parameter gives a continuous running total.

3. Inputs

No.SymbolUnitsDescription
1X1anyFirst quantity to integrate
iXianyith quantity to integrate

Any number of inputs can be connected. Each input produces one output.


4. Outputs

No.SymbolUnitsDescription
1Y1any.hrIntegral of X1 over time (or over the DtR interval)
iYiany.hrIntegral of Xi

Unit note: The integral of a rate in kJ/hr gives kJ. The integral of a power in kW gives kWh when DtR is in hours. Division by 1000 converts kJ totals to MJ; divide by 3600 to convert kJ to kWh.


5. Example .dck Code

* Annual energy integrator (full year, no reset)
UNIT 52 TYPE 24
PARAMETERS 1
8760               ! integrate over 8760 hrs (1 year), no reset
INPUTS 7
gas_tot  Elec_tot  load_less_45  solar_e  pur_e  elec_s  elec_ctot
0        0         0             0        0      0       0

* Outputs accessed as:
* [52,1] = annual gas energy (kJ)
* [52,2] = annual total electricity (kJ)
* [52,3] = energy delivered below 45°C (kJ)
* [52,4] = solar / HP thermal energy to system (kJ)
* [52,5] = total purchased energy (kJ)
* [52,6] = HP + boost electricity (kJ)
* [52,7] = standby + pump electricity (kJ)

EQN 2
STC     = (ref_elec - [52,2]/1000) / 3600 * 10  ! Small-scale technology certificate rating
Savings = (1 - [52,2]/1000 / ref_elec) * 100     ! Annual energy savings (%)

Source: TRNSYS15 index.html. Last updated: 2026-04-30

TYPE 25 - Printer

Source: TRNSYS15 index.html Note: Standard TRNSYS15 component.


1. Introduction

TYPE 25 prints time-series values of connected inputs to a file or the standard output at a specified time interval. Used in HP decks for the formatted summary table at the end of a simulation (annual results row) and for intermediate periodic output files.


2. Parameters

No.SymbolUnitsDescription
1DtphrTime interval at which printing occurs. Use -1 to print only at the end of the simulation.
2tonhrSimulation time at which printing starts.
3toffhrSimulation time at which printing stops.
4Lunit-Logical unit number for output. If <= 0, uses standard output. If > 0, writes to the file assigned to that logical unit via ASSIGN.
5 (optional)UNITS-1 = print user-supplied units for each input. 2 = print TRNSYS-supplied units. Omit if not needed.

FORMAT Statement (optional)

A FORMAT statement may follow the PARAMETERS block to specify a Fortran-style print format for the output line. If omitted, default formatting is used.


3. Inputs

No.SymbolDescription
1X1First value to print
iXiith value to print

Any number of inputs. Order determines column order in output.


4. Output

TYPE 25 produces no TRNSYS simulation outputs. It writes directly to the assigned file or standard output.


5. Example .dck Code

Annual Summary Table (printed once at end of simulation)

UNIT 53 TYPE 25  Annual summary printer
PARAMETERS 4
-1   stop   stop   2     ! print once at end, write to unit 2 (.OUT file)
FORMAT
(f5.0,10x,f3.0,10x,f6.0,14x,f4.1,7x,f9.1,10x,f4.0,11x,f6.1)
INPUTS 6
zone   Load_size   STC   Savings   San_fail   SAN_ftime
Zone   Load_size   STC   Savings%  San_fail   SAN_ftime

Periodic Output (hourly to separate file)

UNIT 57 TYPE 25  Periodic energy printer
PARAMETERS 4
-1   stop   stop   2     ! print once at simulation end
FORMAT
(f5.0,10x,f3.0,12x,f10.0,6x,f10.0,6x,f10.4,4x,f10.4,4x,f10.0,7x,f10.0)
INPUTS 7
52,3     52,4      52,5      Bs_elec   Be_elec   Starts   Comp_hrs
Load<45C Air_E     Pur_E     Bs_elec   Be_elec   Starts   Comp_hrs

Notes

  • When two rows of labels follow INPUTS, the first row is the variable names and the second row is the label printed in the output header.
  • The FORMAT statement uses standard Fortran format codes: f = fixed point, e = scientific, i = integer, x = spaces.
  • Logical unit 2 is assigned to the .OUT file via ASSIGN ***.OUT 2 at the top of the deck.
  • Logical unit 6 is assigned to the .LST file via ASSIGN ***.lst 6.

Source: TRNSYS15 index.html. Last updated: 2026-04-30

TYPE 28 - Simulation Summary (Print Out)

Source: TRNSYS15 index.html Note: Standard TRNSYS15 component.


1. Introduction

TYPE 28 produces periodic simulation summaries: time-integrated totals, averages, minima, maxima, and other statistics for connected input variables. It is more powerful than TYPE 25 for tracking statistics (min/max/mean over reporting periods). In HP decks, two instances are commonly used: one for ambient temperature diagnostics and one for the main energy balance check.


2. Parameters

No.SymbolUnitsDescription
1DtphrSummary reporting interval. Positive = hours. Negative = |Dtp| months. Use -1 to report monthly, use the simulation stop time to report once at the end.
2tonhrTime at which summaries begin. Use start constant.
3toffhrTime at which summaries end. Use stop constant.
4Lunit-Logical unit number. <= 0 = standard output. > 0 = specific file unit. Use 2 for .OUT file.
5Output Mode-1 = boxed output format. 2 = table summary format.
6+P1, P2, …-Operation codes controlling what is printed for each column (see below).

Operation Codes (Parameters 6 onward)

Each operation code Pi controls one column of the summary output:

CodeMeaning
Positive integer NPrint a header/label line. N controls spacing.
-N (negative integer)Print the value of the corresponding input, in a field of width N characters.
-1Print the simulation time.
24Print time in hours as a 24-hour clock value.
2Print with 2 decimal places.
-4Print in a 4-character field.
-11Print in an 11-character field.
-12Print in a 12-character field.

In practice, the operation codes in the decks define a formatted table where each pair specifies a column and its format. The exact behaviour depends on TRNSYS15 documentation; the most common patterns used in EnergyAE decks are shown in the examples below.


3. Inputs

No.SymbolDescription
1X1First value to track and print
iXiith value to track and print

A CHECK line may follow to specify an energy balance tolerance:

CHECK 0.05   5,8,-2,-6,-7,-9

This verifies that the listed outputs sum to within 0.05 kJ (or specified tolerance) for energy balance checking.


4. Output

TYPE 28 produces no TRNSYS simulation outputs. It writes summary statistics directly to the assigned file.


5. Example .dck Code

Ambient Temperature Logger

UNIT 47 TYPE 28  Ambient temperature summary
PARAMETERS 10
-1   start   stop   2   2   -11   -1   24   2   -4
INPUTS 1
Ta
LABELS 1
Ta

Energy Balance Checker

UNIT 46 TYPE 28  Energy balance verification
PARAMETERS 26
-1   start   stop   2   2   1   -12   -4   -13   -4   -14   -4
-15  -12     2      -4  -16 -4  -17   -4   -18   -4   -19   -4   -11   -4
INPUTS 9
de   volx   energy   Elec_tot   txm   Qu   tloss   ploss   aux_boost
CHECK 0.05   5,8,-2,-6,-7,-9
LABELS 9
dE   Vol    Energy   Elec_tot   Tout   Qout   Tloss   Ploss   Boost

Parameter Breakdown for Energy Balance Example

  • Parameters 1-5: Dtp=-1 (monthly), ton=start, toff=stop, Lunit=2, Mode=2 (table)
  • Parameters 6+: Operation codes define column widths and spacing for 9 input variables
  • CHECK line: verifies energy balance to 0.05 kJ tolerance across columns 5, 8, -2, -6, -7, -9

Source: TRNSYS15 index.html. Last updated: 2026-04-30

TYPE 31 - Pipe or Duct

Source: TRNSYS15 index.html (Standard TRNSYS15 component)

Models a fluid-filled pipe or duct with plug-flow transport and transient thermal losses to the surrounding environment. In heat pump water heater decks, Type 31 instances represent the insulated connecting pipework between the heat pump unit and the thermal storage tank, capturing both transport delay and insulation losses. Typically two or three instances are used: supply pipe (HP to tank), return pipe (tank to HP return), and optionally a zero-loss dummy pipe to capture outlet state before losses.

Parameters

No.SymbolUnitsDescription
1dmInside diameter of pipe
2LmLength of pipe
3UkJ/hr.m².°COverall loss coefficient based on inside surface area. Set U=0 for a lossless dummy pipe.
4rhokg/m³Fluid density (water: 1000 kg/m³)
5CpkJ/kg.°CFluid specific heat (water: 4.18 kJ/kg.°C)
6TI°CInitial temperature of fluid in pipe (used only at start of simulation)

Loss Coefficient Calculation

The overall loss coefficient U is computed from pipe geometry and insulation properties:

U_pipe = 1 / (1/h_in + d_i/2/k_ins * ln(d_o/d_i) + d_i/d_o/h_out)

Where:

  • h_in: inner convective coefficient (typically set to large value, negligible resistance)
  • d_i: inside diameter (m)
  • d_o: outside insulated diameter = d_i + 2*t_ins (m)
  • t_ins: insulation thickness (m)
  • k_ins: insulation thermal conductivity (kJ/hr.m.K)
  • h_out: outer convective coefficient in air (typically 1e6 for external loss or smaller for exposed pipes)

Then:

U = U_pipe / (pi * d_i)  [kJ/hr.m².°C]

In practice, U is pre-calculated from pipe and insulation specifications and entered as a single constant parameter. A spreadsheet or calculation tool should compute U from the geometry and material properties.

Inputs

No.SymbolUnitsDescription
1Ti°CFluid inlet temperature
2mkg/hrFluid mass flowrate
3Tenv°CEnvironment temperature for loss calculation (typically ambient air temperature)

Outputs

No.SymbolUnitsDescription
1To°CFluid outlet temperature
2mkg/hrFluid mass flowrate (pass-through, unchanged)
3QlosskJ/hrHeat loss rate from fluid to environment (always positive for To < Tenv)
4QinkJ/hrEnthalpy rate at inlet
5dEkJChange in internal energy of fluid stored in pipe during timestep
6Tav°CAverage temperature of fluid in the pipe

Note: For energy balance, the sensible energy delivered through the pipe is:

Q_net = m * Cp * (To - Tin_previous) - Qloss

Key Behaviors

  1. Plug-flow transport: Assumes well-mixed fluid moving through the pipe. The outlet temperature responds gradually to inlet temperature changes based on the fluid residence time.

  2. Transient losses: Heat loss depends on both the temperature difference (To - Tenv) and the thermal mass of fluid in the pipe. At low flowrate, more time in pipe means more cooling.

  3. Residence time: tau = (pid²/4L*rho) / m, approximately. For a 0.022 m diameter, 3 m long pipe at 200 kg/hr: tau ~0.02 hours (about 1 minute).

  4. Zero-loss dummy pipe: Use U=0 to capture the outlet temperature before pipe losses affect it (useful for accurate energy balance calculations).

DCK Example: Typical Heat Pump Pipe Installation

CONSTANTS 8
LP1       = 3.0             ! Pipe length (m): HP to tank
LP2       = 3.0             ! Pipe length (m): tank back to HP
dpipei    = 0.022           ! Inside diameter (m)
thk_ins   = 0.013           ! Insulation thickness (m)
kinsulation = 0.035 * 3.6   ! Conductivity in kJ/hr.m.K
dpipeo    = dpipei + 2*thk_ins  ! Outer diameter
UP1 = 1/(1/1e6 + dpipei/2/kinsulation*ln(dpipeo/dpipei) + dpipei/dpipeo/1e6)
UP2 = UP1

UNIT 11 TYPE 31  Supply pipe: tank outlet to HP inlet
PARAMETERS 6
dpipei  LP1  UP1  1000  4.18  25
INPUTS 3
Tout_tank  pflow1  Tamb
25         0       25

UNIT 21 TYPE 31  Return pipe: HP outlet to tank inlet
PARAMETERS 6
dpipei  LP2  UP2  1000  4.18  25
INPUTS 3
Tret_hp  pflow1  Tamb
25       0      25

UNIT 22 TYPE 31  Dummy supply pipe: zero-loss reference
PARAMETERS 6
dpipei  LP1  0  1000  4.18  25
INPUTS 3
Tout_tank  pflow1  Tamb
25         0       25

! Use outputs in energy balance and control logic:
EQUATIONS 2
ploss_total = [11,3] + [21,3]        ! total pipe losses (kJ/hr)
Tin_hp = [11,1]                       ! inlet to HP (after losses)

! For accurate tank energy balance, use:
dE_pipes = [11,5] + [21,5]           ! change in pipe fluid energy
dE_total = [60,16] + dE_pipes        ! total change (tank + pipes)

Convergence Considerations

When Type 31 is connected directly in a loop with a heat pump model, it may create algebraic loops that prevent convergence. If convergence issues arise, use a Type 44 Convergence Promoter on the outlet temperature before feeding it back into the return pipe:

UNIT 44 TYPE 44
PARAMETERS 1
10
INPUTS 1
11,1      ! Outlet of supply pipe
20

UNIT 21 TYPE 31  Return pipe
PARAMETERS 6
dpipei  LP2  UP2  1000  4.18  25
INPUTS 3
[44,1]  pflow1  Tamb   ! Use promoted outlet instead of direct [11,1]
25      0       25

Tips for Accurate Modeling

  1. Insulation properties: Verify k_insulation in consistent units (kJ/hr.m.K). Common foam: 0.025 W/m.K = 0.025 * 3.6 = 0.09 kJ/hr.m.K.

  2. Loss coefficient verification: For typical 22 mm copper with 13 mm foam insulation in still air, U is typically 0.5 to 2 kJ/hr.m².°C. A zero loss pipe (U=0) is useful as a reference state.

  3. Residual energy in pipes: The dE output [Type31,5] can be small (< 1 kJ) if the pipe is thin-walled and not heavily insulated. Include it in energy balance for accuracy.

  4. Initial temperature: The TI parameter is used only on the first call. After that, the pipe state is fully dynamic. Ensure initial guess is reasonable to avoid oscillations.

TYPE 44 - Convergence Promoter

Source: TRNSYS15 index.html (Standard TRNSYS15 component)

Aids convergence in iterative simulation loops by averaging successive estimates of a variable over multiple calls within a single timestep. When a direct algebraic connection between components causes oscillation or divergence on repeated iterations, the convergence promoter damps the oscillation by returning a weighted average of the current and previous estimates. Use only as a fallback when direct connections fail; prefer direct connections where convergence permits.

Parameter

No.SymbolUnitsDescription
1Nc-Number of times this component is called at the same timestep before convergence is promoted (before averaging kicks in). Typical value: 10. Lower values dampen oscillation faster; higher values allow more oscillation before damping.

Input

No.SymbolUnitsDescription
1f(x)variesThe variable for which convergence is to be promoted. Connect this input to the output causing oscillation.

Output

No.SymbolUnitsDescription
1xvariesDamped estimate of the input variable. Connect this output back to the component requiring the stabilized value.

How It Works

On the first Nc iterations at a given timestep, the promoter passes the input directly to the output: x = f(x).

After Nc iterations, the promoter begins averaging the current and previous estimates:

x_new = (x_prev + f(x)) / 2

This weighted average reduces oscillation amplitude with each iteration, allowing the loop to converge. The feedback path becomes: f(x) -> [44,1] -> input -> f(x) -> [44,1] -> etc., with the promoter smoothing the signal each cycle.

When to Use

  1. Algebraic loop between tank and heat pump: The tank outlet temperature [60,6] feeds back to the heat pump inlet, which then affects the tank inlet temperature. This creates a feedback loop that can oscillate.

  2. Control loop oscillation: A control variable depends on the state it controls, causing the controller to overshoot and undershoot repeatedly.

  3. Flow/temperature iteration: Convergence on both flow and temperature simultaneously can lock multiple components into cyclic behavior.

When NOT to Use

  • Direct connections work without oscillation: Keep the direct connection.
  • The model is physically unstable (not a numerical issue): Convergence promotion cannot fix instability; adjust model parameters instead.
  • Multiple cascaded promoters: Avoid stacking Type 44 instances; use a single promoter at the critical point in the feedback loop.

DCK Example: Breaking the Tank-Heat Pump Loop

In a typical separate tank system, the heat pump outlet temperature is fed back to the tank, which then supplies the heat pump inlet. This creates a feedback loop. If oscillation occurs, introduce a convergence promoter on the tank outlet temperature going to the heat pump inlet pipe:

* Without promoter (may oscillate):
* UNIT 11 TYPE 31  HP inlet pipe
* INPUTS 3
* [60,6]  pflow1  Tamb     ! Direct connection to tank outlet [60,6]
* 25      0       25

* With promoter (damped):
UNIT 44 TYPE 44  Convergence promoter: tank outlet to HP inlet
PARAMETERS 1
10          ! Promote after 10 iterations at same timestep

INPUTS 1
60,6        ! Tank outlet temperature (from Type 160)
20          ! Initial guess for convergence

UNIT 11 TYPE 31  HP inlet pipe
PARAMETERS 6
dpipei  LP1  UP1  1000  4.18  25

INPUTS 3
[44,1]  pflow1  Tamb   ! Use promoted output instead of direct [60,6]
25      0       25

EQUATIONS 1
Tin_hp = [44,1]   ! If using equation, reference the promoter output

Interpretation of Nc Parameter

  • Nc = 5: Aggressive damping; oscillation is suppressed quickly but may undershoot convergence.
  • Nc = 10: Moderate damping; typical for most tank-HP loops (recommended starting value).
  • Nc = 20: Gentle damping; allows more oscillation but risk of slow convergence or cycling within tolerance.

Debugging Convergence Issues

  1. Check the convergence report: In the .txt output, look for “TOO MANY ITERATIONS” or iteration count near the solver limit. This suggests the loop is oscillating without converging.

  2. Increase Nc slightly: If convergence is still slow, try Nc=15 or Nc=20.

  3. Check loop structure: Verify that the feedback path is correctly wired. The input to Type 44 should be the oscillating variable, and the output should be the variable fed back into the loop.

  4. Verify initial guess: The second input parameter to Type 44 (initial value) should be in the ballpark of expected steady-state value to avoid unnecessary transient oscillation.

Alternative Solution: Re-arrangement

In some cases, rearranging the model to avoid the algebraic loop entirely is better than using a promoter. For example:

  • Calculate tank outlet first using last-timestep HP inlet.
  • Use that tank outlet for the current HP inlet.
  • This converts the algebraic loop into a time-lagged loop, which converges naturally.

However, this sacrifices some accuracy (one-timestep lag). Use the promoter if the time lag is unacceptable.

Typical Parameter Values for Heat Pump Decks

ScenarioNcNotes
Tank with HP (standard)10Good balance for most cases
Tank with HP and distribution loop12-15More complex loop needs gentler damping
Control oscillation (e.g., on-off switching)5-8Faster response desired
Very stiff model (rapid transients)15-20Allow more iteration before damping

Common Issues

  1. Convergence still fails after adding promoter: Check if the feedback loop structure is correct. The promoter only works if the input is the oscillating variable and the output feeds back correctly into the loop.

  2. Energy balance affected by promoter: The promoter introduces a time-lag in the feedback, which can slightly shift when energy is transferred between components. For steady-state or long-timescale analysis, this is usually negligible. For sub-hourly transient analysis, verify that energy is conserved in the overall loop.

  3. Promoter output lags behind input: This is intentional (it is averaging), but can create a phase lag in control response. If transient response is important, reduce Nc slightly to minimize lag.

TYPE 55 - Periodic Integrator

Source: TRNSYS15 index.html Note: Standard TRNSYS15 component.


1. Introduction

TYPE 55 evaluates statistics (integral, count, mean, standard deviation, min, max and their times of occurrence) for up to 10 input variables over user-defined periodic time windows. Unlike TYPE 24 (which only integrates), TYPE 55 also tracks minimum, maximum, and mean values within each period. In HP decks, a single instance is typically used to track the load delivery temperature statistics (min, max, mean, and their times) over the simulation year for the mandatory performance report.


2. Parameters

Parameters are specified in groups of 7, one group per input variable. Up to 10 inputs (70 parameters maximum).

No. (for input i)SymbolDescription
1+7*(i-1)modeIntegration mode. 1 = integrate with respect to time. 0 = sum (accumulate without time weighting).
2+7*(i-1)ToniRelative starting hour of the summary period within each repeat cycle (hours from midnight).
3+7*(i-1)LengthiDuration of the summary period (hr). If negative, period runs from Toni to end of month.
4+7*(i-1)RepeatiHours between successive periods. If negative, units are months.
5+7*(i-1)ResetiTime interval over which Xi values are investigated. Outputs reset to 0 after each Repeati interval. If negative, units are months.
6+7*(i-1)StartiAbsolute simulation start time for this periodic summary (hr).
7+7*(i-1)StopiAbsolute simulation stop time for this periodic summary (hr).

Note: Toni is always relative to midnight, not the simulation start time. If the simulation starts at hour 1 and Toni = 8, the summary begins at 08:00 on day 1.


3. Inputs

No.SymbolDescription
1X1First quantity to evaluate
iXiith quantity (up to 10)

4. Outputs

Ten outputs are produced per input variable. For input i, outputs are at positions 1+10*(i-1) through 10+10*(i-1):

OffsetSymbolUnitsDescription
1+10*(i-1)Yiany.hrIntegral of Xi with respect to time, or sum of Xi
2+10*(i-1)Ni-Count of Xi values over the period
3+10*(i-1)MeanianyMean value of Xi in period
4+10*(i-1)SSDianySample standard deviation of Xi
5+10*(i-1)VarianyVariance of Xi
6+10*(i-1)SSQianySum of squares of Xi
7+10*(i-1)MinianyMinimum value of Xi in period
8+10*(i-1)TimeminhrSimulation time at which minimum occurred
9+10*(i-1)MaxianyMaximum value of Xi in period
10+10*(i-1)TimemaxhrSimulation time at which maximum occurred

Quick Reference for 1 Input (most common use)

Output No.Description
[unit,1]Integral (Yi)
[unit,2]Count (Ni)
[unit,3]Mean
[unit,4]Sample std dev
[unit,5]Variance
[unit,6]Sum of squares
[unit,7]Minimum value
[unit,8]Time of minimum (hr)
[unit,9]Maximum value
[unit,10]Time of maximum (hr)

5. Example .dck Code

Load Delivery Temperature Statistics (annual, single input)

* Track load delivery temperature statistics over the full simulation year
UNIT 51 TYPE 55  Load delivery temperature periodic integrator
PARAMETERS 7
1       ! mode: integrate with respect to time
1       ! Toni: start at hour 1 (midnight of day 1)
8760    ! Lengthi: 8760 hr period (full year)
0       ! Repeati: no repeat (0 = no periodic reset, run once)
8760    ! Reseti: reset interval = full year
0       ! Starti: start at simulation time 0
8760    ! Stopi: stop at simulation time 8760
INPUTS 1
Load_Temp     ! Delivery temperature weighted by flow (°C)
0

* Outputs used in annual summary:
* [51,7]  = MinDelTemp  (minimum delivery temperature over year, °C)
* [51,8]  = TimeMin     (time of minimum delivery temperature, hr)
* [51,9]  = MaxDelTemp  (maximum delivery temperature over year, °C)
* [51,10] = TimeMax     (time of maximum delivery temperature, hr)

Used in the results printer:

UNIT 53 TYPE 25
PARAMETERS 4
-1 stop stop 2
INPUTS 10
zone  Load_size  STC  Savings  San_fail  SAN_ftime  51,7  51,8  51,9  51,10
Zone  Load_size  STC  Savings% San_fail  SAN_ftime  MinDelTemp TimeMin MaxDelTemp TimeMax

Source: TRNSYS15 index.html. Last updated: 2026-04-30

TYPE 65 - Online Plotter

Source: TRNSYS15 index.html Note: Standard TRNSYS15 component.


1. Introduction

TYPE 65 displays time-series plots of connected input variables in an online graphics window during simulation. It supports up to two separate Y-axis plots (upper and lower) with independent Y-axis scaling. In HP decks, multiple instances are used to monitor temperatures, COP, power, and control signals during simulation development and debugging. Set parameter 9 to -1 to suppress the display window when running in batch mode.


2. Parameters

No.SymbolDescription
1NtopNumber of variables to display in the upper plot.
2NbotNumber of variables to display in the lower plot.
3Ymin,1Minimum Y-axis value for upper plot.
4Ymax,1Maximum Y-axis value for upper plot.
5Ymin,2Minimum Y-axis value for lower plot.
6Ymax,2Maximum Y-axis value for lower plot.
7NpicNumber of plot frames per simulation. 1 = single plot covering full simulation time. i = divide simulation into i time segments, each plotted separately.
8(Nbot repeat)Number of variables in lower plot (repeated from parameter 2 for internal use).
9on/off>= 0 = display online graphics window during simulation. <= -1 = suppress online display (use for batch/unattended runs).
10LU>= 10 = logical unit number for automatic output file. <= -1 = do not generate output file. Use -1 unless file logging is needed.

3. Inputs

Inputs are listed in two groups, separated in the INPUTS block:

  • First Ntop inputs: variables plotted on the upper graph.
  • Next Nbot inputs: variables plotted on the lower graph.

Total inputs = Ntop + Nbot.


4. Labels

A LABELS block following INPUTS provides two rows:

  • Row 1: variable names shown in the plot legend.
  • Row 2: (optional) alternative display names.

If only one row is provided, it is used for both the legend and display.


5. Output

TYPE 65 produces no TRNSYS simulation outputs. It generates real-time graphical display and/or a data file.


6. Example .dck Code

Separate HP Deck: Temperature and Performance Plot

UNIT 65 TYPE 65  HP system plotter
PARAMETERS 10
6       ! Ntop: 6 variables on upper plot
6       ! Nbot: 6 variables on lower plot
0       ! Ymin upper: 0°C
100     ! Ymax upper: 100°C
0       ! Ymin lower: 0
10      ! Ymax lower: 10
73      ! Npic: 73 daily frames (365 days / 5)
5       ! Nbot repeat
[plotter]  ! on/off: 1=display, -1=suppress (use constant from include file)
-1      ! LU: no output file
INPUTS 12
Tout   11,1   Tret    T45   T90   AuxT1
14,1   less45 cop2    PkW   aux_onoff   San_fail
LABELS 12
Tout   Thpin  Thpout  T45   T90   AuxT1
Load   LoadFail COP   PowerkW  Booster  San_fail

Integral HP Deck: Multi-panel System Plot

UNIT 65 TYPE 65  Integral HP performance plotter
PARAMETERS 10
9   6   0   100   0   6   73   7   [plotter]   -1
INPUTS 15
Off_time  On_time  Tout   Tcoil  104,12   T45  T90  MDT45  Tamb  San_fail
copx      ekw      tkw    Comp_on Boost_on
LABELS 15
Off_time  On_time  Tout   Tcoil  HP_temp  T45  T90  MDT45  Tamb  San_fail
cop       EleckW   TherkW Comp_on Boost_on

* Second plotter instance for control signals
UNIT 66 TYPE 65
PARAMETERS 10
4   4   0   100   0   6   73   7   1   -1
INPUTS 8
Tset  Tcontrol  T45  T90  San_fail  Comp_on  hp_onoff  Boost_on
Tset  Tcontrol  T45  T90  San_fail  Comp_on  hp_onoff  Boost_on

Notes

  • The [plotter] variable is typically defined in the include file (1 = show, -1 = hide). Setting to -1 allows batch rating runs without spawning graphics windows.
  • Npic = 73 gives daily plots for a 365-day simulation at 5 days per frame, which is a common choice for annual rating runs.
  • Each TYPE 65 instance is independent. Multiple instances are used to separate temperature plots from power/COP plots.

Source: TRNSYS15 index.html. Last updated: 2026-04-30

TYPE 138 - Stratified Tank

Source: TRNAUS15 Manual 24.6 (Appendix 2) Note: TRNAUS extension. Not part of standard TRNSYS15. Type 138 is the older stratified tank type used before Type 104 for integral heat pump applications. The manual notes that Type 104 should be used for heat pump applications with integral condensers, but Type 138 remains present in current legacy decks.


1. Introduction

TYPE 138 models a stratified water storage tank with a heat-source loop, load draw-off, tank heat loss, dump valve control, and up to two auxiliary electric elements. It supports several heat exchanger modes for collector or heat-source coupling.

Common HPWH legacy use is a tank plus external heat input or older integral-condenser representation. For new integral heat pump water heater decks, prefer Type 104. When maintaining existing decks, keep the Type 138 parameter order exactly as written because the heat exchanger mode changes the trailing parameters.

EnergyAE legacy Type 138 decks commonly name the active/top auxiliary element variables Tset2, Tdb2, and Aux2. This differs from Type 104, where the comparable first-element names are usually Tset1, Tdb1, and Aux1.


2. HX Modes

ModeDescription
1Complete mixing of heated fluid at return level.
2Fully stratified inlet.
3Heat pipe fitted to bottom of tank.
4Collector loop heat exchanger as a coil wrapped around the tank.
5Collector loop heat exchanger as an internal coil-in-tank heat exchanger.
6Collector loop horizontal tank-in-tank heat exchanger.
7Load mixing in bottom of tank at Hcold level, collector return fully stratified.
8Collector loop heat exchanger in tank with measured UA coefficients.

3. Parameters

Parameters 1-21: Tank, Load, and Top Auxiliary Element

No.SymbolUnitsDescription
1HX Mode-Selects tank and heat exchanger formulation. See HX Modes table.
2Vtm3Tank volume. For Mode 6, includes potable water plus heat exchanger volume.
3HtmTank height for a vertical tank, tank diameter for a horizontal tank, or inner tank diameter for Mode 6 heat exchanger.
4HrmCollector return height, heat pipe condenser top height, heat exchanger inlet height, or mantle section definition depending on HX Mode.
5--Not used.
6--Not used.
7twkwkJ/hr.KTank wall thickness times wall conductivity. Used for conduction degradation of stratification.
8Tank configuration-1 = vertical cylinder. 2 = horizontal cylinder.
9UAkJ/hr.KOverall tank heat loss conductance.
10ri-Insulation thickness ratio. For vertical tanks, top-to-side ratio. For horizontal tanks, top-to-bottom ratio.
11Tideg CInitial temperature of the preheat section of the tank.
12HcmHeight of cold inlet above tank bottom. Often calculated from rated and physical volume.
13QhekJ/hrTop auxiliary element heating rate.
14HamHeight of top auxiliary element above tank bottom.
15HtstatmHeight of top thermostat above tank bottom.
16Tsetdeg CTop thermostat set temperature. Also initial temperature for tank section above the element.
17TdbKTop auxiliary heater deadband.
18UAfkJ/hr.KGas flue heat loss conductance when auxiliary is off. Use 0 for electric auxiliary.
19VmaxfractionMaximum tank element size during conduction analysis. Typical value: 0.05.
20Tmaxdeg CDump valve operating temperature.
21Tmindeg CDump valve closing temperature.

Parameters 22-26: Optional Second Electric Element

No.SymbolUnitsDescription
22Qhe2kJ/hrBottom auxiliary element heating rate.
23Ha2mHeight of bottom auxiliary element above tank bottom.
24Htstat2mHeight of bottom thermostat above tank bottom.
25Tset2deg CBottom thermostat set temperature. Also initial temperature for tank section above the element.
26Tdb2KBottom auxiliary heater deadband.

Mode-Specific Trailing Parameters

HX ModeParameter positionSymbolUnitsDescription
3last-2DcondmHeat pipe condenser diameter in contact with water.
3last-1LcondmHeat pipe condenser length.
3lastRbondK.hr/kJ.mHeat pipe condenser wall thermal resistance per metre.
4last-4DcoilmDiameter of wrap-around coil tubing.
4last-3LcoilmLength of wrap-around coil.
4last-2RbondK.hr/kJ.mCoil-to-tank bond thermal resistance per metre.
4last-1twkwkJ/hr.KTank wall thickness times wall conductivity.
4lasttpkpkJ/hr.KHeat exchanger tube wall thickness times wall conductivity.
5last-2DcoilmDiameter of internal coil tubing.
5last-1LcoilmLength of internal coil.
5lastRbondK.hr/kJ.mCoil wall conduction resistance per metre.
6last-2DHXmDiameter of inside surface of mantle wall.
6last-1LHXmLength of mantle heat exchanger.
6lastRbondK.hr/kJ.mTank wall conduction resistance per metre.
7last-2 to last--Not used, but must be specified.
8last-2UA0kJ/hr.KConstant UA coefficient.
8last-1UA1kJ/hr.K2UA temperature coefficient.
8last--Not used, but must be specified.

4. Inputs (7 Total)

No.SymbolUnitsDescription
1Thdeg CTemperature of fluid from heat source.
2mhkg/hrHeat-source fluid mass flow rate.
3Tldeg CReplacement fluid temperature from load. Typically cold mains or return water.
4mlkg/hrLoad mass flow rate.
5Tenvdeg CAmbient/environment temperature for tank heat loss.
6aux1 enable-Enable signal for first auxiliary heater. The first element is inactive if the second element is active.
7aux2 enable-Enable signal for second auxiliary heater.

5. Outputs

No.SymbolUnitsDescription
1Tretdeg CTemperature returned to heat source. For Modes 1, 2, and 7 this is tank bottom temperature. For Modes 3-6 this is heat exchanger outlet temperature.
2mhkg/hrFluid mass flow rate to heat source.
3Tddeg CTemperature delivered to load.
4mlkg/hrMass flow rate to load.
5QenvkJ/hrTank heat loss rate.
6QsupkJ/hrEnergy supply rate to load.
7EkJChange in tank internal energy since simulation start.
8QauxkJ/hrTotal auxiliary input rate from both elements.
9QinkJ/hrEnergy input rate to tank by heat-source fluid stream. For Modes 3-6, only heat input is counted.
10Tdeg CAverage storage temperature.
11HtPaThermosyphon pressure in tank. Used internally.
12V_lt45m3/hrLoad volume delivered below 45 deg C.
13V_lt57m3/hrLoad volume delivered below 57 deg C.
14E_lt45kJ/hrLoad energy delivered below 45 deg C.
15E_lt57kJ/hrLoad energy delivered below 57 deg C.
16Tret_collectordeg CCollector loop input temperature. Same as output 1.
17EdumpkJ/hrEnergy dumped due to tank overheating.
18Qaux2kJ/hrAuxiliary input rate from element 2.
19Tbotdeg CBottom tank temperature.
20Twdeg CTank water temperature adjacent to the heat exchanger, averaged over heat exchanger depth.
21T_thdeg CTank water temperature at the active thermostat height.
22T45deg CTank temperature at 45% from the top by volume.
23T90deg CTank temperature at 90% from the top by volume.
24San_volm3Volume of tank water heated to at least 55 deg C.
25San_timehrTime that a positive San_vol has existed in the tank.

Key Output Quick Reference

OutputDescription
[138,1]Tret: heat-source return temperature
[138,3]Td: delivered load temperature
[138,5]Qenv: tank heat loss
[138,6]Qsup: energy supplied to load
[138,8]Qaux: total auxiliary input
[138,19]Tbot: bottom tank temperature
[138,21]T_th: active thermostat temperature
[138,22]T45
[138,23]T90
[138,24]San_vol
[138,25]San_time

6. Example .dck Code

* Legacy stratified tank using Type 138, Mode 4 wrap-around HX
UNIT 138 TYPE 138
PARAMETERS 31
4  VOL  height  Hret  0  0  twkw  1  UA  ri
Tinit  Hcold  Aux2  Haux1  Hth1  Tset2  Tdb2  0  0.05  95  90
0  0  0  0  0
Dcoil  Lcoil  Rbond  twkw  tpkp

INPUTS 7
Thpout  mhp  Tcold  25,2  Tamb  aux_onoff  0,0
60      0    20     0     20    1          0

EQN 5
Tout = [138,3]
Tbot = [138,19]
Tth  = [138,21]
T45  = [138,22]
T90  = [138,23]

Source: TRNAUS15 Manual 24.6 Appendix 2, pages 58-60. Last updated: 2026-06-11

TYPE 238 - Stratified Tank with Variable Thermostat Inputs

Source: TRNAUS15 Manual 24.6 (Appendix 15) Note: TRNAUS extension. Not part of standard TRNSYS15.


1. Introduction

TYPE 238 is Type 138 with the first thermostat set temperature and first thermostat deadband available as inputs. Use it when the top auxiliary thermostat settings need to vary during the simulation.

The tank formulation, HX modes, second element parameters, mode-specific trailing parameters, and outputs are otherwise the same as Type 138.


2. Parameter Difference from Type 138

No.SymbolUnitsType 238 behaviour
16Tsetdeg CIf this parameter is negative, the top thermostat set temperature is read from input 8. If positive, the parameter value is used.
17TdbKIf this parameter is negative, the top thermostat deadband is read from input 9. If positive, the parameter value is used.

All other parameters follow Type 138, including HX Mode selection and the mode-specific trailing parameter set.


3. Inputs (9 Total)

No.SymbolUnitsDescription
1Thdeg CTemperature of fluid from heat source.
2mhkg/hrHeat-source fluid mass flow rate.
3Tldeg CReplacement fluid temperature from load.
4mlkg/hrLoad mass flow rate.
5Tenvdeg CAmbient/environment temperature for tank heat loss.
6aux1 enable-Enable signal for first auxiliary heater. The first element is inactive if the second element is active.
7aux2 enable-Enable signal for second auxiliary heater.
8Tset_inputdeg CTop thermostat set temperature, used only when parameter 16 is negative.
9Tdb_inputKTop thermostat deadband, used only when parameter 17 is negative.

4. Outputs

TYPE 238 outputs match Type 138.

No.SymbolUnitsDescription
1Tretdeg CTemperature returned to heat source.
2mhkg/hrFluid mass flow rate to heat source.
3Tddeg CTemperature delivered to load.
4mlkg/hrMass flow rate to load.
5QenvkJ/hrTank heat loss rate.
6QsupkJ/hrEnergy supply rate to load.
7EkJChange in tank internal energy since simulation start.
8QauxkJ/hrTotal auxiliary input rate from both elements.
9QinkJ/hrEnergy input rate to tank by heat-source fluid stream.
10Tdeg CAverage storage temperature.
11HtPaThermosyphon pressure in tank. Used internally.
12V_lt45m3/hrLoad volume delivered below 45 deg C.
13V_lt57m3/hrLoad volume delivered below 57 deg C.
14E_lt45kJ/hrLoad energy delivered below 45 deg C.
15E_lt57kJ/hrLoad energy delivered below 57 deg C.
16Tret_collectordeg CCollector loop input temperature. Same as output 1.
17EdumpkJ/hrEnergy dumped due to tank overheating.
18Qaux2kJ/hrAuxiliary input rate from element 2.
19Tbotdeg CBottom tank temperature.
20Twdeg CTank water temperature adjacent to the heat exchanger.
21T_thdeg CTank water temperature at the active thermostat height.
22T45deg CTank temperature at 45% from the top by volume.
23T90deg CTank temperature at 90% from the top by volume.
24San_volm3Volume of tank water heated to at least 55 deg C.
25San_timehrTime that a positive San_vol has existed in the tank.

5. Example .dck Code

* Type 238 reads top thermostat settings from inputs 8 and 9
UNIT 238 TYPE 238
PARAMETERS 31
4  VOL  height  Hret  0  0  twkw  1  UA  ri
Tinit  Hcold  Aux2  Haux1  Hth1  -1  -1  0  0.05  95  90
0  0  0  0  0
Dcoil  Lcoil  Rbond  twkw  tpkp

INPUTS 9
Thpout  mhp  Tcold  25,2  Tamb  aux_onoff  0,0  Tset2  Tdb2
60      0    20     0     20    1          0    60     10

EQN 4
Tout = [238,3]
Tth  = [238,21]
T45  = [238,22]
T90  = [238,23]

Source: TRNAUS15 Manual 24.6 Appendix 15, pages 83-85. Last updated: 2026-06-11

TYPE 104 - Mode 4: Microchannel Extrusion Condenser

Source: TRNAUS15 Manual 24.6 (Appendix 14) Note: TRNAUS extension. Not part of standard TRNSYS15. For separate (external) HP systems use Type 160 instead.


1. Introduction

TYPE 104 models an integral all-in-one air-source heat pump water heater where the refrigerant condenser is bonded to the outside of the storage tank. This document covers Mode 4: Microchannel Extrusion Condenser, where flat aluminium multi-port extrusion strips are bonded to the outer tank wall. The heat transfer path from refrigerant to water passes through: refrigerant channels → extrusion wall → bond layer → tank wall → glass lining (if present) → tank water.

The component:

  • Uses AS/NZS 5125 COP and Power coefficients to calculate total HP thermal output (QHX). QHX is passed as an input.
  • Computes the condensing temperature from tank-side water temperature and condenser geometry.
  • Models a stratified tank with up to 20 isothermal nodes.
  • Performs AS 3498 Legionella sanitation compliance checks.
  • Supports up to two auxiliary electric heating elements.

Mode 4 is selected by setting Parameter 1 = 4.


2. Tank Formulation

The tank is divided into N isothermal nodes (set by the DERIVATIVES count, typically 20). Each node exchanges energy with adjacent nodes via fluid conduction and forced mixing. The HP thermal output QHX is distributed to tank nodes over the condenser depth (between VolHXtop and VolHXbot).

Standing loss to UA:

UA [kJ/hr.K] = Tnk_loss [kWh/d] * 3.6e6 / 24 / 3600 / 55 * 3.6

HP performance calculations (external to Type 104):

Tcoil = [104,9]                              ! avg water temp at condenser from previous timestep
dt1   = Tcoil - Tamb
dt2   = Twet - Tdp
power = (p0 + p1*Tcoil + p2*Tcoil^2 + p3*Tamb) * 1000 * 3.6 * Comp_on   ! kJ/hr
cop   = (1 - FP) * (a0 + a1*dt1 + a2*dt1^2 + a3*dt2)
QHX   = power * cop                          ! passed as input 4

3. Parameters (29 Total for Mode 4)

Parameters 1-18: Common Tank and Sensor Definition

No.SymbolUnitsDescription
1Mode-Specify 4 for microchannel extrusion condenser.
2VOLInternal (fluid) tank volume.
3diamTank inner diameter.
4CpkJ/kg.KFluid specific heat. Water = 4.18.
5rhokg/m³Fluid density. Water = 1000.
6UAkJ/hr.KOverall tank heat loss rate (standing loss conductance).
7AuxMode-Auxiliary heater mode. 1 = master/slave. 2 = both simultaneously.
8VolAux1Volume of water above the first (upper) auxiliary element.
9volhth1Volume of water above the first thermostat.
10Volaux2Volume of water above the second (lower) auxiliary element.
11Voltht2Volume of water above the second thermostat.
12Tboil°CFluid boiling point. Use 100°C.
13Max_temp°CMaximum tank temperature from AS/NZS 5125 tests (stop temperature per section 4.2).
14VolHXtopVolume of water above the top of the condenser.
15VolHXbotVolume of water above the bottom of the condenser.
16Vol_sensorVolume above HP control sensor (first auxiliary temperature sensor).
17Vol_sanVolume above second auxiliary temperature sensor (sanitation monitoring).
180Volume above third auxiliary temperature sensor. Set to 0 if unused.

Parameters 19-29: Mode 4 Microchannel Extrusion Geometry

No.SymbolUnitsDescription
19WextrmWidth of each condenser extrusion strip in contact with the tank wall.
20LextrmLength of each extrusion strip along the tank wall.
21Nextr-Number of extrusion strips bonded to the tank.
22textrmThickness of the condenser extrusion wall (wall separating refrigerant from bond).
23kextrkJ/hr.m.KThermal conductivity of the extrusion material (typically aluminium).
24tbondmThickness of the bond (adhesive/epoxy) between extrusion and tank wall.
25kbondkJ/hr.m.KThermal conductivity of the bond material.
26TwallmThickness of the tank steel wall.
27KwallkJ/hr.m.KThermal conductivity of the tank wall material.
28tglassmThickness of glass/porcelain lining on the tank inner surface. Set to 0 if not present.
29kglasskJ/hr.m.KThermal conductivity of the glass lining.

4. Inputs (11 Total)

No.SymbolUnitsDescription
1Tcold°CCold mains water temperature entering at the bottom of the tank.
2ldflwkg/hrLoad flow rate. Typically output [25,2] from a Type 11 tempering valve.
3Tamb°CAmbient air temperature surrounding the tank.
4QHXkJ/hrTotal thermal energy from the heat pump to the tank. Computed externally as Power * cop.
5Tset1°CSet temperature for first (upper) auxiliary element thermostat.
6Tdb1KTemperature deadband for first thermostat.
7Aux_1pwkJ/hrHeating rate of first auxiliary element. Pass 0 when not active.
8Tset2°CSet temperature for second (lower) auxiliary element thermostat.
9Tdb2KTemperature deadband for second thermostat.
10Aux_2pwkJ/hrHeating rate of second auxiliary element. Pass 0 when not active.
11WSAN-Weekly sanitation signal (binary). 1 = active sanitation cycle.

5. Outputs

No.SymbolUnitsDescription
1m_loadkg/hrMass flow rate delivered to load.
2Q_envkJ/hrRate of heat loss to environment.
3Q_loadkJ/hrRate of energy removed by load flow.
4DEkJCumulative internal energy change from simulation start.
5Q_auxkJ/hrCombined auxiliary heater energy rate (both elements).
6Q_aux1kJ/hrEnergy rate from first (upper) auxiliary heater.
7Q_aux2kJ/hrEnergy rate from second (lower) auxiliary heater.
8Tavg°CAverage tank temperature.
9Tcoil°CAverage water temperature over the condenser depth. Used in next-timestep HP performance calculation.
10Tcond°CCalculated refrigerant condensing temperature.
11QHX_outkJ/hrRate of energy injected to tank water from the condenser.
12Taux1°CTemperature at HP control sensor (Vol_sensor location).
13Taux2°CTemperature at second sensor (Vol_san location).
14Taux3°CTemperature at third sensor.
15San_fail-Net sanitation pass/fail. 1 = fail, 0 = pass.
16San_ftimehrSimulation time when San_fail first became 1.
17Daily_fail-Daily sanitation fail flag.
18Weekly_fail-Weekly sanitation fail flag.
19T45°CWater temperature at 45% from top of tank (by volume).
20T90°CWater temperature at 90% from top of tank (by volume).
21T_top°CTop node temperature (node 1).
21+iT_node_i°CTemperature of node i (i = 2 to N-1).
20+NT_bottom°CBottom node temperature (node N).

For 20 nodes: T_top = [104,21], T_bottom = [104,40], intermediate nodes at [104,22] through [104,39].

Key Output Quick Reference

OutputDescription
[104,9]Tcoil: avg water temp at condenser [°C] — use in HP power/COP equations
[104,11]QHX_out: condenser energy to water [kJ/hr]
[104,12]Taux1: HP control sensor temp [°C]
[104,15]San_fail
[104,16]San_ftime [hr]
[104,19]T45 [°C]
[104,20]T90 [°C]
[104,21]T_top: top node [°C]

6. Derivatives (Initial Conditions)

One derivative per tank node, node 1 = top, node N = bottom. Typically initialised to Tset_hp.

DERIVATIVES 20
Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp
Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp

7. Example .dck Code

* HP performance (Mode 4 - Tcoil from previous timestep)
EQN 8
Tcoil  = [104,9]
dt1    = Tcoil - Tamb
dt2    = Twet - [33,8]
power  = (p0+p1*Tcoil+p2*Tcoil^2+p3*Tamb)*1000*3.6*Comp_on
cop1   = a0 + a1*dt1 + a2*dt1^2 + a3*dt2
FP     = GT(Tamb,1)*LT(Tamb,Tifr)*FP1*((Tifr-Tamb)/(Tifr-1)) + (1-GT(Tamb,1))*FP1
cop    = (1 - FP)*cop1
QHX    = power * cop

* Tank — Mode 4 Microchannel, 29 parameters
UNIT 104 TYPE 104
PARAMETERS 29
4  VOL  dia  4.18  1000  UA  2  VolAux1  volhth1  Volaux2
Voltht2  100  Max_temp  VolHXtop  VolHXbot  Vol_sensor  Vol_san  0
Wextr  Lextr  Nextr  textr  kextr  tbond  kbond  Twall  Kwall  tglass  kglass

INPUTS 11
Tcold  25,2  Tamb  QHX  Tset1  Tdb1  Aux_1pw  Tset2  Tdb2  Aux_2pw  WSAN
20      0     25    0    60     10     0        60     10     0        0

DERIVATIVES 20
Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp
Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp

EQN 6
Tout      = [104,21]
T45       = [104,19]
T90       = [104,20]
QHX2      = [104,11]
San_fail  = [104,15]
San_ftime = [104,16]

Source: TRNAUS15 Manual 24.6 Appendix 14. Last updated: 2026-04-30

TYPE 104 - Mode 5: Wrap-Around Coil Condenser

Source: TRNAUS15 Manual 24.6 (Appendix 14) Note: TRNAUS extension. Not part of standard TRNSYS15. For separate (external) HP systems use Type 160 instead.


1. Introduction

TYPE 104 models an integral all-in-one air-source heat pump water heater where the refrigerant condenser is wound around the outside of the storage tank. This document covers Mode 5: Wrap-Around Coil Condenser, where refrigerant tubing is bonded to the outer tank wall surface. The heat transfer path from refrigerant to water passes through: refrigerant tube wall → bond layer → tank wall → glass lining (if present) → tank water.

The component:

  • Uses AS/NZS 5125 COP and Power coefficients to calculate total HP thermal output (QHX), passed as an input.
  • Computes condensing temperature from tank-side water temperature and condenser geometry.
  • Models a stratified tank with up to 20 isothermal nodes.
  • Performs AS 3498 Legionella sanitation compliance checks.
  • Supports up to two auxiliary electric heating elements.

Mode 5 is selected by setting Parameter 1 = 5.

Supports both round tube (circular cross-section, Pipe_gap = 0) and D-shaped tube (flat face bonded to wall).


2. Tank Formulation

The tank is divided into N isothermal nodes (set by the DERIVATIVES count, typically 20). The HP thermal output QHX is distributed to tank nodes over the condenser depth (between VolHXtop and VolHXbot).

HP performance calculations (external to Type 104):

Tcoil = [104,9]                              ! avg water temp at condenser
dt1   = Tcoil - Tamb
dt2   = Twet - Tdp
power = (p0 + p1*Tcoil + p2*Tcoil^2 + p3*Tamb) * 1000 * 3.6 * Comp_on
cop   = (1 - FP) * (a0 + a1*dt1 + a2*dt1^2 + a3*dt2)
QHX   = power * cop

3. Parameters (29 Total for Mode 5)

Parameters 1-18: Common Tank and Sensor Definition

No.SymbolUnitsDescription
1Mode-Specify 5 for wrap-around coil condenser.
2VOLInternal (fluid) tank volume.
3diamTank inner diameter.
4CpkJ/kg.KFluid specific heat. Water = 4.18.
5rhokg/m³Fluid density. Water = 1000.
6UAkJ/hr.KOverall tank heat loss conductance.
7AuxMode-Auxiliary heater mode. 1 = master/slave. 2 = both simultaneously.
8VolAux1Volume above first (upper) auxiliary element.
9volhth1Volume above first thermostat.
10Volaux2Volume above second (lower) auxiliary element.
11Voltht2Volume above second thermostat.
12Tboil°CFluid boiling point. Use 100°C.
13Max_temp°CMaximum tank temperature from AS/NZS 5125 tests.
14VolHXtopVolume above top of condenser coil.
15VolHXbotVolume above bottom of condenser coil.
16Vol_sensorVolume above HP control sensor (first auxiliary temperature sensor).
17Vol_sanVolume above second auxiliary temperature sensor.
180Volume above third auxiliary temperature sensor. Set to 0 if unused.

Parameters 19-29: Mode 5 Wrap-Around Coil Geometry

No.SymbolUnitsDescription
19ltubemTotal length of condenser tube in contact with the tank wall.
20dia_tubemExternal diameter of the condenser tubing.
21ttubemWall thickness of the condenser tube.
22ktubekJ/hr.m.KThermal conductivity of the condenser tube wall material.
23wbondmWidth of contact between condenser tube bond and tank wall. For a round tube: contact width (chord length). For a D-shaped tube: width of the flat face in contact with the wall.
24Pipe_gapmSeparation between condenser tube and tank wall. Round tube: set to 0 (tube touches wall). D-tube: bond thickness between flat face and tank wall.
25kbondkJ/hr.m.KThermal conductivity of the bond/adhesive between tube and tank wall.
26TwallmThickness of the tank wall.
27KwallkJ/hr.m.KThermal conductivity of the tank wall.
28tglassmThickness of glass/porcelain lining on inner tank surface. Set to 0 if absent.
29kglasskJ/hr.m.KThermal conductivity of the glass lining.

4. Inputs (11 Total)

No.SymbolUnitsDescription
1Tcold°CCold mains water temperature entering at the bottom of the tank.
2ldflwkg/hrLoad flow rate. Typically [25,2] from a Type 11 tempering valve.
3Tamb°CAmbient air temperature surrounding the tank.
4QHXkJ/hrTotal thermal energy from heat pump to tank. Computed as Power * cop.
5Tset1°CSet temperature for first (upper) auxiliary element thermostat.
6Tdb1KDeadband for first thermostat.
7Aux_1pwkJ/hrHeating rate of first auxiliary element. Pass 0 when not active.
8Tset2°CSet temperature for second (lower) auxiliary element thermostat.
9Tdb2KDeadband for second thermostat.
10Aux_2pwkJ/hrHeating rate of second auxiliary element. Pass 0 when not active.
11WSAN-Weekly sanitation signal (binary). 1 = active sanitation cycle.

5. Outputs

No.SymbolUnitsDescription
1m_loadkg/hrMass flow rate to load.
2Q_envkJ/hrHeat loss to environment.
3Q_loadkJ/hrEnergy removed by load flow.
4DEkJCumulative internal energy change from simulation start.
5Q_auxkJ/hrCombined auxiliary heater energy (both elements).
6Q_aux1kJ/hrEnergy from first (upper) auxiliary heater.
7Q_aux2kJ/hrEnergy from second (lower) auxiliary heater.
8Tavg°CAverage tank temperature.
9Tcoil°CAverage water temperature over the condenser depth. Use in HP performance equations next timestep.
10Tcond°CCalculated refrigerant condensing temperature.
11QHX_outkJ/hrRate of energy delivered to tank water from condenser.
12Taux1°CTemperature at HP control sensor (Vol_sensor location).
13Taux2°CTemperature at second sensor (Vol_san location).
14Taux3°CTemperature at third sensor.
15San_fail-Net sanitation pass/fail. 1 = fail, 0 = pass.
16San_ftimehrTime when San_fail first became 1.
17Daily_fail-Daily sanitation fail flag.
18Weekly_fail-Weekly sanitation fail flag.
19T45°CWater temperature at 45% from top (by volume).
20T90°CWater temperature at 90% from top (by volume).
21T_top°CTop node temperature (node 1).
21+iT_node_i°CTemperature of node i (i = 2 to N-1).
20+NT_bottom°CBottom node temperature (node N).

For 20 nodes: T_top = [104,21], T_bottom = [104,40], nodes 2-19 at [104,22]-[104,39].

Key Output Quick Reference

OutputDescription
[104,9]Tcoil: avg water temp at condenser [°C]
[104,11]QHX_out: condenser energy to water [kJ/hr]
[104,12]Taux1: HP control sensor temp [°C]
[104,15]San_fail
[104,16]San_ftime [hr]
[104,19]T45 [°C]
[104,20]T90 [°C]
[104,21]T_top: top node [°C]

6. Derivatives (Initial Conditions)

One derivative per node, node 1 = top, node N = bottom.

DERIVATIVES 20
Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp
Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp

7. Example .dck Code

* HP performance (Mode 5 - Tcoil from tank output)
EQN 8
Tcoil  = [104,9]
dt1    = Tcoil - Tamb
dt2    = Twet - [33,8]
power  = (p0+p1*Tcoil+p2*Tcoil^2+p3*Tamb)*1000*3.6*Comp_on
cop1   = a0 + a1*dt1 + a2*dt1^2 + a3*dt2
FP     = GT(Tamb,1)*LT(Tamb,Tifr)*FP1*((Tifr-Tamb)/(Tifr-1)) + (1-GT(Tamb,1))*FP1
cop    = (1 - FP)*cop1
QHX    = power * cop

* Tank — Mode 5 Wrap-Around Coil, 29 parameters
UNIT 104 TYPE 104
PARAMETERS 29
5  VOL  dia  4.18  1000  UA  2  VolAux1  volhth1  Volaux2
Voltht2  100  Max_temp  VolHXtop  VolHXbot  Vol_sensor  Vol_san  0
ltube  dia_tube  ttube  ktube  wbond  Pipe_gap  kbond  Twall  Kwall  tglass  kglass

INPUTS 11
Tcold  25,2  Tamb  QHX  Tset1  Tdb1  Aux_1pw  Tset2  Tdb2  Aux_2pw  WSAN
20      0     25    0    60     10     0        60     10     0        0

DERIVATIVES 20
Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp
Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp

EQN 6
Tout      = [104,21]
T45       = [104,19]
T90       = [104,20]
QHX2      = [104,11]
San_fail  = [104,15]
San_ftime = [104,16]

Source: TRNAUS15 Manual 24.6 Appendix 14. Last updated: 2026-04-30

TYPE 104 - Mode 6: Submerged Coil Condenser

Source: TRNAUS15 Manual 24.6 (Appendix 14) Note: TRNAUS extension. Not part of standard TRNSYS15. For separate (external) HP systems use Type 160 instead.


1. Introduction

TYPE 104 models an integral all-in-one air-source heat pump water heater where the refrigerant condenser coil is submerged directly inside the storage tank. This document covers Mode 6: Submerged Coil Condenser, where refrigerant flows through a twin-wall coil immersed in the tank water. Heat transfers from refrigerant through the inner and outer tube walls (and optional glass coating) directly into the surrounding water.

The component:

  • Uses AS/NZS 5125 COP and Power coefficients to calculate total HP thermal output (QHX), passed as an input.
  • Computes condensing temperature from surrounding water temperature and condenser geometry.
  • Models a stratified tank with up to 20 isothermal nodes.
  • Performs AS 3498 Legionella sanitation compliance checks.
  • Supports up to two auxiliary electric heating elements.

Mode 6 is selected by setting Parameter 1 = 6.

Mode 6 uses a twin-wall tube construction (inner layer + outer layer + optional glass coating) to provide the required separation between refrigerant and potable water.


2. Tank Formulation

The tank is divided into N isothermal nodes (set by the DERIVATIVES count, typically 20). The HP thermal output QHX is distributed to tank nodes over the condenser depth (between VolHXtop and VolHXbot).

HP performance calculations (external to Type 104):

Tcoil = [104,9]                              ! avg water temp surrounding the coil
dt1   = Tcoil - Tamb
dt2   = Twet - Tdp
power = (p0 + p1*Tcoil + p2*Tcoil^2 + p3*Tamb) * 1000 * 3.6 * Comp_on
cop   = (1 - FP) * (a0 + a1*dt1 + a2*dt1^2 + a3*dt2)
QHX   = power * cop

3. Parameters (28 Total for Mode 6)

Parameters 1-18: Common Tank and Sensor Definition

No.SymbolUnitsDescription
1Mode-Specify 6 for submerged coil condenser.
2VOLInternal (fluid) tank volume.
3diamTank inner diameter.
4CpkJ/kg.KFluid specific heat. Water = 4.18.
5rhokg/m³Fluid density. Water = 1000.
6UAkJ/hr.KOverall tank heat loss conductance.
7AuxMode-Auxiliary heater mode. 1 = master/slave. 2 = both simultaneously.
8VolAux1Volume above first (upper) auxiliary element.
9volhth1Volume above first thermostat.
10Volaux2Volume above second (lower) auxiliary element.
11Voltht2Volume above second thermostat.
12Tboil°CFluid boiling point. Use 100°C.
13Max_temp°CMaximum tank temperature from AS/NZS 5125 tests.
14VolHXtopVolume above top of submerged condenser coil.
15VolHXbotVolume above bottom of submerged condenser coil.
16Vol_sensorVolume above HP control sensor (first auxiliary temperature sensor).
17Vol_sanVolume above second auxiliary temperature sensor.
180Volume above third auxiliary temperature sensor. Set to 0 if unused.

Parameters 19-28: Mode 6 Submerged Coil Geometry

Mode 6 uses 10 condenser geometry parameters (one fewer than Modes 4 and 5, giving 28 total parameters).

No.SymbolUnitsDescription
19ltubemLength of condenser tube submerged in tank water.
20dia_tubemExternal diameter of the condenser tubing.
21ttubeinnermThickness of the inner layer of twin-wall condenser tubing.
22ktubeinnerkJ/hr.m.KThermal conductivity of the inner tube layer.
23ttubeoutermThickness of the outer layer of twin-wall condenser tubing.
24ktubeouterkJ/hr.m.KThermal conductivity of the outer tube layer.
25tglassmThickness of glass/ceramic coating on outside of condenser tube. Set to 0 if not present.
26kglasskJ/hr.m.KThermal conductivity of the glass coating.
27TwallmThickness of the tank wall.
28KwallkJ/hr.m.KThermal conductivity of the tank wall.

4. Inputs (11 Total)

No.SymbolUnitsDescription
1Tcold°CCold mains water temperature entering at the bottom of the tank.
2ldflwkg/hrLoad flow rate. Typically [25,2] from a Type 11 tempering valve.
3Tamb°CAmbient air temperature surrounding the tank.
4QHXkJ/hrTotal thermal energy from heat pump to tank. Computed as Power * cop.
5Tset1°CSet temperature for first (upper) auxiliary element thermostat.
6Tdb1KDeadband for first thermostat.
7Aux_1pwkJ/hrHeating rate of first auxiliary element. Pass 0 when not active.
8Tset2°CSet temperature for second (lower) auxiliary element thermostat.
9Tdb2KDeadband for second thermostat.
10Aux_2pwkJ/hrHeating rate of second auxiliary element. Pass 0 when not active.
11WSAN-Weekly sanitation signal (binary). 1 = active sanitation cycle.

5. Outputs

No.SymbolUnitsDescription
1m_loadkg/hrMass flow rate to load.
2Q_envkJ/hrHeat loss to environment.
3Q_loadkJ/hrEnergy removed by load flow.
4DEkJCumulative internal energy change from simulation start.
5Q_auxkJ/hrCombined auxiliary heater energy (both elements).
6Q_aux1kJ/hrEnergy from first (upper) auxiliary heater.
7Q_aux2kJ/hrEnergy from second (lower) auxiliary heater.
8Tavg°CAverage tank temperature.
9Tcoil°CAverage water temperature surrounding the submerged coil. Use in HP performance equations.
10Tcond°CCalculated refrigerant condensing temperature.
11QHX_outkJ/hrRate of energy delivered from condenser coil to tank water.
12Taux1°CTemperature at HP control sensor (Vol_sensor location).
13Taux2°CTemperature at second sensor (Vol_san location).
14Taux3°CTemperature at third sensor.
15San_fail-Net sanitation pass/fail. 1 = fail, 0 = pass.
16San_ftimehrTime when San_fail first became 1.
17Daily_fail-Daily sanitation fail flag.
18Weekly_fail-Weekly sanitation fail flag.
19T45°CWater temperature at 45% from top (by volume).
20T90°CWater temperature at 90% from top (by volume).
21T_top°CTop node temperature (node 1).
21+iT_node_i°CTemperature of node i (i = 2 to N-1).
20+NT_bottom°CBottom node temperature (node N).

For 20 nodes: T_top = [104,21], T_bottom = [104,40], nodes 2-19 at [104,22]-[104,39].

Key Output Quick Reference

OutputDescription
[104,9]Tcoil: avg water temp surrounding submerged coil [°C]
[104,11]QHX_out: condenser energy to water [kJ/hr]
[104,12]Taux1: HP control sensor temp [°C]
[104,15]San_fail
[104,16]San_ftime [hr]
[104,19]T45 [°C]
[104,20]T90 [°C]
[104,21]T_top: top node [°C]

6. Derivatives (Initial Conditions)

DERIVATIVES 20
Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp
Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp

7. Example .dck Code

* HP performance (Mode 6 - Tcoil from tank output)
EQN 8
Tcoil  = [104,9]
dt1    = Tcoil - Tamb
dt2    = Twet - [33,8]
power  = (p0+p1*Tcoil+p2*Tcoil^2+p3*Tamb)*1000*3.6*Comp_on
cop1   = a0 + a1*dt1 + a2*dt1^2 + a3*dt2
FP     = GT(Tamb,1)*LT(Tamb,Tifr)*FP1*((Tifr-Tamb)/(Tifr-1)) + (1-GT(Tamb,1))*FP1
cop    = (1 - FP)*cop1
QHX    = power * cop

* Tank — Mode 6 Submerged Coil, 28 parameters
UNIT 104 TYPE 104
PARAMETERS 28
6  VOL  dia  4.18  1000  UA  2  VolAux1  volhth1  Volaux2
Voltht2  100  Max_temp  VolHXtop  VolHXbot  Vol_sensor  Vol_san  0
ltube  dia_tube  ttubeinner  ktubeinner  ttubeouter  ktubeouter  tglass  kglass  Twall  Kwall

INPUTS 11
Tcold  25,2  Tamb  QHX  Tset1  Tdb1  Aux_1pw  Tset2  Tdb2  Aux_2pw  WSAN
20      0     25    0    60     10     0        60     10     0        0

DERIVATIVES 20
Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp
Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp Tset_hp

EQN 6
Tout      = [104,21]
T45       = [104,19]
T90       = [104,20]
QHX2      = [104,11]
San_fail  = [104,15]
San_ftime = [104,16]

Source: TRNAUS15 Manual 24.6 Appendix 14. Last updated: 2026-04-30

TYPE 160 - No Internal HX Coil (hxMode = 0)

Source: TRNAUS15 Manual 24.6 (Appendix 12), TRNSYS15 Type 60 documentation Note: TRNAUS extension. Not part of standard TRNSYS15. For integral HP tanks use Type 104.


1. Introduction

This is the standard configuration for a separate (external) air-source heat pump connected to a hot water storage tank. There is no internal immersed heat exchanger coil. The heat pump loop connects directly to the tank via flow ports: cold water is drawn from the tank base, heated by the external HP, and returned to the tank.

36 parameters. 9 inputs. Sanitation mode always active (Htank < 0).

Port assignments:

  • Flow 1: Load circuit. Cold mains enters at the bottom (H1in = Hcold), hot water exits at the top (H1out = Hload).
  • Flow 2: HP circuit. Supply to HP exits mid-tank (H2out = Hsupl), HP return enters upper tank (H2in = Hret).

TYPE 160 adds over TYPE 60: fixed auxiliary temperature sensors, AS 3498 Legionella sanitation checking, and optional collector loop HX type selection.


2. Tank Formulation

Multi-node stratified tank. N nodes set by DERIVATIVES count (typically 20, top = node 1). Each node exchanges energy with adjacent nodes via axial conduction and forced mixing. Inverse stratification (lower node hotter than upper) is corrected each sub-timestep.

Height convention: All port and sensor heights are measured from the bottom of the tank in metres:

H_port = (voltot - vol_above_port_L) / voltot * height_m

Standing loss to Utank:

UA     = Tnk_loss [kWh/d] * 3.6e6 / 24 / 3600 / 55 * 3.6   ! kJ/hr.K
Utank  = UA / A_tank                                           ! kJ/hr.m2.K

De-stratification conductivity:

de_strat = pi * dia * (Twall * Kwall) / (pi * dia^2 / 4)

3. Parameters (36 Total)

No.SymbolUnitsDescription
1Mode60-Inlet positioning. 1 = auto temperature-seeking (use when HP flow/output < 1 (L/min)/kWt AND Hret < 2/3 tank height). 2 = fixed position (high-flow or high return port). Mode 2 may need node count reduced to 10.
2VOLInternal tank volume.
3neg_hmTank height — always negative (e.g., neg_h = -height). Activates sanitation mode.
4permTank perimeter. Use -1 for automatic cylindrical vertical tank.
5HcoldmHeight of cold water inlet (flow 1 in) above tank bottom. Typically near zero (bottom).
6HloadmHeight of hot water outlet to load (flow 1 out) above tank bottom. Typically at top.
7HretmHeight of HP return into tank (flow 2 in) above tank bottom.
8HsuplmHeight of supply outlet to HP (flow 2 out) above tank bottom.
9CpkJ/kg.°CFluid specific heat. Water = 4.18.
10rhokg/m³Fluid density. Water = 1000.
11UtankkJ/hr.m².°CTank heat loss coefficient per unit area.
12kkJ/hr.m.°CTank fluid thermal conductivity. Water = 2.16 kJ/hr.m.°C.
13DkkJ/hr.m.°CDe-stratification conductivity (wall conduction).
14Tboil°CFluid boiling point. Use 95°C for low-pressure tanks.
15AuxMode-Auxiliary heater mode. 1 = master/slave. 2 = both simultaneously.
16Haux1mHeight of auxiliary element 1 (boost) above tank bottom.
17Hstat1mHeight of thermostat for auxiliary element 1 above tank bottom.
18Tset1°CSet point for auxiliary element 1. Positive = use as parameter.
19DTdb1°CDeadband for auxiliary element 1 thermostat.
20Qaux1kJ/hrMaximum heating rate of auxiliary element 1.
21Haux2mHeight of auxiliary element 2 above tank bottom. Set to 0 if absent.
22Hstat2mHeight of thermostat for auxiliary element 2. Set to 0 if absent.
23Tset2°CSet point for auxiliary element 2.
24DTdb2°CDeadband for auxiliary element 2.
25Qaux2kJ/hrMaximum heating rate of auxiliary element 2.
26UAfluekJ/hr.°CFlue heat loss conductance. Set to 0 (no flue).
27Tflue°CFlue temperature. Set to 0 (no flue).
28CritFraction-Sub-timestep divisions. Recommended: 5.
29GasAuxMode-0 = both heaters electric. 1 = heater 2 is gas.
30hxMode-Set to 0 — no internal HX coil.
31HMode-0 = equal node heights (standard).
32UMode-0 = uniform Utank (standard).
33hx-Collector loop HX type. 0 = not used (standard for HP decks).
34HAUXT1mHeight of HP control sensor above tank bottom.
35HAUXT2mHeight of 2nd auxiliary sensor. Set to 0 if unused.
36HAUXT3mHeight of 3rd auxiliary sensor. Set to 0 if unused.

4. Inputs (9 Total)

No.SymbolUnitsDescription
1m1inkg/hrFlow 1 inlet mass flow (load draw-off side). Use [25,2] from tempering valve.
2m1outkg/hrFlow 1 outlet. Set to -2 (unknown, computed by model).
3m2inkg/hrFlow 2 inlet: HP return flow rate into tank.
4m2outkg/hrFlow 2 outlet: supply flow rate to HP. Pass same value as m2in.
5T1in°CTemperature of flow 1 inlet (cold mains, Tcold).
6T2in°CTemperature of flow 2 inlet (HP outlet temperature after pipe losses).
7Tenv°CEnvironment temperature for tank heat loss (Tamb).
8ghtr1-Enable signal for auxiliary heater 1 (aux_onoff).
9ghtr2-Enable signal for auxiliary heater 2. Set to 0 if no second heater.

5. Outputs

Outputs 1-21: Standard

No.SymbolUnitsDescription
1m1inkg/hrFlow 1 inlet rate.
2m1outkg/hrFlow 1 outlet rate (load draw-off).
3m2inkg/hrFlow 2 inlet rate (HP return).
4m2outkg/hrFlow 2 outlet rate (supply to HP).
5T1out°CFlow 1 outlet temperature (hot water delivery).
6T2out°CFlow 2 outlet temperature (supply to HP).
7QenvkJ/hrHeat loss to environment.
8Q1inkJ/hrEnergy entering via flow 1.
9Q1outkJ/hrEnergy leaving via flow 1.
10Q2inkJ/hrEnergy entering via flow 2 (HP return).
11Q2outkJ/hrEnergy leaving via flow 2 (supply to HP).
12QauxkJ/hrCombined auxiliary heater energy.
13Qaux1kJ/hrFirst heater energy.
14Qaux2kJ/hrSecond heater energy.
15QfluekJ/hrFlue heat loss (zero when UAflue = 0).
16DEkJCumulative internal energy change.
17Tavg°CAverage tank temperature.
18-21DPkPaPressure heads (typically unused).

Outputs 22-33: Sanitation and Sensors

No.SymbolUnitsDescription
22San_fail-Net sanitation pass/fail. 1 = fail, 0 = pass.
23San_ftimehrTime San_fail first became 1.
24Daily_fail-Daily sanitation fail.
25Weekly_fail-Weekly sanitation fail.
26Sanvol_fail-Volume/time sanitation fail.
27Taux1°CTemperature at HAUXT1 (HP control sensor).
28Taux2°CTemperature at HAUXT2.
29Taux3°CTemperature at HAUXT3.
30T45°CTemperature at 45% from top (by volume).
31T90°CTemperature at 90% from top (by volume).
32San_volVolume of water at or above 55°C.
33San_timehrCumulative time San_vol > 0.

Outputs 34+: Node Temperatures

No.SymbolDescription
34T_topTop node (node 1) [°C]
35T_bottomBottom node (node N) [°C]
36T_node2Node 2 [°C]
34+iT_nodeiIntermediate node i (i = 2 to N-1) [°C]

For 20 nodes: top = [unit,34], bottom = [unit,35], nodes 2-19 at [unit,36]-[unit,53].


6. Derivatives

DERIVATIVES 20
60 60 55 55 50 50 45 45 40 40
35 35 30 30 25 25 20 20 20 20

7. Example .dck Code

* --- CONSTANTS (tank geometry) ---
Constants 38
pi = 3.14159
voltot = 315 ; VOL = voltot/1000 ; dia = 0.45
height = VOL*4/(pi*dia^2) ; neg_h = -height
areatank = pi*dia^2/4*2 + pi*dia*height
Vol_sensor = 50
HAUXT1 = (voltot-Vol_sensor)/voltot*height ; HAUXT2 = 0 ; HAUXT3 = 0
Taux = 5 ; volhth1 = 80 ; HTH1 = (voltot-volhth1)/voltot*height
volaux1 = 50 ; HAUX1 = (voltot-volaux1)/voltot*height
Tset1 = 60 ; Tdb1 = 5 ; Aux1 = 1.8*1000*3.6
volload = 0 ; volcold = 315 ; volret = 80 ; volsupl = 250
Hload = (voltot-volload)/voltot*height ; Hcold = (voltot-volcold)/voltot*height
Hret  = (voltot-volret)/voltot*height  ; Hsupl = (voltot-volsupl)/voltot*height
Mode60 = 1 ; crit = 5
Tnk_loss = 1.45 ; UA = Tnk_loss*3.6e6/24/3600/55*3.6 ; Utank = UA/areatank
Twall = 0.002 ; Kwall = 50*3.6 ; de_strat = pi*dia*Twall*Kwall/(pi*dia^2/4)
Tcontrol = [60,27]

* --- UNIT ---
UNIT 60 TYPE 160  Separate HP tank - no HX coil
*  Params 1-10:  Mode  VOL   neg_h  per   Hcold  Hload  Hret  Hsupl  Cp   rho
* Params 11-20:  Utank k     Dk     Tboil Aux    Haux1  Hth1  Tset1  Tdb1 Qaux1
* Params 21-30:  0     0     0      0     0      0      0     crit   0    hxMode(0)
* Params 31-36:  HMode UMode hx     HAUXT1 HAUXT2 HAUXT3
PARAMETERS 36
Mode60 VOL   neg_h  -1    Hcold  Hload  Hret  Hsupl  4.18  1000
Utank  kfluid de_strat 95 1 HAUX1 HTH1  Tset1  Tdb1  Aux1
0  0  0  0  0  0  0  crit  0  0
0  0  0  HAUXT1  HAUXT2  HAUXT3

* Inputs: m1in   m1out  m2in    m2out   T1in   T2in  Tenv  ghtr1      ghtr2
INPUTS 9
25,2   0,0    pflow1  pflow1  Tcold  21,1  Tamb  aux_onoff  0,0
20      -2        0       0     20    20    20         1      0

DERIVATIVES 20
60 60 55 55 50 50 45 45 40 40
35 35 30 30 25 25 20 20 20 20

EQN 10
Tout      = [60,5]  ; T2out = [60,6]  ; Qenv  = [60,7]
DE        = [60,16] ; Qaux  = [60,12]
San_fail  = [60,22] ; San_ftime = [60,23]
D_fail    = [60,24] ; W_fail    = [60,25]
AuxT1     = [60,27] ; T45  = [60,30] ; T90   = [60,31]
T_top     = [60,34] ; T_bot = [60,35]

Source: TRNAUS15 Manual 24.6 Appendix 12. Last updated: 2026-04-30

TYPE 160 - HP Loop via Internal HX Coil (hxMode = 1)

Source: TRNAUS15 Manual 24.6 (Appendix 12), TRNSYS15 Type 60 documentation Note: TRNAUS extension. Not part of standard TRNSYS15.


1. Introduction

This configuration is used when the heat pump loop transfers heat to the tank through an internal immersed coil rather than direct flow ports. The HP working fluid (water, glycol, or refrigerant) circulates through a submerged heat exchanger coil. The load circuit connects via direct flow port 1. Flow port 2 is not used (set to -1).

48 parameters. 13 inputs. Sanitation mode always active (Htank < 0).

Port assignments:

  • Flow 1: Load circuit. Cold mains in at bottom (H1in = Hcold), hot water out at top (H1out = Hload).
  • Flow 2: Not used. Set H2in = H2out = -1, m2in = m2out = -1.
  • HX coil (params 33-44): HP fluid loop. HP return enters at Hhx,in, supply exits at Hhx,out.

The HX model computes heat transfer between the HP loop fluid and tank water nodes using Nusselt number correlations (inputs C and n).


2. Tank Formulation

Same multi-node stratified formulation as the No HX variant. The HX coil adds energy to the tank nodes that overlap the coil depth. The HX model solves for coil outlet temperature and node temperatures simultaneously each sub-timestep.

Height convention: All heights measured from tank bottom:

H_port = (voltot - vol_above_port_L) / voltot * height_m

Standing loss:

UA    = Tnk_loss [kWh/d] * 3.6e6 / 24 / 3600 / 55 * 3.6
Utank = UA / A_tank

3. Parameters (48 Total)

Parameters 1-32: Type 60 Base

No.SymbolUnitsDescription
1Mode60-Inlet positioning. 1 = auto temperature-seeking. 2 = fixed.
2VOLInternal tank volume.
3neg_hmTank height — always negative. Activates sanitation mode.
4permTank perimeter. Use -1 for cylindrical vertical.
5H1inmCold water inlet height (flow 1 in). Near bottom.
6H1outmHot water outlet to load (flow 1 out). Near top.
7H2inmSet to -1 — flow port 2 not used.
8H2outmSet to -1 — flow port 2 not used.
9CpkJ/kg.°CTank fluid specific heat. Water = 4.18.
10rhokg/m³Tank fluid density. Water = 1000.
11UtankkJ/hr.m².°CTank heat loss coefficient per unit area.
12kkJ/hr.m.°CTank fluid thermal conductivity. Water = 2.16.
13DkkJ/hr.m.°CDe-stratification conductivity.
14Tboil°CFluid boiling point. Use 95°C.
15AuxMode-1 = master/slave. 2 = both simultaneously.
16Haux1mHeight of auxiliary element 1 above tank bottom.
17Hstat1mHeight of thermostat 1 above tank bottom.
18Tset1°CSet point for auxiliary element 1.
19DTdb1°CDeadband for auxiliary element 1.
20Qaux1kJ/hrMax heating rate of auxiliary element 1.
21Haux2mHeight of auxiliary element 2. Set to 0 if absent.
22Hstat2mHeight of thermostat 2. Set to 0 if absent.
23Tset2°CSet point for auxiliary element 2.
24DTdb2°CDeadband for auxiliary element 2.
25Qaux2kJ/hrMax heating rate of auxiliary element 2.
26UAfluekJ/hr.°CFlue conductance. Set to 0.
27Tflue°CFlue temperature. Set to 0.
28CritFraction-Sub-timestep divisions. Recommended: 5.
29GasAuxMode-0 = both electric.
30hxMode-Set to 1 — one internal HX coil.
31HMode-0 = equal node heights.
32UMode-0 = uniform Utank.

Parameters 33-44: HP Loop HX Coil Definition

No.SymbolUnitsDescription
33HX fluid-Fluid in HP loop coil. 1 = water. 2 = propylene glycol/water. 3 = ethylene glycol/water.
34gly-Glycol fraction (0-1 for propylene; 0.55-0.85 for ethylene). Ignored if fluid = 1.
35dimCoil tube inside diameter.
36domCoil tube outside diameter.
37dfmFin diameter. Set df = do for smooth tube.
38AoTotal outside surface area of coil (= pi * do * L).
39fpmfins/mFins per metre. Set to 0 for smooth tube.
40LmCoil length.
41kwallkJ/hr.m.°CCoil tube wall thermal conductivity (including any contact resistance).
42kmatlkJ/hr.m.°CCoil tube material bulk conductivity.
43Hhx,inmHeight of coil inlet (HP return) above tank bottom.
44Hhx,outmHeight of coil outlet (HP supply) above tank bottom.

Parameters 45-48: TYPE 160 Sanitation Sensors

No.SymbolUnitsDescription
45hx-Collector loop HX type. Set to 0 (not a solar collector loop).
46HAUXT1mHeight of HP control sensor above tank bottom.
47HAUXT2mHeight of 2nd auxiliary sensor. Set to 0 if unused.
48HAUXT3mHeight of 3rd auxiliary sensor. Set to 0 if unused.

4. Inputs (13 Total)

Inputs 1-9: Standard Flow and Heater

No.SymbolUnitsDescription
1m1inkg/hrFlow 1 inlet (load side). Use [25,2] from tempering valve.
2m1outkg/hrFlow 1 outlet. Set to -2 (computed by model).
3m2inkg/hrFlow 2 inlet. Set to -1 (port not used).
4m2outkg/hrFlow 2 outlet. Set to -1 (port not used).
5T1in°CCold mains temperature (Tcold).
6T2in°CDummy temperature for unused flow 2. Set to any value (e.g., 20).
7Tenv°CAmbient temperature (Tamb).
8ghtr1-Auxiliary element 1 enable signal.
9ghtr2-Auxiliary element 2 enable signal.

Inputs 10-13: HX Coil (HP Loop)

No.SymbolUnitsDescription
10mhx,inkg/hrHP loop fluid mass flow rate through the coil.
11Thx,in°CHP loop fluid temperature entering the coil (HP outlet after pipe losses).
12C-Nusselt number constant for HP loop convective correlation. Typical value for water: 0.86.
13n-Nusselt number exponent. Typical value: 0.4.

5. Outputs

Outputs 1-21: Standard

No.SymbolUnitsDescription
1m1inkg/hrFlow 1 inlet.
2m1outkg/hrFlow 1 outlet (load draw-off).
3-4m2kg/hrFlow 2 (zero, not used).
5T1out°CHot water delivery temperature.
6T2out°CFlow 2 temperature (not meaningful when port = -1).
7QenvkJ/hrTank heat loss.
12QauxkJ/hrCombined auxiliary heater energy.
16DEkJCumulative energy change.

Outputs 22-33: Sanitation and Sensors

No.SymbolDescription
22San_failNet sanitation fail flag
23San_ftimeTime of first fail [hr]
24Daily_failDaily fail flag
25Weekly_failWeekly fail flag
26Sanvol_failVolume/time fail flag
27Taux1Temp at HAUXT1 (HP control sensor) [°C]
28Taux2Temp at HAUXT2 [°C]
29Taux3Temp at HAUXT3 [°C]
30T45Temp at 45% from top [°C]
31T90Temp at 90% from top [°C]
32San_volVolume at or above 55°C [m³]
33San_timeCumulative time San_vol > 0 [hr]

Outputs 34-38: HX Coil Performance

No.SymbolUnitsDescription
34QhxkJ/hrRate of energy transferred from HP coil to tank water.
35Tout_hx°CHP loop fluid outlet temperature from coil.
36Tout_node°CTank node temperature at HX outlet.
37lmtd°CLog-mean temperature difference across coil.
38UAhxkJ/hr.°CEffective UA of the coil this timestep.

Outputs 39+: Node Temperatures

No.SymbolDescription
39T_topTop node [°C]
40T_bottomBottom node [°C]
41T_node2Node 2 [°C]
39+iT_nodeiNode i (i = 2 to N-1) [°C]

For 20 nodes: top = [unit,39], bottom = [unit,40], nodes 2-19 at [unit,41]-[unit,58].


6. Derivatives

DERIVATIVES 20
60 60 55 55 50 50 45 45 40 40
35 35 30 30 25 25 20 20 20 20

7. Example .dck Code

* HX coil geometry (HP loop)
Dhxi   = 0.010 ; Dhxo = 0.012 ; ltube = 8.0
Areahx = 3.14159*Dhxo*ltube
Ktube  = 386*3.6          ! copper kJ/hr.m.K
Hhx_in  = (voltot-volret)/voltot*height   ! coil top (HP return level)
Hhx_out = (voltot-volsupl)/voltot*height  ! coil bottom (HP supply level)

UNIT 60 TYPE 160  Separate HP tank - HP via HX coil
* Params 1-32: as No-HX config but H2in=H2out=-1 and hxMode=1
PARAMETERS 48
Mode60 VOL   neg_h  -1   Hcold  Hload  -1   -1   4.18  1000
Utank  kfluid de_strat 95 1 HAUX1 HTH1 Tset1 Tdb1 Aux1
0  0  0  0  0  0  0  crit  0  1
0  0
1  0  Dhxi  Dhxo  Dhxo  Areahx  0  ltube  Ktube  Ktube  Hhx_in  Hhx_out
0  HAUXT1  HAUXT2  HAUXT3

* Inputs 1-9: load side + heaters; inputs 10-13: HX coil (HP loop)
INPUTS 13
25,2   0,0   -1   -1   Tcold  20  Tamb  aux_onoff  0,0
20      -2    0    0    20     20   20         1      0
pflow1  21,1  0.86  0.4
0       20    0     0

DERIVATIVES 20
60 60 55 55 50 50 45 45 40 40
35 35 30 30 25 25 20 20 20 20

EQN 10
Tout      = [60,5]  ; Qenv  = [60,7] ; DE    = [60,16] ; Qaux  = [60,12]
San_fail  = [60,22] ; San_ftime = [60,23]
D_fail    = [60,24] ; W_fail    = [60,25]
AuxT1     = [60,27] ; T45   = [60,30] ; T90   = [60,31]
Qhx       = [60,34] ; Tout_hx   = [60,35]
T_top     = [60,39] ; T_bot = [60,40]

Source: TRNAUS15 Manual 24.6 Appendix 12. Last updated: 2026-04-30

TYPE 160 - Indirect Load via Internal HX Coil (hxMode = 1)

Source: TRNAUS15 Manual 24.6 (Appendix 12), TRNSYS15 Type 60 documentation, Separate_HP_Map_Fixed_LoadCoil_Parallel template Note: TRNAUS extension. Not part of standard TRNSYS15.


1. Introduction

This configuration is used when domestic hot water is delivered indirectly through an immersed coil inside the storage tank. Cold mains water enters the coil at the bottom of the tank, is heated by the surrounding tank water through the coil wall, and exits as hot domestic water at the top. The domestic water never directly enters the tank. The heat pump heats the tank water directly via flow port 2.

48 parameters. 13 inputs. Sanitation mode always active (Htank < 0).

Port assignments:

  • Flow 1: Non-existent. Set H1in = H1out = -1. Inputs m1in = m1out = -1.
  • Flow 2: HP direct circuit. HP return enters at H2in = Hret, supply to HP exits at H2out = Hsupl.
  • HX coil (params 33-44): Load circuit. Cold mains water enters coil at Hhx,in = Hcold (bottom of tank). Hot domestic water exits coil at Hhx,out = Hload (top of tank).

The hot water supply temperature for the load is the HX coil outlet temperature, output [unit,35], which feeds the tempering valve.


2. Tank Formulation

The HP heats the tank water via direct flow (port 2). The load draws heat indirectly: cold domestic water flows through the coil and is heated by the surrounding tank water. The HX model solves for coil outlet temperature each sub-timestep based on coil geometry and the Nusselt number correlation.

Height convention:

H_port = (voltot - vol_above_port_L) / voltot * height_m

Standing loss:

UA    = Tnk_loss [kWh/d] * 3.6e6 / 24 / 3600 / 55 * 3.6
Utank = UA / A_tank

3. Parameters (48 Total)

Parameters 1-32: Type 60 Base

No.SymbolUnitsDescription
1Mode60-Inlet positioning. 1 = auto temperature-seeking. 2 = fixed.
2VOLInternal tank volume.
3neg_hmTank height — always negative. Activates sanitation mode.
4permTank perimeter. Use -1 for cylindrical vertical.
5H1inmSet to -1 — flow port 1 non-existent.
6H1outmSet to -1 — flow port 1 non-existent.
7H2inmHP return inlet height (Hret).
8H2outmSupply outlet to HP height (Hsupl).
9CpkJ/kg.°CTank fluid specific heat. Water = 4.18.
10rhokg/m³Tank fluid density. Water = 1000.
11UtankkJ/hr.m².°CTank heat loss coefficient per unit area.
12kkJ/hr.m.°CTank fluid thermal conductivity. Water = 2.16.
13DkkJ/hr.m.°CDe-stratification conductivity.
14Tboil°CFluid boiling point. Use 95°C.
15AuxMode-1 = master/slave. 2 = both simultaneously.
16Haux1mHeight of auxiliary element 1 above tank bottom.
17Hstat1mHeight of thermostat 1 above tank bottom.
18Tset1°CSet point for auxiliary element 1.
19DTdb1°CDeadband for auxiliary element 1.
20Qaux1kJ/hrMax heating rate of auxiliary element 1.
21Haux2mHeight of auxiliary element 2. Set to 0 if absent.
22Hstat2mHeight of thermostat 2. Set to 0 if absent.
23Tset2°CSet point for auxiliary element 2.
24DTdb2°CDeadband for auxiliary element 2.
25Qaux2kJ/hrMax heating rate of auxiliary element 2.
26UAfluekJ/hr.°CFlue conductance. Set to 0.
27Tflue°CFlue temperature. Set to 0.
28CritFraction-Sub-timestep divisions. Recommended: 5.
29GasAuxMode-0 = both electric.
30hxMode-Set to 1 — one internal HX coil.
31HMode-0 = equal node heights.
32UMode-0 = uniform Utank.

Parameters 33-44: Load Side HX Coil Definition

No.SymbolUnitsDescription
33HX fluid-1 = water (domestic cold mains water flowing through coil).
34gly-0 (not used for water).
35diHXmCoil tube inside diameter.
36doHXmCoil tube outside diameter.
37doHXmFin diameter — set equal to doHX for smooth tube (no fins).
38AHXTotal outside surface area of coil (= pi * doHX * LHX).
390fins/mFins per metre. Set to 0 for smooth tube.
40LHXmCoil length.
41KHXkJ/hr.m.°CCoil wall thermal conductivity (includes contact resistance).
42KHXkJ/hr.m.°CCoil material bulk conductivity (repeat same value).
43HcoldmHeight of coil inlet above tank bottom. Cold mains water enters here — typically at the bottom of the tank.
44HloadmHeight of coil outlet above tank bottom. Hot domestic water exits here — typically at the top of the tank.

Parameters 45-48: TYPE 160 Sanitation Sensors

No.SymbolUnitsDescription
45hx-Set to 0 (standard immersed coil, not a collector loop HX).
46HAUXT1mHeight of HP control sensor above tank bottom.
47HAUXT2mHeight of second auxiliary sensor. Typically set to Hload (top of tank) to monitor hot water supply temperature.
48HAUXT3mSet to 0 if unused.

4. Inputs (13 Total)

Inputs 1-9: Standard Flow and Heater

No.SymbolUnitsDescription
1m1inkg/hrSet to -1 — flow port 1 non-existent.
2m1outkg/hrSet to -1 — flow port 1 non-existent.
3m2inkg/hrHP return flow rate into tank (HPFlow).
4m2outkg/hrSupply flow to HP. Set to -2 (computed by model).
5T1in°CTemperature for non-existent port 1. Set to 0 (unused).
6T2in°CHP outlet temperature entering tank (from HP outlet pipe).
7Tenv°CAmbient temperature (Tamb).
8ghtr1-Auxiliary element 1 enable signal.
9ghtr2-Auxiliary element 2 enable. Set to 0 if no second heater.

Inputs 10-13: HX Coil (Load Circuit)

No.SymbolUnitsDescription
10mhx,inkg/hrLoad flow rate through coil (cold mains water draw-off, LoadFlow).
11Thx,in°CCold mains water temperature entering coil (Tcold).
12C-Nusselt number constant. Pass as constant via initial value: 0.5. Connect input to 0,0.
13n-Nusselt number exponent. Pass as constant via initial value: 0.25. Connect input to 0,0.

5. Outputs

Outputs 1-21: Standard

No.SymbolUnitsDescription
1-2m1in, m1outkg/hrFlow 1 rates — zero (non-existent).
3m2inkg/hrHP return flow rate.
4m2outkg/hrSupply flow rate to HP.
5T1out°CNot meaningful (flow 1 non-existent).
6T2out°CSupply temperature to HP.
7QenvkJ/hrTank heat loss to environment.
12QauxkJ/hrCombined auxiliary heater energy.
16DEkJCumulative internal energy change.

Outputs 22-33: Sanitation and Sensors

No.SymbolDescription
22San_failNet sanitation fail flag. 1 = fail, 0 = pass.
23San_ftimeTime of first fail [hr]
24Daily_failDaily sanitation fail
25Weekly_failWeekly sanitation fail
26Sanvol_failVolume/time sanitation fail
27Taux1Temp at HAUXT1 — HP control sensor [°C]
28Taux2Temp at HAUXT2 — typically top of tank (load coil outlet) [°C]
29Taux3Temp at HAUXT3 [°C]
30T45Temp at 45% from top [°C]
31T90Temp at 90% from top [°C]
32San_volVolume at or above 55°C [m³]
33San_timeCumulative time San_vol > 0 [hr]

Outputs 34-38: HX Coil (Load Circuit)

No.SymbolUnitsDescription
34QhxkJ/hrRate of heat transferred from tank water to load via coil.
35Tout_hx°CHot water supply temperature — domestic water exiting the top of the coil. Connect to tempering valve input Th.
36Tout_node°CTank node temperature at coil outlet.
37lmtd°CLog-mean temperature difference across coil.
38UAhxkJ/hr.°CEffective UA of the coil this timestep.

Outputs 39+: Node Temperatures

No.Description
39T_top: top node [°C]
40T_bottom: bottom node [°C]
39+iT_nodei: intermediate node i (i = 2 to N-1) [°C]

For 20 nodes: top = [unit,39], bottom = [unit,40], nodes 2-19 at [unit,41]-[unit,58].


6. Derivatives

DERIVATIVES 20
60 60 55 55 50 50 45 45 40 40
35 35 30 30 25 25 20 20 20 20

7. Example .dck Code

* Coil geometry
diHX = [diHX]        ! coil tube inside diameter (m)
doHX = [doHX]        ! coil tube outside diameter (m)
AHX  = [AHX]         ! total outside surface area (m2)
LHX  = [LHX]         ! coil length (m)
KHX  = [KHX] * 3.6   ! coil thermal conductivity (kJ/hr.m.K)

* HX coil inlet at cold water height (bottom), outlet at load height (top)
Hcold = (Voltot-Volcold)/Voltot*height
Hload = (Voltot-Volload)/Voltot*height

* Sensors: HAUXT2 at top of tank to monitor hot supply temperature
HAUXT1 = (Voltot-Vol_HP)/Voltot*height
HAUXT2 = (Voltot-Volload)/Voltot*height
HAUXT3 = 0

* Tank - flow1=none, flow2=HP direct, HX=load
UNIT 61 TYPE 160
*  Params 1-10:  Mode  VOL   neg_h  per  H1in  H1out  Hret  Hsupl   Cp    rho
* Params 11-20:  Utank k     Dk     95   2     Haux1  Hth1  Tset1  Tdb1  Qaux1
* Params 21-30:  0     0     0      0    0     0      0     crit    0    hxMode(1)
* Params 31-32:  HMode UMode
* Params 33-44:  1  0  diHX  doHX  doHX  AHX  0  LHX  KHX  KHX  Hcold  Hload
* Params 45-48:  0  HAUXT1  HAUXT2  HAUXT3
PARAMETERS 48
Mode60 VOL   neg_h  -1   -1    -1    Hret  Hsupl  4.18  1000
Utank  kfluid DKWALL 95  2  Haux1  Hth1  Tset1  Tdb1  aux1
0  0  0  0  0  0  0  crit  0  1
0  0
1  0  diHX  doHX  doHX  AHX  0  LHX  KHX  KHX  Hcold  Hload
0  HAUXT1  HAUXT2  HAUXT3

* m1in=-1  m1out=-1  m2in=HPFlow  m2out=-2  T1=0  T2=HP_outlet  Tenv  ghtr1  ghtr2
* mhx=LoadFlow  Thx=Tcold  C=0.5(const)  n=0.25(const)
INPUTS 13
0,0     0,0    HPFlow  0,0   0,0   34,1  Tamb  aux_onoff  0,0
-1      -1     0       -2    0     0     20    1          0
LoadFlow  Tcold  0,0   0,0
0         20     0.5   0.25

DERIVATIVES 20
60 60 55 55 50 50 45 45 40 40
35 35 30 30 25 25 20 20 20 20

* Hot water supply = HX coil outlet temperature
EQN 1
Tout1 = [61,35]   ! hot domestic water temperature from coil outlet [deg C]

* Tempering valve mixes Tout1 with cold mains to deliver at set point
UNIT 25 TYPE 11
PARAMETERS 2
4  7
INPUTS 4
Tcold  ldflw  Tout1  0,0
20      0      60    TLOAD

* Key outputs:
* [61,22] = San_fail
* [61,27] = Taux1: HP control sensor [deg C]
* [61,28] = Taux2: top of tank [deg C]
* [61,34] = Qhx: heat from tank to load via coil [kJ/hr]
* [61,35] = Tout_hx: hot water supply temperature [deg C]
* [61,39] = T_top: top node temperature [deg C]

Source: TRNAUS15 Manual 24.6 Appendix 12, Separate_HP_Map_Fixed_LoadCoil_Parallel template. Last updated: 2026-04-30

TYPE 182 - Compressor On/Off Controller with Min/Max Runtimes

Source: TRNAUS15 Manual 24.6 (Appendix 19) Note: TRNAUS extension. Not part of standard TRNSYS15.


1. Introduction

TYPE 182 is a differential on/off controller with minimum and maximum on/off time enforcement, designed to control heat pump compressor operation. It combines:

  • Differential temperature control: turns on when the sensor temperature falls below a setpoint deadband, turns off when it recovers.
  • Minimum on time: prevents the compressor from short-cycling (too brief a run).
  • Maximum on time: prevents the compressor running longer than a specified limit.
  • Minimum off time: ensures a minimum rest period between cycles.
  • Maximum off time: forces the compressor on after an extended idle period.
  • Runtime accounting: tracks cumulative starts, on-time, and off-time for reporting.

In EnergyAE HP decks, Type 182 is always used to control the heat pump compressor. The min/max times are typically set to 0 and stop (no restriction) for standard rating runs, and can be set to real values for compliance or durability modelling.


2. Parameters

No.SymbolUnitsDescription
1Min_tonhrMinimum compressor on time per cycle. Set to 0 for no minimum.
2Max_tonhrMaximum compressor on time per cycle. Set to stop (simulation end) for no maximum.
3Min_toffhrMinimum compressor off time between cycles. Set to 0 for no minimum.
4Max_toffhrMaximum compressor off time. Set to stop for no maximum.

3. Inputs

No.SymbolUnitsDescription
1TH°CUpper (setpoint) temperature. Typically the thermostat set temperature (Tset_hp).
2TL°CLower (sensor) temperature. The actual tank temperature at the control sensor location (Tcontrol = [60,27] or [104,12]).
3DTH°CUpper deadband. Compressor turns OFF when TL >= TH. Compressor turns ON when TL <= TH - DTH. Typical value: 12°C.
4DTL°CLower deadband. Typically set to 0.
5gamma_i-Input control signal (binary). External on/off permission. 0 = compressor locked off (e.g., outside timer window or Tamb < Taux). 1 = compressor permitted to run.

Control logic: The compressor output signal is 1 (on) when:

  • The sensor temperature TL is at or below the switch-on threshold (TH - DTH), AND
  • The input control signal gamma_i = 1, AND
  • Minimum off time has elapsed, AND
  • Maximum on time has not been exceeded.

The output signal is 0 (off) when:

  • The sensor temperature TL meets or exceeds TH, OR
  • gamma_i = 0, OR
  • Minimum on time has not yet been met (the compressor stays on until Min_ton is satisfied), OR
  • Maximum on time has been reached.

4. Outputs

No.SymbolUnitsDescription
1Signal_out-Compressor output signal. 1 = running, 0 = off.
2On_timehrDuration of the current on-event (reset to 0 each time compressor turns off).
3Off_timehrDuration of the current off-event (reset to 0 each time compressor turns on).
4Min_on-1 = minimum on time constraint is currently active (compressor held on).
5Max_on-1 = maximum on time constraint is currently active (compressor forced off).
6Min_off-1 = minimum off time constraint is currently active (compressor held off).
7Max_off-1 = maximum off time constraint is currently active.
8Starts-Cumulative count of compressor start events (0-to-1 transitions) over the simulation.
9Total_hrshrTotal cumulative compressor on-time over the simulation.
10gamma_o-Output of the differential on/off control logic only (before min/max time enforcement).

5. Example .dck Code

Standard Rating Deck (no min/max restrictions)

EQN 4
Min_ton  = 0      ! no minimum on time for rating runs
Max_ton  = stop   ! no maximum on time
Min_toff = 0      ! no minimum off time
Max_toff = stop   ! no maximum off time

EQN 2
* hp_onoff: 1 when ambient > Taux AND within timer window
hp_onoff  = GT(Tamb, Taux) * min([26,1], 1)
aux_onoff = NOT(hp_onoff)

* Tcontrol: tank temperature at HP sensor location
Tcontrol = [60,27]   ! from Type 160 output 27 (separate HP)
* OR
* Tcontrol = [104,12]  ! from Type 104 output 12 (integral HP)

UNIT 92 TYPE 182  Compressor on/off controller
PARAMETERS 4
Min_ton   Max_ton   Min_toff   Max_toff
INPUTS 5
Tset_hp   Tcontrol  Tdb_hp   0,0   hp_onoff
60        60        12        0     1

EQN 9
Comp_on  = [92,1]  ! compressor running (binary)
On_time  = [92,2]  ! current cycle on-time (hr)
Off_time = [92,3]  ! current off-time (hr)
Min_on   = [92,4]  ! min on constraint active
Max_on   = [92,5]  ! max on constraint active
Min_off  = [92,6]  ! min off constraint active
Max_off  = [92,7]  ! max off constraint active
starts   = [92,8]  ! total compressor starts
Comp_hrs = [92,9]  ! total compressor hours

With Practical Min/Max Times

EQN 4
Min_ton  = 10/60   ! 10 min minimum run time
Max_ton  = 6       ! 6 hr maximum run time
Min_toff = 15/60   ! 15 min minimum rest between cycles
Max_toff = 8760    ! no maximum off time limit

�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������