Package Modelica.Math.Nonlinear.Examples
This icon indicates a package that contains executable examples.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
| Name | Description |
|---|---|
quadratureLobatto1 | Integrate integral with fixed inputs |
quadratureLobatto2 | Integrate integral with user dependent inputs |
QuadratureLobatto3 | Integrate function in a model |
solveNonlinearEquations1 | Solve nonlinear equations with fixed inputs |
solveNonlinearEquations2 | Solve nonlinear equations with user dependent inputs |
UtilityFunctions … | Utility functions that are used as function arguments to the examples |
Function Modelica.Math.Nonlinear.Examples.quadratureLobatto1
This example integrates the following integrands with function quadratureLobatto and compares the result with an analytical solution. The examples also demonstrate how additional input arguments to the integrand function can be passed as additional arguments. The following integrals are computed:
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Real | tolerance | Error tolerance of integral values |
Function Modelica.Math.Nonlinear.Examples.quadratureLobatto2
This example solves the following integrands with function quadratureLobatto. The user can set the parameters, like "w" or "k", and can experiment with different integration intervals. The following integrals are computed:
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Real | Tolerance | Error tolerance of integral value |
Real | a1 | Lower limit |
Real | b1 | Upper limit |
Real | a2 | Lower limit |
Real | b2 | Upper limit |
Real | w | Angular velocity |
Real | a3 | Lower limit |
Real | b3 | Upper limit |
Real | k | Modul |
Function Modelica.Math.Nonlinear.Examples.solveNonlinearEquations1
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:
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Real | tolerance | Relative tolerance of solution u |
Function Modelica.Math.Nonlinear.Examples.solveNonlinearEquations2
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:
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Real | tolerance | Relative tolerance of solution u |
Real | u_min1 | Lower limit |
Real | u_max1 | Upper limit |
Real | u_min2 | Lower limit |
Real | u_max2 | Upper limit |
Real | w | Angular velocity |
Real | u_min3 | Lower limit |
Real | u_max3 | Upper limit |
Real | p[2] | Parameter vector |
Real | m | Parameter |
Model Modelica.Math.Nonlinear.Examples.QuadratureLobatto3
Technically, this example demonstrates how to utilize a function as input argument to a function in a model.
From a modeling point of view, the example demonstrates in very simplified way the basic approach to model distributed systems with the Ritz method.
The displacement field u(c,t) of a particle (where c is the undeformed position and t is time) is hereby approximated by space-dependent mode shapes Φ(c) and time-dependent modal amplitudes q(t), that is u = Φ(c)*q(t). When inserting this decomposition in the equations of motion and then integrating over all particles, terms such as ∫(Φ(c) dc)*q(t) appear, where the time-invariant integral term can be computed beforehand once with the Lobatto method. By this approach the partial differential equations are transformed to a system of ordinary differential equations.
Extends from Modelica.Icons.Example (Icon for runnable examples).
| Type | Name | Default | Description |
|---|---|---|---|
Real | A | 1 | Amplitude of integrand of s |
Real | ws | 2 | Angular frequency of integrand of s |
Real | wq | 3 | Squared angular frequency of q |
final Real | s | Modelica.Math.Nonlinear.quadratureLobatto(function UtilityFunctions.fun7(A = A, w = ws), 0, 1) | Time-invariant integral value |