Calculator/Hamilton/nvcr.txt

23 lines
477 B
Text
Raw Normal View History

2023-12-02 14:12:25 +01:00
let bc = {t:0.0, w:[0.1, 0.0]}
const C = 1.0;
const L = 1.0;
const G = 0.2;
const U0= 1.0;
let pf = [
(o) => {
const u = o.w[0];
const v = o.w[1];
return -(v + G*u*(u*u - U0*U0)) / C;
},
(o) => {
const u = o.w[0];
return u / L;
},
];
let r = solve (0.02, 4000, bc, pf);
plot (r, {x:['t'], y:['w', 0]}, '#00ff00');
plot (r, {x:['t'], y:['w', 1]}, '#ff0000');
plot (r, {x:['w', 0], y:['w', 1]}, '#00ffff');
2023-12-03 14:50:32 +01:00
delete r.data; /* ukliď po sobě */
2023-12-02 14:12:25 +01:00