File: rocket.mo

package info (click to toggle)
casadi 3.7.0%2Bds2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,964 kB
  • sloc: cpp: 114,229; python: 35,462; xml: 1,946; ansic: 859; makefile: 257; sh: 114; f90: 63; perl: 9
file content (12 lines) | stat: -rwxr-xr-x 288 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
model rocket
  Real s(start=0, unit="m");
  Real v(start=0, unit="m/s");
  Real m(start=1, unit="kg");
  parameter Real a = 0.05;
  parameter Real b = 0.1;
  input Real u(start = 0.4, min = -0.5, max = 0.5);
equation
  der(s) = v;
  der(v) = (u - a*v^2)/m;
  der(m) = -b*u^2;
end rocket;