Comments (1)
Hi, good question!
You can define a function that sets the critical temperature T_c of the device as a function of both position and time (this is the disorder_epsilon
parameter in tdgl.solve()
). To trap some flux in a hole in a device, you can set T_c = 0 for a region of the device connecting the hole to the exterior, thereby creating a normal metal channel that will allow vortex entry. Below is a script that implements this protocol to trap a single flux quantum in a superconducting ring. Hopefully this is enough to get you started.
import numpy as np
import tdgl
from tdgl.geometry import circle
# Define the device
film_radius = 1
hole_radius = film_radius / 3
layer = tdgl.Layer(london_lambda=0.1, coherence_length=0.05, thickness=0.01)
film = tdgl.Polygon("film", points=circle(film_radius)).resample(201)
hole = tdgl.Polygon("hole", points=circle(hole_radius)).resample(201)
device = tdgl.Device(
"ring",
layer=layer,
film=film,
holes=[hole],
length_units="um",
)
# Make the mesh
device.make_mesh(max_edge_length=0.025)
# Setup the field cooling protocol:
# 1. Use disorder_epsilon to create a temporary normal metal channel connecting the
# film exterior and the hole.
# 2. Apply a uniform magnetic field sufficient to trap a single flux quantum in the hole.
# 3. Remove the normal metal channel, then turn off the magnetic field.
options = tdgl.SolverOptions(
output_file="ring.h5",
solve_time=250,
field_units="mT",
current_units="uA",
dt_max=0.01,
)
def epsilon(r, *, t):
"""Sets T_c = 0 for a portion of the film until time t = 100."""
x, y = r # r = (x, y) is the position within the film
# t is time in units of \tau_0
if t < 100 and y > 0 and np.abs(x) < 0.1:
return -1
return 1
def scale_func(x, y, z, *, t):
"""A scale factor that turns off the applied field after time t = 200."""
if t < 200:
return 1
return 0
# Apply a uniform magnetic field equal to 1.5 * Phi_0 / film_area
# to trap one Phi_0 in the hole
film_area = np.pi * (film_radius * tdgl.ureg("um"))**2
applied_field = 1.5 * (tdgl.ureg("Phi_0") / film_area).to("mT")
print(f"Applied field = {applied_field}")
# Combine the scale factor and uniform magnetic field
# to define the applied magnetic vector potential.
applied_vector_potential = (
# Time-dependent scale factor
tdgl.sources.Scale(scale_func)
# Uniform applied magnetic field
* tdgl.sources.ConstantField(
applied_field.to(options.field_units).magnitude,
length_units=device.length_units,
field_units=options.field_units,
)
)
# Solve the model
solution = tdgl.solve(
device,
options,
applied_vector_potential=applied_vector_potential,
disorder_epsilon=epsilon,
)
Here is a video created by running the following from the command line:
python -m tdgl.visualize --input="ring.h5" --output="ring.mp4" animate --fps=15 --quantities order_parameter phase supercurrent epsilon
ring.mp4
from py-tdgl.
Related Issues (20)
- ParaView Visualization HOT 2
- Resources for Simulation Parameters of YBCO HOT 31
- make_mesh for Large Geometries HOT 10
- Modify Axis Limits in Visualize HOT 9
- Using Adaptive Library to Simulate a Range of Field Oscillations HOT 1
- Time dependent disorder_epsilon HOT 4
- Post Simulation Probe Points HOT 2
- Real-time monitor hangs for large geometries HOT 9
- High Fluxoid Error with No Screening HOT 6
- tdgl.visualize --output not recognized HOT 2
- Pixel Current Artefact HOT 8
- errors during tdgl testing HOT 40
- TypeError with Pardiso solver HOT 5
- Device with different layers/materials HOT 2
- Does not work with pint version 0.24 HOT 3
- Append new solution to seed solution HOT 1
- Add vector potential from magnetization distribution
- Traceback on quickstart.ipynb HOT 7
- Replicating SQUID loop result in paper HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py-tdgl.