How can I integrate a variable with respect to time ?
Is it an explicit function of time?
In[1]:= f[t_] = t^3;
In[2]:= fi[tt_] = Integrate[f[t], {t, 0, tt}]
Out[2]= tt^4/4
Thanks Frank. But this is a Mathematica code. I am asking about Modelica code (the language on which SystemModeler is based) !
Anyway, I used this function:
function int "Integrate variable with respect to time"
extends Modelica.Icons.Function;
input Real u;
output Real y;
algorithm
u:=der(y);
annotation(Diagram(coordinateSystem(extent={{-148.5,-105.0},{148.5,105.0}}, preserveAspectRatio=true, initialScale=0.1, grid={5,5})));
end int;
It is working fine until now.
You can find an Integrator component in the included libraries: Modelica.Blocks.Continuous.Integrator. This is modeled as an input block rather than a function to make it possible to connect to other components using drag&drop