loganbvh / py-tdgl

2D time-dependent Ginzburg-Landau in Python
MIT License
37 stars 13 forks source link

Using Adaptive Library to Simulate a Range of Field Oscillations #56

Closed Kyroba closed 1 year ago

Kyroba commented 1 year ago

In previous issues, it was suggested that the Adapative library (https://github.com/python-adaptive/adaptive) could be used to sample the most important parameters when finding Jc across various fields. I have been thinking of applying oscillating fields (without changing polarity) to a superconducting film and was wondering what considerations to take when using Adapative to scan the through the frequency range. What could be the output that the algorithm learns from? I was thinking average vortex motion, but not sure how to implement this. Maybe the peak to peak voltage between probes is easier?

loganbvh commented 1 year ago

My suggestion was to use adaptive to sample voltage V vs. current I, for a device with unknown I_c. The idea is that adaptive will learn the value of I_c and sample currents near I_c more densely than currents far from I_c.

If I understand correctly, you want to have a constant bias current and an oscillating applied field that never crosses zero. You could use adaptive to sample the bias current and frequency of the applied field. The input to adaptive that I would use is simply the time-averaged voltage (solution.dynamics.mean_voltage(tmin=tmin)), where tmin is the time at which the system reaches a relatively periodic behavior (i.e. after any transient from turning on the bias current).