modelica / ModelicaStandardLibrary

Free (standard conforming) library to model mechanical (1D/3D), electrical (analog, digital, machines), magnetic, thermal, fluid, control systems and hierarchical state machines. Also numerical functions and functions for strings, files and streams are included.
https://doc.modelica.org
BSD 3-Clause "New" or "Revised" License
471 stars 168 forks source link

regStep and smoothStep #4013

Open sertho opened 2 years ago

sertho commented 2 years ago

Whenever I need utility functions for example to regularize a characteristic I search within the Media and the Fluid libraries. I found that these two functions do the same:

Is there any plan to create a new package where all these utility functions are gonna be collected? (maybe within Math.Numerics or similar)

It would make it much more easy for the users to find adequate functions for this kind of problems.

Is there a function within the MSL similar to smoothStep, but with monotonicity ensured (e.g. using hermite splines for monotone cubic interpolation)? I found something similar in the Buildings library: https://simulationresearch.lbl.gov/modelica/releases/v9.0.0/help/Buildings_Utilities_Math_Functions.html#Buildings.Utilities.Math.Functions.smoothInterpolation

AHaumer commented 2 years ago

Wouldn't it make sense to collect such functions in Modelica.Math or Modelica.Blocks? I don't know such a function you mentioned, but I think it could be implemented by using Modelica.Blocks.Tables.