functionsolveNonlinearEquations2
Solve nonlinear equations with user dependent inputs
Extends from Modelica.Icons.Function (Icon for functions).
Information
This example solves the following nonlinear equations with function solveOneNonlinearEquation. The user can set the parameters, like "w" or "m", and can experiment with different start intervals. The following nonlinear equations are solved:
- 0 = u^2 - 1
- 0 = 3*u - sin(w*u) - 1
- 0 = p[1] + log(p[2]*u) - m*u
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | tolerance | 100*Modelica.Constants.eps | Relative tolerance of solution u |
| Real | u_min1 | -0.5 | Lower limit |
| Real | u_max1 | 10 | Upper limit |
| Real | u_min2 | 0 | Lower limit |
| Real | u_max2 | 5 | Upper limit |
| Real | w | 3 | Angular velocity |
| Real | u_min3 | 1 | Lower limit |
| Real | u_max3 | 8 | Upper limit |
| Real[2] | p | {5, 1} | Parameter vector |
| Real | m | 1 | Parameter |