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
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Sources.Ramp | x_ramp | ||
| Modelica.Blocks.Math.Min | min | ||
| GNU_ScientificLibrary.Blocks.specfunc.Lambert_W0 | w0 | ||
| GNU_ScientificLibrary.Blocks.specfunc.Lambert_Wm1 | wm1 | ||
| Modelica.Blocks.Math.Exp | exp | ||
| Modelica.Blocks.Math.Product | prod_cx | ||
| Modelica.Blocks.Math.Product | prod_becx | ||
| Modelica.Blocks.Math.Add | add_a | ||
| Modelica.Blocks.Sources.Constant | const_c | ||
| Modelica.Blocks.Sources.Constant | const_b | ||
| Modelica.Blocks.Sources.Constant | const_a | ||
| Modelica.Blocks.Sources.Constant | const_bceac | ||
| Params | params | ||
| Modelica.Blocks.Sources.Constant | x_zero_minus | ||
| Modelica.Blocks.Sources.Constant | x_min | ||
| Modelica.Blocks.Math.Max | max | ||
| Modelica.Blocks.Math.Product | prod_1c | ||
| Modelica.Blocks.Math.Add | res0 | ||
| Modelica.Blocks.Sources.Constant | const_1c | ||
| Blocks.specfunc.NumericalInversions.SolveExpTranscend | solveExpTranscend |
Contents
| Name | Description |
|---|---|