WOLFRAM SYSTEM MODELER

Stepsmoother

Continuous interpolation for x

Wolfram Language

In[1]:=
SystemModel["Modelica.Fluid.Dissipation.Utilities.Functions.General.Stepsmoother"]
Out[1]:=

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

The function is used for continuous fading of variable inputs within a defined range. It allows a differentiable and smooth transition between function outputs, e.g., laminar and turbulent pressure drop or correlations for certain ranges.

Function

The tanh-function is used, since it provides an existing derivative and the derivative is zero at the borders [nofunc, func] of the interpolation domain (smooth derivative for transitions).

In order to work correctly, the internal interpolation range in terms of the external arbitrary input x needs to be scaled such that:

f(func)   = 0.5 π
f(nofunc) = -0.5 π

Example

In the picture below the input x is increased from 0 to 1. The range of interpolation is defined by:

  • func = 0.75
  • nofunc = 0.25

Stepsmoother

References

Wischhusen, St.
Simulation von Kältemaschinen-Prozessen mit MODELICA / DYMOLA. Diploma thesis, Hamburg University of Technology, Institute of Thermofluiddynamics, 2000.

Syntax

result = Stepsmoother(func, nofunc, x)

Inputs (3)

func

Type: Real

Description: Input value for that result = 100%

nofunc

Type: Real

Description: Input value for that result = 0%

x

Type: Real

Description: Input variable for continuous interpolation

Outputs (1)

result

Type: Real

Description: Output value