Skip to content

Commit

Permalink
50 / 60 : rename dxdt to v
Browse files Browse the repository at this point in the history
to add a linear oscillator for comparison
  • Loading branch information
beachdweller committed May 22, 2024
1 parent d7efc17 commit 75eb24e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions 50_ode/60_Duffing_Oscillator.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@
"\n",
" def f(t:float, xv:np.ndarray,):\n",
" '''\n",
" Calculate slope vector of the Duffing Oscillator\n",
" 더핑 연산자의 기울기 벡터를 계산\n",
" Calculate slope vector of the Duffing Oscillator and a linear oscillator\n",
" 더핑 진동자와 선형 진동계의 기울기 벡터를 계산\n",
" '''\n",
" x, dxdt = xv\n",
" dx_dt = dxdt\n",
" da_dt = neg_k_m * x + neg_c_m * dxdt + neg_alpha_m * x**3 + F_m * np.cos(omega_rps * t)\n",
" x, v = xv\n",
" dx_dt = v\n",
" da_dt = neg_k_m * x + neg_c_m * v + neg_alpha_m * x**3 + F_m * np.cos(omega_rps * t)\n",
" \n",
" return np.array((dx_dt, da_dt))\n",
"\n",
Expand Down

0 comments on commit 75eb24e

Please sign in to comment.