.BusinessSimulation.Flows.Unidirectional.Decay

Information

This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.

The stock connected to port A (stockA) will be gradually drained at a rate determined by the average time of residence (residenceTime) in the stock. The rate which drains the stock (draining) is given by:

draining = stockA.y / residenceTime

Implementation

The residence time is clipped to never be smaller than the global parameter dt.

Notes

The process of decay is essentially exponential decline, since the outflow is a fraction of the stock. The rate of decay thus also exponentially declines towards zero if there is no inflow to the stock, that is connected to port A.

If there is no inflow to the stock the level of the stock will be less than α x InitialLevel (0 < α <1) after a time span of - ln(α) × residenceTime.

So we can note the following multiples for the residenceTime to calculate the time it takes to drain the stock A to α [%] of its initial level:

α [%] Time to drain as multiple of the residenceTime
50

0.69 ⋅ residenceTime

1/e ≈ 37

1.0 ⋅ residenceTime

10

2.3 ⋅ residenceTime

5

3.0 ⋅ residenceTime

1

4.6 ⋅ residenceTime

0.1 = 1 ‰

6.9 ⋅ residenceTime

The time span it takes to drain the stock by half is called its half life. As can be seen from the equation and table above it is about ln(2) residenceTime ≈ 69% of the (average) residence time.

See also

ProportionalTransitionExponentialDecay

Revisions


Generated at 2024-11-22T19:25:38Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos