Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Integration of non-t integrals

Integration of non-t integrals

Hi all,

lets say I have an equation of the form

\int_{t} \int_{k}  1/k exp{-ikx(t)} sin(t-\tau) dk d\tau

How to approach this in modelica?

A first approach could be to put the inner integral in a function which receives t and  \tau and uses e.g. Runge Kutta Method for integration.
Does there exist a block or anything for this or does one need to code the method?

thx
alex

Re: Integration of non-t integrals

First you need to transform this equation in differential equation by differentiate it with respect to k and tau. They you get a partial differential equation that you can discretise appropriately to get an ODE System.
Maybe just one way to solve that.

so long.
Willi

Re: Integration of non-t integrals

Hi,
I have had the same problem and spent much time trying to come around it.
Manual discretisation of the problem finally led to models that the solver was not able to solve at t=0 (note that the equations were not that linear...).
I finally opted for external functions, with clean runge-kutta-like methods, and will soon try to use the external functions in Modelica.
JB

There are 0 guests and 0 other users also viewing this topic
You are here: