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

TypeNameDefaultDescription
Realtolerance100*Modelica.Constants.epsRelative tolerance of solution u