Skip to content

Math.Nonlinear.quadratureNewtonCotes - #4800

Open
AHaumer wants to merge 5 commits into
modelica:masterfrom
AHaumer:Quadrature
Open

Math.Nonlinear.quadratureNewtonCotes#4800
AHaumer wants to merge 5 commits into
modelica:masterfrom
AHaumer:Quadrature

Conversation

@AHaumer

@AHaumer AHaumer commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

When investigating the relation between spatial flux density distribution of a rotating rotor (with permanent magnets) and the flux linkage of a coil in the stator core (to calculate the induce voltage), I have to calculate an integral over the angle spanned by the coil. Since quadratureLobatto has some problems with a moving integration interval, I implemented two less sophisticated quadrature functions: quadratureTrapezoidal (based on the trapezoidal rule) and quadratureSimpson (based on Simpson's rule).
Both are tested in the example MovingIntegral (using the utility function funB). That's also a nice example for the usage of quadrature functions. Defined comparison signals, no backwards compatibility issues.

@AHaumer AHaumer self-assigned this Aug 22, 2026
@AHaumer AHaumer added enhancement New feature or enhancement L: Math Issue addresses Modelica.Math labels Aug 22, 2026
@AHaumer AHaumer changed the title Math.Nonlinear.quadrature{Trapezoidal, Simson} Math.Nonlinear.quadrature{Trapezoidal, Simpson} Aug 22, 2026
@AHaumer
AHaumer requested a review from henrikt-ma August 22, 2026 21:46
@AHaumer AHaumer changed the title Math.Nonlinear.quadrature{Trapezoidal, Simpson} Math.Nonlinear.quadratureNewtonCotes Aug 23, 2026
@AHaumer

AHaumer commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

I managed to implement the first 4 closed Newton-Cotes formulas in 1 function, just distinguished by 1 parameter.
This is the desired formulation, allowing the user to choose the degree of the interpolation polynominal and the number of intervals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or enhancement L: Math Issue addresses Modelica.Math

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant