functionsolveNonlinearEquations1
Solve nonlinear equations with fixed inputs
Extends from Modelica.Icons.Function (Icon for functions).
Information
This example solves the following nonlinear equations with function solveOneNonlinearEquation and compares the result with the available analytical solution. The examples also demonstrate how additional input arguments to the nonlinear equation function can be passes as additional arguments. The following nonlinear equations are solved:
- 0 = u^2 - 1
- 0 = 3*u - sin(3*u) - 1
- 0 = 5 + log(u) - u
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | tolerance | 100*Modelica.Constants.eps | Relative tolerance of solution u |