modelExpTranscendEqs

Solution of Exponential-Transendental Equation

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

Exponential transcendental equations of the form,

x = a + b ecx

may be solved using the Lambert W functions:

xk = a - Wk(-bc eac) / c 

where W(y) is a solution of: W(y) eW(y) = y .

If the argument of the W function is real and between -1/e and 0, then there are two real values: W0 (> -1) and W-1 (< -1).
If the argument is real and >=0, then there is one real value: W0.

In this example, x values are produced in a ramp source. Both sides of the equation are produced: y=x and z=a+becx. The result, r0=a-W0(-bceac)/c, is also determined and all three meet at the appropriate point:

This type of solver is coded into the "SolveExpTranscend" block under the "NumericalInversions" package. The use of this block on the far right reveals that there is a 2nd solution from W-1 at x~35.

Components

TypeNameDefaultDescription
Modelica.Blocks.Sources.Rampx_ramp
Modelica.Blocks.Math.Minmin
GNU_ScientificLibrary.Blocks.specfunc.Lambert_W0w0
GNU_ScientificLibrary.Blocks.specfunc.Lambert_Wm1wm1
Modelica.Blocks.Math.Expexp
Modelica.Blocks.Math.Productprod_cx
Modelica.Blocks.Math.Productprod_becx
Modelica.Blocks.Math.Addadd_a
Modelica.Blocks.Sources.Constantconst_c
Modelica.Blocks.Sources.Constantconst_b
Modelica.Blocks.Sources.Constantconst_a
Modelica.Blocks.Sources.Constantconst_bceac
Paramsparams
Modelica.Blocks.Sources.Constantx_zero_minus
Modelica.Blocks.Sources.Constantx_min
Modelica.Blocks.Math.Maxmax
Modelica.Blocks.Math.Productprod_1c
Modelica.Blocks.Math.Addres0
Modelica.Blocks.Sources.Constantconst_1c
Blocks.specfunc.NumericalInversions.SolveExpTranscendsolveExpTranscend

Contents

NameDescription
Params