### Unformatted Attachment Preview

DATE:
MAT128C, homework set #2.
DUE:
April 30, 2020
May 10, 2020 at 11:59pm
NOT FOR DISTRIBUTION
1.1. For the problem in HW1 implement the adaptive time step control to the c = 21 RK2
method such that the global error on y N at tN = 100 is |y N − y(tN )| < 10−5 for
η = 1.1. Validate that the result has the quality you expect. Give the smallest
time step used by method, and count the number of time steps you take, as well as
the number of time steps you reject in the procedure. You should set a maximum
allowable time step; e.g., ∆t ≤ 0.1.
Attached sample code is a very primitive solution to a velocity explicit Størmer-Verlet
method applied to a simple, normalized second order differential equation. Please review,
follow the instructions, and see that it works. The code, as written, solves
ÿ = −κ sin y − αẏ + η
y(0) = 0.4
ẏ(0) = 0.4
(1)
where κ = 1, α = 0.02 (unless otherwise stated), and η = 0.5 (unless otherwise stated).
The time interval is 0 ≤ t ≤ 100 with n dt = 100, 000 time steps (unless otherwise stated).
Output of the function y n as a function of tn is in the code-generated file ”Dat” as columns
two and three.
2.0. A large area Josephson junction in superconducting electronics can be described by
the following equation
h̄ dϕ
h̄C d2 ϕ
+
= I − Ic sin ϕ
2
2e dt
2eR dt
where h̄ = h/2π, h being Planck’s constant, e is the proton charge, and R is the
Ohmic resistance of the junction (R = 50Ω), and C = 5 × 10−14 F is the capacitor
of the overlap between the superconductors defining the junction. The critical supercurrent of the junction is Ic = 1µA, and the applied current through the system is
h̄ dϕ
, where ϕ is the quantum mechanical
I. The voltage across the junction is V = 2e
dt
phase difference between the two superconductors defining the junction.
Normalize this equation to put it in the form of (1) above (with κ = 1), and determine
the normalized friction coefficient α as well as the characteristic time scale τ0 .
2.1. Validate numerically the stability range for the (linearized, homogeneous) problem
with α = 0 by simulating the system in the a) stable and reasonable regime, and
the unstable regime. Show representative plots (generated with MatLab, gnuplot, or
something else reasonable) to visualize your results.
2.2. For the same problem as in 2.1, revise the code to use an Euler method. Validate that
you see the inherent instability for the harmonic oscillator.
2.3 For the linear, homogeneous problem with α = 0, validate for the Størmer-Verlet
method that the numerical frequency ΩV increases with ∆t as expected from the
theory.
c 2020 | N IELS G RØNBECH -J ENSEN | U NIVERSITY OF C ALIFORNIA | D AVIS , C ALIFORNIA 95616
COPYRIGHT: NIELS GRONBECH-JENSEN, UC DAVIS, 2018
NOT FOR DISTRIBUTION
2.4. Conduct a simulation of the full nonlinear, inhomogeneous problem with α = 0.05.
Revise the code to use the leap-frog and the Størmer versions of the method, and
validate that y n is identical between the methods for a given reasonable time step ∆t
within the stability limit.
c 2020 | N IELS G RØNBECH -J ENSEN | U NIVERSITY OF C ALIFORNIA | D AVIS , C ALIFORNIA 95616
COPYRIGHT: NIELS GRONBECH-JENSEN, UC DAVIS, 2018
...