General effects & traits
Some effects of energy system components can be described in a manner applicable to a variety of components. For example all components transforming energy between media incur losses with an efficiency rate that might be dependent on the load on the component. This chapter describes these effects and introduces traits. If the description of a component is listed as implementing a trait, you can find the generalised description of the effects here.
Reduction of usable heat during startup of each component
To account for transient effects, the reduction of the usable heat output during startup of a component can be described using either linear oder exponential startup and cooldown ramps. Both are described in the following.
Linear startup
The following figure illustrate a linear startup and cooldown behavior characterized by the startup time (SUT) and cooldown time (CDT) the component needs to reach full thermal energy output or to cool down completely.
The current thermal power output can be expressed with the following sectionally defined function. The simulation engine tracks the time a component is running or not running. The ontime represents the time since the last startup of the component while is the time since the last shutdown. To handle the case when the component has not cooled down completely since the last shutdown, the linear startup curve can be shifted using to represent a warm start:
The required timeshift of the warmingup curve can be calculated within the timestep where the component is turned on again using the coolingdown curve and the time since the last shutdown:
that leads with to
With this information, the average thermal power output in the current timestep between and can be calculated using the integral of the sectionally defined function above:
This timeaveraged integral results in the following yellow curve that represents the normalized average thermal power output, calculated in each timestep with the lower time bound of :
Note that has to be set to zero at the first timestep of the simulation and and have to start counting again at every change of operation (on/off, not partload).
Exponential startup
While the method above describes a linear thermal power output during the heatup of a component that requires the integration of sectionally defined functions, the calculation of the timestep averaged thermal power can be also performed using continuous exponential functions. Therefore, the general timerelated function of a PT1 element can be used to model the delay of the thermal energy output. This is used for example in the TRNSYS Type 401^{1} for modulating heat pumps. The time span for each component to heat up is defined by the constant heatuptime and the cooldown time . This is not the same time span as defined above (SUT and CDT) for the linear warmup! The following figure shows an exemplary operation curve, analogous to the one for linear transient effects above. A component is started from a cool basis, heated up to nominal thermal power output, then shut down and restarted before the component has cooled down completely.
The calculation of the reduced heat output due to transient effects at current time since the last start of the component and with the constant heatuptime of each component can be calculated with the following expression:
If the component has not been cooled town completely since the last shutdown, the heatup losses can be calculated using the following equation with representing the time shift for the exponential function (compare to figure above).
The cooldown curve is calculated analogously in order to get the current state of the component in the case of restart in the next time step.
To get the average thermal energy output within the current timestep between and , an integration of the exponential function is needed. According to the TRNSYS Type 401^{1}, this leads to
For the zeroth timestep of the simulation, is set to zero. does not have to be calculated in every time step, but only when the state of the component changes from "off" to "on". For this purpose, the energy output of the last time step with the state "on" must be documented, since this is required for the further calculation.
Below, an exemplary logic is given of a function handling the transient heatup effects.
def heat_up_losses( Q_out(last_ontime),
last_state,
this_state,
t_simulation,
t_on,
t_off,
tau_on,
tau_off,
t_on_upper,
t_on_lower,
t_shift_on)
if t_simulation == 0:
Q_out_last = 0
else:
Q_out_last = Q_out(last_ontime)
end
if last_state == on and this_state == off:
t_off = 0
end
if last_state == off and this_state == on:
t_on = 0
end
if this_state == on and t_on == 0:
t_shif_off = f(Q_out_last)
Q_off = f(t_shift_off, t_off)
t_shift_on = f(Q_off)
Q_out_new = f(t_shift_on)
t_on += 1
elif this_state == on:
Q_out_new = f(t_shift_on)
t_on += 1
elif this_state == off:
t_off += 1
end
return Q_out_new, t_shift_on, t_on, t_off
Partload ratio dependent efficiency
Trait: PLRdependent efficiency
Most components can be operated not only at full load, but also in part load operation. Due to several effects like the efficiency of electrical motors, inverters or thermal capacity effects, the efficiency of a component in part load usually differs from its efficiency at its full load operation point. How exactly the efficiency changes in part load depends on the specific component. Here, the general approach implemented in the simulation model is explained to consider partload dependent efficiencies. This method considers only the effect of the part load operation. Components that also operate at different efficiency depending on temperatures, specifically heat pumps, require to extend this method, which is described in the corresponding section of the component.
The partload ratio (PLR) in general is defined as
with being the design power of the component, usually rated to a certain output power. The change of the efficiency with respect to the PLR can be given as curve, for example as shown in the following figure for the efficiency of a motor in partload operation (Source: Eppinger2021^{2}):
Considering nonlinear partload efficiencies leads to several problems. First, the partload efficiency curve is not necessarily a monotonic function, as shown in the figure above exemplarily. This implies that the function is also noninvertible. However, the inversion is needed to determine the partload state at which power a component has to be operated at the current time step when external limits are present, e.g. if only a limited energy supply and/or a limited energy demand is given.
Another problem is the fact, that efficiencies are always defined as ratios. When changing the efficiency due to partload operation, it is not clear, how the two elements of the efficiencyratio have to be adjusted as only their ratio is given. Here, in this simulation model, one input or one output has to be defined as basis for the efficiency that will be considered to have a linear behavior in partload operation. The other in or output energy will be adjusted to represent the nonlinearities in the change of the efficiency at different PLR.
A third difficulty is the inconsistent definition of the partload ratio in the literature when considering nonlinearities in partload operation. In theory, every input and output has its own partload ratio at a certain operation point of a component with multiple in or outputs. Each of the PLR do not necessarily represent the same operational state of the component, so this would lead to an inconsistent base if several operational restrictions are given. This can be solved by defining a reference partload ratio, e.g. with respect to the main output or by defining the efficiency curves relative to each other with the same base.
In the figure below, a partload curve (orange curve) based on an exponential function of a fictitious component that has electricity as input (yellow curve) and heat as output (grey curve) is shown. The heat output (= useful energy) is assumed to be linear (straight line) with a rated power of 1 kW, resulting in a nonlinear demand of electricity (= expended energy).
The basis for the consideration of nonlinear partload efficiencies is the userdefined efficiency curve of a component
as shown exemplarily as orange curve in the figure above. can be any continuous function, including nonmonotonic ones, as long as the function of the expended energy (yellow curve for electrical input in the figure above)
is monotonic in the range of . This is typically the case for common functions as the change in efficiency is not as big as the impact of the PLR on the energy curve . During preprocessing, the function is calculated from and numerically inverted to get a piecewise linear approximation of . For functions with strong gradients this assumption of monotonicity of may not hold and lead to inconsistent behaviour.
The partload function of the useful energy, that is assumed to be linear,
needs to be inverted as well. As is assumed to be linear, the inverse is trivial and meets the original definition of the PLR:
.
During each timestep, both functions, and , are evaluated according to the operational strategy to determine the part load ratio that is needed to meet the demand while not exceeding the maximum available power.
Inputlinearity and multiple outputs
The method described here implies that the output of the component is the one assumed to be linear in respect to the PLR. The method can be reversed if the input is linear and the output to be determined as a function of the PLR. In both cases the PLR is calculated for both available/demanded input and output energies as this is part of determining the operational state of the component.
If several outputs on a component exist, like with a combined heat and power plant, each output can have its own independent efficiency curve, so several efficiency curves are needed as input parameters. In this case, it is necessary to ensure that the partload factor is based on the same definition for all partload depended efficiency curves to ensure comparability and a consistent basis. One of the outputs needs to be assumed as linear in respect to the partload ratio in order for the calculations of the other outputs to be possible. This is typically the case for such transformers as one output is considered the primary, or operationdefining output; e.g. an electricitydriven CHP.
Minimum operation time
To force the simulation engine to turn on a component for a defined minimum operation time, the partial load ratio is limited to allow the component to run for the defined turnon time. The limit is determined by the maximum potential of the energy sink (e.g. free storage capacity) divided by the minimum operating time with a consideration of the maximum deliverable power of the component. This method does not take into account an unexpected decrease of the available energy input into the component, since no prediction is possible in this model. Therefore, the minimum operating time cannot be guaranteed.
ToDo: elaborate further

Wetter M., Afjei T.: TRNSYS Type 401  Kompressionswärmepumpe inklusive Frost und Taktverluste. Modellbeschreibung und Implementation in TRNSYS (1996). Zentralschweizerisches Technikum Luzern, Ingenieurschule HTL. URL: https://trnsys.de/static/05dea6f31c3fc32b8db8db01927509ce/ts_type_401_de.pdf ↩↩

Eppinger, B. et al.(2021): Simulation of the Part Load Behavior of Combined Heat PumpOrganic Rankine Cycle Systems. In: Energies 14 (13), S. 3870. doi: 10.3390/en14133870. ↩