This function computes the opening characteristics of an exponential damper.
The function is used by the model Annex60.Fluid.Actuators.Dampers.Exponential.
For yL < y < yU
, the damper characteristics is
kd(y) = exp(a+b (1-y)).
Outside this range, the damper characteristic is defined by a quadratic polynomial.
Note that this implementation returns sqrt(kd(y)) instead of kd(y). This is done for numerical reason since otherwise kd(y) may be an iteration variable, which may cause a lot of warnings and slower convergence if the solver attempts kd(y) < 0 during the iterative solution procedure.
function exponentialDamper input Real y(min = 0, max = 1, unit = "") "Control signal, y=0 is closed, y=1 is open"; input Real a(unit = "") "Coefficient a for damper characteristics"; input Real b(unit = "") "Coefficient b for damper characteristics"; input Real[3] cL "Polynomial coefficients for curve fit for y < yl"; input Real[3] cU "Polynomial coefficients for curve fit for y > yu"; input Real yL "Lower value for damper curve"; input Real yU "Upper value for damper curve"; output Real kThetaSqRt(min = 0) "Flow coefficient, kThetaSqRT = =sqrt(kTheta) = sqrt(pressure drop/dynamic pressure)"; end exponentialDamper;
0
and 1
in case that the control input
has a numerical integration error.
sqrt(kTheta)
. This avoid having kTheta
in
the iteration variables, which caused warnings when the solver attempted
kTheta < 0
.