/ challenges-old / cymbal-solutions
Sign in
challenges-old / cymbal-solutions
Fix the damping term in the device loop
Jeremy Magland <jmagland@flatironinstitute.org> committed commit 5b29a8c34991 parent f827f8e Browse files
1 changed file+2−2
solvers/vonkarman-modal-disk/vk_modal_disk.pymodified+2−2View file
@@ -225,7 +225,7 @@ class VonKarmanDisk:
225225 q_prev = t.zeros_like(q)
226226 frames = [] if fld else None
227227 PhiG = T64(fld["PhiG"]) if fld else None
228- inv2dt = 1.0 / (2.0 * dt)
228+ invdt = 1.0 / dt # 2 alpha (q+ - q-) / (2 dt)
229229 t_start = time.perf_counter()
230230 report = max(1, nsteps // 10)
231231 for nstep in range(nsteps + 1):
@@ -237,7 +237,7 @@ class VonKarmanDisk:
237237 if psi:
238238 Fext = Fext + f * psi
239239 q_next = a1 * q + a2 * q_prev + b * Fext
240- qdd = Fext - w2 * q - al * ((q_next - q_prev) * inv2dt)
240+ qdd = Fext - w2 * q - al * ((q_next - q_prev) * invdt)
241241 ring[nstep % L] = qdd
242242 if nstep % m == 0:
243243 k = nstep // m
↑↓ move↵openescclose