9 using namespace gravitation;
19 double _accel1 = 0, _accel2 = 0;
21 double _v1final = 0, _x1final = 0;
25 const double mass,
mu;
26 const double force,
phi;
35 inline X200(
double inmass,
double inmu,
double inforce,
double inphi,
double t1)
48 _accel1 = (force) / (mass) * (cos(phi) + (mu) *sin(phi)) - (mu) *
Earth::g;
60 return t <= (t1) ? force : 0;
69 return t <= t1 ? _accel1 : _accel2;
77 inline double x(
double t)
const {
79 return 0.5 * _accel1 * pow(t, 2);
81 const double deltat = (t - t1);
82 return _x1final + _v1final * deltat + 0.5 * _accel2 * pow(deltat, 2);
90 inline double v(
double t)
const {
94 return _v1final + _accel2 * (t - t1);
101 template<
bool EXACTDATA = true>
120 inline int odefn(
double t,
const double yin[],
double yout[]) {
122 yout[1] = acceleration(t);
134 inline void exec(
double dt = 0.1,
double tmax = 500) {
135 Ode ode{ *
this, 1e-2, 1e-9, 0 };
140 while (ode[1] >= 0 && t < tmax) {
141 if constexpr (EXACTDATA) {
148 _data += { t, ode[0], ode[1], 0, 0 };
164 auto view = _data.select_total_rows(5);
175 C200<true> cobj{ 1.0, 0.25, 10, 30.0_deg, 10 };
double v(double t) const
v Geschwindigkeit als Funktion der ...
void set_init_conditions(double t, const Array &y)
set_init_conditions lege Anfangsbedingungen fest
X200(double inmass, double inmu, double inforce, double inphi, double t1)
X200 Konstruktor.
double acceleration(double t) const
acceleration die zeitabhängige Kraft Beschleunigung
The X200 class Geradlinige Bewegung eines Objekts mit konstanter äußerer Kraft und Gleitreibung (Mode...
The Odeiv2 class numerische Lösung eines Systems von N Differenzialgleichungen Schnittstelle zur gsl...
The XModel class Basisklasse speichert eine ID in Form einer Zeichenkette enthält Hilfsfunktionen zur...
double get_force(double t) const
get_force die zeitabhängige Kraft
void save_data()
save_data speichere Daten in Dateien
void run()
run Berechnung von Beispieldaten Geradlinige Bewegung eines Objekts mit konstanter äußerer Kraft und ...
The C200 class Rechenmodell (numerisch berechnete Werte)
void exec(double dt=0.1, double tmax=500)
exec numerische Lösung der Bewegungsgleichungen
static const Format latex
static constexpr double g
double x(double t) const
v Ortsvektor als Funktion der ...
static void all(const std::string &s, std::initializer_list< bool > lst)
input teste mehrere Bedingungen auf einmal