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

TypeNameDefaultDescription
Realtolerance100*Modelica.Constants.epsRelative tolerance of solution u
Realu_min1-0.5Lower limit
Realu_max110Upper limit
Realu_min20Lower limit
Realu_max25Upper limit
Realw3Angular velocity
Realu_min31Lower limit
Realu_max38Upper limit
Real[2]p{5, 1}Parameter vector
Realm1Parameter